| namespace App\Models; | |
| use Illuminate\Database\Eloquent\Factories\HasFactory; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Illuminate\Database\Eloquent\Relations\BelongsTo; | |
| class SocialMediaAsset extends Model | |
| { | |
| use HasFactory; | |
| protected $fillable = [ | |
| 'user_id', | |
| 'type', | |
| 'provider', | |
| 'prompt', | |
| 'url', | |
| 'thumbnail_url', | |
| 'width', | |
| 'height', | |
| 'duration_seconds', | |
| 'meta', | |
| ]; | |
| protected $casts = [ | |
| 'meta' => 'array', | |
| ]; | |
| public function user(): BelongsTo | |
| { | |
| return $this->belongsTo(User::class); | |
| } | |
| } | |