'boolean', 'labor_hours' => 'decimal:2', 'hourly_rate' => 'integer', 'labor_cost' => 'integer', 'per_diem' => 'integer', ]; public function mission() { return $this->belongsTo(FieldMission::class, 'mission_id'); } public function user() { return $this->belongsTo(User::class); } public function displayName(): string { if ($this->user) { return trim($this->user->first_name.' '.($this->user->last_name ?? '')); } return $this->person_name ?: '—'; } public function recalculateLaborCost(): void { $hours = (float) $this->labor_hours; $rate = (int) $this->hourly_rate; $this->labor_cost = (int) round($hours * $rate); } }