<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;

class MasterMeja extends Model
{
    use HasFactory;

    protected $table = 'master_meja';

    protected $fillable = [
        'no_meja',
        'is_active',
    ];

    protected $casts = [
        'is_active' => 'boolean',
    ];

    public function orders(): HasMany
    {
        return $this->hasMany(OrdersHeader::class, 'id_meja');
    }
}
