40 lines
822 B
PHP
40 lines
822 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class ArtworkFeature extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'artwork_features';
|
|
|
|
protected $fillable = [
|
|
'artwork_id',
|
|
'type',
|
|
'featured_at',
|
|
'expires_at',
|
|
'priority',
|
|
'label',
|
|
'note',
|
|
'is_active',
|
|
'force_hero',
|
|
'created_by',
|
|
];
|
|
|
|
protected $casts = [
|
|
'featured_at' => 'datetime',
|
|
'expires_at' => 'datetime',
|
|
'priority' => 'integer',
|
|
'is_active' => 'boolean',
|
|
'force_hero' => 'boolean',
|
|
];
|
|
|
|
public function artwork(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Artwork::class);
|
|
}
|
|
}
|