<?php

namespace Modules\Bms\Entities;

use Illuminate\Database\Eloquent\Model;

/** A marketing media item (image / video / 360) attached to a core ERP product. */
class BmsProductMedia extends Model
{
    protected $table = 'bms_product_media';

    protected $fillable = [
        'business_id', 'product_id', 'type', 'disk', 'path', 'url',
        'thumbnail_path', 'title', 'is_cover', 'sort_order', 'meta',
    ];

    protected $casts = [
        'is_cover'   => 'boolean',
        'sort_order' => 'integer',
        'meta'       => 'array',
    ];
}
