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