Files
sam-api/app/Models/Documents/DocumentTemplateColumn.php
권혁성 fb06975d97 feat:문서관리 Phase 4.1 - DocumentTemplate API + 결재 워크플로우 활성화
- DocumentTemplate 모델 6개 생성 (Template, ApprovalLine, BasicField, Section, SectionItem, Column)
- DocumentTemplateService (list/show) + DocumentTemplateController (index/show)
- GET /v1/document-templates, GET /v1/document-templates/{id} 라우트
- DocumentTemplateApi.php Swagger (7개 스키마, 2개 엔드포인트)
- Document 결재 워크플로우 4개 엔드포인트 활성화 (submit/approve/reject/cancel)
- ApproveRequest, RejectRequest FormRequest 생성
- DocumentApi.php Swagger에 결재 엔드포인트 4개 추가
- Document.template() 참조 경로 수정 (DocumentTemplate → Documents 네임스페이스)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 09:39:55 +09:00

44 lines
1.1 KiB
PHP

<?php
namespace App\Models\Documents;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 문서 양식 테이블 컬럼 모델
*
* @property int $id
* @property int $template_id
* @property string $label 컬럼 라벨
* @property string|null $width 컬럼 너비
* @property string $column_type 컬럼 타입 (text/check/complex/select/measurement)
* @property string|null $group_name 그룹명
* @property array|null $sub_labels 하위 라벨 (complex 타입)
* @property int $sort_order 정렬 순서
*/
class DocumentTemplateColumn extends Model
{
protected $table = 'document_template_columns';
protected $fillable = [
'template_id',
'label',
'width',
'column_type',
'group_name',
'sub_labels',
'sort_order',
];
protected $casts = [
'sub_labels' => 'array',
'sort_order' => 'integer',
];
public function template(): BelongsTo
{
return $this->belongsTo(DocumentTemplate::class, 'template_id');
}
}