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