- App\Models\User → App\Models\Members\User 경로 일괄 수정 - Equipment(manager, subManager), EquipmentInspection(inspector), EquipmentRepair(repairer) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
44 lines
1.0 KiB
PHP
44 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Equipment;
|
|
|
|
use App\Traits\Auditable;
|
|
use App\Traits\BelongsToTenant;
|
|
use App\Traits\ModelTrait;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
|
|
class EquipmentInspection extends Model
|
|
{
|
|
use Auditable, BelongsToTenant, ModelTrait;
|
|
|
|
protected $fillable = [
|
|
'tenant_id',
|
|
'equipment_id',
|
|
'inspection_cycle',
|
|
'year_month',
|
|
'overall_judgment',
|
|
'inspector_id',
|
|
'repair_note',
|
|
'issue_note',
|
|
'created_by',
|
|
'updated_by',
|
|
];
|
|
|
|
public function equipment(): BelongsTo
|
|
{
|
|
return $this->belongsTo(Equipment::class, 'equipment_id');
|
|
}
|
|
|
|
public function inspector(): BelongsTo
|
|
{
|
|
return $this->belongsTo(\App\Models\Members\User::class, 'inspector_id');
|
|
}
|
|
|
|
public function details(): HasMany
|
|
{
|
|
return $this->hasMany(EquipmentInspectionDetail::class, 'inspection_id');
|
|
}
|
|
}
|