45 lines
1.0 KiB
PHP
45 lines
1.0 KiB
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\Documents;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 문서 양식 섹션 검사항목 모델
|
||
|
|
*
|
||
|
|
* @property int $id
|
||
|
|
* @property int $section_id
|
||
|
|
* @property string|null $category 항목 분류
|
||
|
|
* @property string $item 검사항목
|
||
|
|
* @property string|null $standard 검사기준
|
||
|
|
* @property string|null $method 검사방식
|
||
|
|
* @property string|null $frequency 검사주기
|
||
|
|
* @property string|null $regulation 관련 규격
|
||
|
|
* @property int $sort_order 정렬 순서
|
||
|
|
*/
|
||
|
|
class DocumentTemplateSectionItem extends Model
|
||
|
|
{
|
||
|
|
protected $table = 'document_template_section_items';
|
||
|
|
|
||
|
|
protected $fillable = [
|
||
|
|
'section_id',
|
||
|
|
'category',
|
||
|
|
'item',
|
||
|
|
'standard',
|
||
|
|
'method',
|
||
|
|
'frequency',
|
||
|
|
'regulation',
|
||
|
|
'sort_order',
|
||
|
|
];
|
||
|
|
|
||
|
|
protected $casts = [
|
||
|
|
'sort_order' => 'integer',
|
||
|
|
];
|
||
|
|
|
||
|
|
public function section(): BelongsTo
|
||
|
|
{
|
||
|
|
return $this->belongsTo(DocumentTemplateSection::class, 'section_id');
|
||
|
|
}
|
||
|
|
}
|