<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CertificateTemplate extends Model
{
    protected $fillable = ['competition_id', 'title', 'background_path', 'custom_fields', 'style'];

    protected $casts = [
        'custom_fields' => 'array',
        'style' => 'array',
    ];

    public function competition()
    {
        return $this->belongsTo(Competition::class);
    }
}
