optimizations
This commit is contained in:
38
app/Models/ArtworkAiAssistEvent.php
Normal file
38
app/Models/ArtworkAiAssistEvent.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user