<?php
namespace App\Models\Tarifas;

class TarifaEncuadernacionDimensionesModel extends \App\Models\GoBaseModel
{
    protected $table = "tarifa_encuadernacion_dimensiones";

    /**
     * Whether primary key uses auto increment.
     *
     * @var bool
     */
    protected $useAutoIncrement = true;

    protected $allowedFields = [

    ];
    protected $returnType = "App\Entities\Tarifas\TarifaEncuadernacionDimensionesEntity";

    public static $labelField = "descripcion";

    protected $validationRules = [
        
    ];

    protected $validationMessages = [
        
    ];

    /**
     * Get resource data.
     *
     * @param string $search
     *
     * @return \CodeIgniter\Database\BaseBuilder
     */
    public function getDimensiones(){

        $builder = $this->db
        ->table($this->table . " t1")
        ->select("t1.id AS value, t1.keyword AS label")
        ->orderBy('t1.id', 'asc');

        return $builder->get()->getResultObject();
    }
}
