feat: [equipment] 설비관리 모듈 구현
- 모델 6개 (Equipment, InspectionTemplate, Inspection, InspectionDetail, Repair, Process)
- 서비스 3개 (Equipment, Inspection, Repair)
- API 컨트롤러 3개 + FormRequest 4개
- Blade 컨트롤러 + 라우트 등록
- 뷰: 대시보드, 등록대장(CRUD), 일상점검표(캘린더 그리드), 수리이력
2026-02-25 19:39:59 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models\Equipment;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
|
|
class EquipmentProcess extends Model
|
|
|
|
|
{
|
2026-03-09 20:02:04 +09:00
|
|
|
protected $connection = 'codebridge';
|
feat: [equipment] 설비관리 모듈 구현
- 모델 6개 (Equipment, InspectionTemplate, Inspection, InspectionDetail, Repair, Process)
- 서비스 3개 (Equipment, Inspection, Repair)
- API 컨트롤러 3개 + FormRequest 4개
- Blade 컨트롤러 + 라우트 등록
- 뷰: 대시보드, 등록대장(CRUD), 일상점검표(캘린더 그리드), 수리이력
2026-02-25 19:39:59 +09:00
|
|
|
protected $table = 'equipment_process';
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'equipment_id',
|
|
|
|
|
'process_id',
|
|
|
|
|
'is_primary',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'is_primary' => 'boolean',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function equipment(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Equipment::class, 'equipment_id');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function process(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(\App\Models\Process::class, 'process_id');
|
|
|
|
|
}
|
|
|
|
|
}
|