<?php

namespace Modules\HomeScreen\Entities;

use App\Models\BaseModel;

class Model extends BaseModel
{
    protected $guarded = [];

    protected $table = 'home_screens';

    public function Type()
    {
        return $this->belongsTo(Type::class, 'type_id');
    }

    public static function boot()
    {
        parent::boot();
        static::created(function ($model) {
            $model->arrangement = $model->id;
            $model->save();
        });
    }
}
