2026-01-27 11:31:02 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
|
|
|
|
|
class DocumentTemplateColumn extends Model
|
|
|
|
|
{
|
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
|
|
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');
|
|
|
|
|
}
|
2026-02-25 11:45:01 +09:00
|
|
|
}
|