<?php

namespace App\Models;

use CodeIgniter\Model;

class SmaDocumentsTypesModel extends Model
{
    public function __construct(String $DBGroup = 'default')
    {   
        $this->DBGroup = $DBGroup;
        parent::__construct();
    }
    protected $DBGroup              = 'default';
    protected $table                = 'sma_documents_types';
    protected $primaryKey           = 'id';
    protected $useAutoIncrement     = true;
    protected $insertID             = 0;
    protected $returnType           = 'array';
    protected $useSoftDeletes       = false;
    protected $protectFields        = true;
    protected $allowedFields        = [
        'sales_consecutive'
    ];

    // Dates
    protected $useTimestamps        = false;
    protected $dateFormat           = 'datetime';
    protected $createdField         = 'created_at';
    protected $updatedField         = 'updated_at';
    protected $deletedField         = 'deleted_at';

    // Validation
    protected $validationRules      = [];
    protected $validationMessages   = [];
    protected $skipValidation       = false;
    protected $cleanValidationRules = true;

    // Callbacks
    protected $allowCallbacks       = true;
    protected $beforeInsert         = [];
    protected $afterInsert          = [];
    protected $beforeUpdate         = [];
    protected $afterUpdate          = [];
    protected $beforeFind           = [];
    protected $afterFind            = [];
    protected $beforeDelete         = [];
    protected $afterDelete          = [];

    protected $allowedFieldsToApp       = [
        "id",
        "module",
        "nombre",
        "factura_electronica",
        "factura_contingencia",
        "num_resolucion",
        "palabra_resolucion",
        "sales_prefix",
        "sales_consecutive",
        "inicio_resolucion",
        "fin_resolucion",
        "emision_resolucion",
        "vencimiento_resolucion",
        "clave_tecnica",
        "fe_work_environment",
        "fe_testid",
        "invoice_footer",
        "key_log",
        "module_invoice_format_id",
        "save_resolution_in_sale",
        "word_type_sale",
        "fe_transaction_id",
        "not_accounting",
        "invoice_header",
        "add_consecutive_left_zeros",
        "last_update",


    ];

    
}
