This commit is contained in:
ct
2025-06-19 22:24:47 +08:00
parent 5d3a3c8818
commit 7712101b76
11 changed files with 489 additions and 22 deletions

View File

@@ -35,17 +35,19 @@ class BackgroundMedia extends Model
protected $casts = [
'embedding' => Vector::class,
'media_width' => 'integer',
'media_height' => 'integer',
];
protected $fillable = [
'list_type',
'area',
'location_name',
'status',
'media_uuid',
'media_url',
'embedding',
'prompt',
'media_width',
'media_height',
'aspect_ratio',
];
protected $hidden = [
@@ -53,9 +55,6 @@ class BackgroundMedia extends Model
'created_at',
'updated_at',
'deleted_at',
'list_type',
'area',
'location_name',
'status',
'media_uuid',
'embedding',
@@ -68,7 +67,7 @@ class BackgroundMedia extends Model
protected function ids(): Attribute
{
return Attribute::make(
get: fn ($value, $attributes) => hashids_encode($attributes['id']),
get: fn($value, $attributes) => hashids_encode($attributes['id']),
);
}
}