<?php

namespace App\Models;

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

class CertificateTemplate extends Model
{
    use HasFactory;

    protected $fillable = [
        'template_name', 'template_file', 'file_type', 'page_size', 'orientation',
        'name_position_x', 'name_position_y', 'name_width', 'name_font',
        'name_font_size', 'name_font_color', 'name_alignment', 'name_text_transform',
        'is_active', 'settings_json',
    ];

    protected function casts(): array
    {
        return [
            'is_active' => 'boolean',
            'settings_json' => 'array',
        ];
    }
}
