38 lines
741 B
PHP
38 lines
741 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
final class ArtworkAiAssistEvent extends Model
|
|
{
|
|
protected $fillable = [
|
|
'artwork_ai_assist_id',
|
|
'artwork_id',
|
|
'user_id',
|
|
'event_type',
|
|
'meta',
|
|
];
|
|
|
|
protected $casts = [
|
|
'meta' => 'array',
|
|
];
|
|
|
|
public function assist(): BelongsTo
|
|
{
|
|
return $this->belongsTo(ArtworkAiAssist::class, 'artwork_ai_assist_id');
|
|
}
|
|
|
|
public function artwork(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Artwork::class);
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
} |