2026-02-03 18:59:12 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2026-02-10 08:35:57 +09:00
|
|
|
use App\Models\Documents\DocumentTemplate;
|
2026-02-03 18:59:12 +09:00
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
|
|
class ProcessStep extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'process_id',
|
|
|
|
|
'step_code',
|
|
|
|
|
'step_name',
|
|
|
|
|
'is_required',
|
|
|
|
|
'needs_approval',
|
|
|
|
|
'needs_inspection',
|
2026-02-10 08:35:57 +09:00
|
|
|
'document_template_id',
|
2026-02-03 18:59:12 +09:00
|
|
|
'is_active',
|
|
|
|
|
'sort_order',
|
|
|
|
|
'connection_type',
|
|
|
|
|
'connection_target',
|
|
|
|
|
'completion_type',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected $casts = [
|
|
|
|
|
'is_required' => 'boolean',
|
|
|
|
|
'needs_approval' => 'boolean',
|
|
|
|
|
'needs_inspection' => 'boolean',
|
|
|
|
|
'is_active' => 'boolean',
|
|
|
|
|
'sort_order' => 'integer',
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 공정
|
|
|
|
|
*/
|
|
|
|
|
public function process(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(Process::class);
|
|
|
|
|
}
|
2026-02-10 08:35:57 +09:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 문서 양식 (검사 시 사용할 템플릿)
|
|
|
|
|
*/
|
|
|
|
|
public function documentTemplate(): BelongsTo
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(DocumentTemplate::class);
|
|
|
|
|
}
|
2026-02-03 18:59:12 +09:00
|
|
|
}
|