'boolean', ]; public function equipment(): BelongsTo { return $this->belongsTo(Equipment::class, 'equipment_id'); } public function scopeActive($query) { return $query->where('is_active', true); } public function scopeByCycle($query, string $cycle) { return $query->where('inspection_cycle', $cycle); } public function getTimingLabelAttribute(): string { return match ($this->check_timing) { 'operating' => '가동 중', 'stopped' => '정지 시', default => $this->check_timing ?? '-', }; } }