<?php

namespace App\Models\Contact;

use App\Trait\HasSlug;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

class Template extends Model {
    protected $table = 'templates';
    protected $fillable = ['category_id', 'slug', 'title', 'subject', 'content', 'type'];

    use HasSlug;

    public function category(): BelongsTo {
        return $this->belongsTo(ContactCategory::class);
    }
}
