<?php

namespace App\Models;

use App\Concerns\HasTranslations;
use Illuminate\Database\Eloquent\Model;

class Footer extends Model
{
    use HasTranslations;

    protected $table = 'footer';

    protected $primaryKey = 'ftr_id';

    protected string $columnPrefix = 'ftr';

    const CREATED_AT = 'ftr_created_at';

    const UPDATED_AT = 'ftr_updated_at';

    protected $fillable = [
        'ftr_tagline_fr', 'ftr_tagline_en', 'ftr_localisation_fr', 'ftr_localisation_en',
        'ftr_copyright_fr', 'ftr_copyright_en', 'ftr_site_url',
    ];

    public static function singleton(): self
    {
        return static::query()->firstOrNew([], ['ftr_id' => 1]);
    }
}
