*/ use HasFactory; use SoftDeletes; protected $fillable = [ 'production_order_id', 'delivery_date', 'delivery_time', 'driver_id', 'carrier', 'request_number', 'request_date', 'carrier_note', 'contact_position', 'contact_name', 'contact_phone', 'desired_time', 'access_system', 'unloading_place', 'advance_notice', 'document_signing_method', 'has_passports_and_certificates', 'note', 'created_by', 'updated_by', ]; protected function casts(): array { return [ 'production_order_id' => 'integer', 'delivery_date' => 'immutable_date', 'request_date' => 'immutable_date', 'has_passports_and_certificates' => 'boolean', 'driver_id' => 'integer', 'created_by' => 'integer', 'updated_by' => 'integer', ]; } public function productionOrder(): BelongsTo { return $this->belongsTo(ProductionOrder::class); } public function driver(): BelongsTo { return $this->belongsTo(User::class, 'driver_id'); } }