'date', 'repair_hours' => 'decimal:1', 'cost' => 'decimal:2', ]; public function equipment(): BelongsTo { return $this->belongsTo(Equipment::class, 'equipment_id'); } public function repairer(): BelongsTo { return $this->belongsTo(\App\Models\User::class, 'repaired_by'); } public function getRepairTypeLabelAttribute(): string { return match ($this->repair_type) { 'internal' => '사내', 'external' => '외주', default => $this->repair_type ?? '-', }; } public function getFormattedCostAttribute(): string { if (! $this->cost) { return '-'; } return number_format($this->cost).'원'; } }