<?php

namespace Mtc\Modules\BlockRegistry\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class BlockTemplateAssignment extends Model
{
    protected $table = 'block_template_assignments';

    protected $fillable = [
        'block_template_id',
        'template_name',
    ];

    protected $casts = [
        'block_template_id' => 'integer',
    ];

    public function blockTemplate(): BelongsTo
    {
        return $this->belongsTo(BlockTemplate::class, 'block_template_id');
    }
}
