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