<?php

namespace App\Models;

use CodeIgniter\Model;

class StudentCardSettingModel extends Model
{
    protected $table            = 'student_card_settings';
    protected $primaryKey       = 'id';
    protected $useAutoIncrement = true;
    protected $returnType       = 'array';
    protected $useSoftDeletes   = false;
    protected $allowedFields    = [
        'front_background', 'back_background', 'school_stamp',
        'headmaster_signature', 'card_validity', 'show_qrcode',
        'card_date', 'motto',
    ];

    protected $useTimestamps = true;
    protected $createdField  = 'created_at';
    protected $updatedField  = 'updated_at';

    public function getSettings()
    {
        return $this->first();
    }
}