Files
sam-api/app/Models/Documents/DocumentTemplateLinkValue.php

39 lines
828 B
PHP
Raw Permalink Normal View History

<?php
namespace App\Models\Documents;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 템플릿 레벨 연결 (기존 linked_item_ids/linked_process_id 대체)
*/
class DocumentTemplateLinkValue extends Model
{
protected $table = 'document_template_link_values';
public $timestamps = false;
protected $fillable = [
'template_id',
'link_id',
'linkable_id',
'sort_order',
'created_at',
];
protected $casts = [
'sort_order' => 'integer',
];
public function template(): BelongsTo
{
return $this->belongsTo(DocumentTemplate::class, 'template_id');
}
public function link(): BelongsTo
{
return $this->belongsTo(DocumentTemplateLink::class, 'link_id');
}
}