<?php

namespace App\Models;

use CodeIgniter\Model;

class PengaturanModel extends Model
{
    protected $table      = 'pengaturan';

    protected $primaryKey = 'id';

    protected $returnType = 'array';


    protected $allowedFields = [

        // =====================
        // INFORMASI SEKOLAH
        // =====================

        'nama_perpustakaan',
        'nama_sekolah',
        'deskripsi',
        'alamat',
        'telepon',
        'email',
        'website',
        'logo',
        'favicon',


        // =====================
        // ATURAN PEMINJAMAN
        // =====================

        'lama_pinjam',
        'maksimal_buku',
        'denda_perhari',


        // =====================
        // CETAK
        // =====================

        'ukuran_kertas',
        'footer_cetak',

    ];



    // otomatis isi created_at dan updated_at
    protected $useTimestamps = true;


    protected $createdField = 'created_at';

    protected $updatedField = 'updated_at';
}