Files
sam-manage/app/Models/DocumentTemplateLinkValue.php

36 lines
729 B
PHP
Raw Normal View History

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
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');
}
}