<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class TemplateVariable extends Model
{
    use HasFactory;

    protected $fillable = ['key', 'value', 'description'];

    public function sections()
    {
        return $this->belongsToMany(TemplateSection::class, 'section_variable', 'template_variable_id', 'template_section_id')
                    ->withTimestamps();
    }
}
