<?php

namespace App\Models;

use CodeIgniter\Model;

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

    // 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",
        "name",
        "code",
        "state_sale",
        "state_purchase",
        "code_fe",
        "cash_payment",
        "due_payment",
        "commision_value",
        "commision_ledger_id",
        "retefuente_value",
        "retefuente_ledger_id",
        "reteiva_value",
        "reteiva_ledger_id",
        "reteica_value",
        "reteica_ledger_id",
        "supplier_id",
        "icon",
        "biller_accountant_parametrization",
        "billers",
        "last_update",
    ];
    
    
    
}
