<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class HasFile extends Model
{
    protected $table = 'has_file';
    protected $casts = ['data' => 'array'];

    public function file()
    {
        return $this->belongsTo(File::class);
    }

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