<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Media extends Model
{
    use HasFactory, SoftDeletes;
    
    protected $table = 'media';

    protected $fillable = [
        'mediable_id',
        'mediable_type',
        'type',
        'file_type',
        'original_name',
        'path',
        'name',
        'size',
    ];

    public function mediable(){        
        return $this->morphTo();
    }

}
