<?php
namespace App\Models\Nanny;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class NannySchedule extends Model
{
    const UPDATED_AT = null;
    protected $fillable = ['nanny_id','nanny_order_id','schedule_date','type','remark'];
    protected function casts(): array { return ['schedule_date'=>'date','type'=>'integer']; }
    public function nanny(): BelongsTo { return $this->belongsTo(Nanny::class); }
    public function order(): BelongsTo { return $this->belongsTo(NannyOrder::class, 'nanny_order_id'); }
}
