48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
final class ArtworkAiAssist extends Model
|
|
{
|
|
public const STATUS_PENDING = 'pending';
|
|
public const STATUS_QUEUED = 'queued';
|
|
public const STATUS_PROCESSING = 'processing';
|
|
public const STATUS_READY = 'ready';
|
|
public const STATUS_FAILED = 'failed';
|
|
|
|
protected $fillable = [
|
|
'artwork_id',
|
|
'status',
|
|
'mode',
|
|
'title_suggestions_json',
|
|
'description_suggestions_json',
|
|
'tag_suggestions_json',
|
|
'category_suggestions_json',
|
|
'similar_candidates_json',
|
|
'raw_response_json',
|
|
'action_log_json',
|
|
'error_message',
|
|
'processed_at',
|
|
];
|
|
|
|
protected $casts = [
|
|
'title_suggestions_json' => 'array',
|
|
'description_suggestions_json' => 'array',
|
|
'tag_suggestions_json' => 'array',
|
|
'category_suggestions_json' => 'array',
|
|
'similar_candidates_json' => 'array',
|
|
'raw_response_json' => 'array',
|
|
'action_log_json' => 'array',
|
|
'processed_at' => 'datetime',
|
|
];
|
|
|
|
public function artwork(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Artwork::class);
|
|
}
|
|
} |