<?php

namespace App\Models;

use CodeIgniter\Model;

class DepartamentoModel extends Model
{
    protected $table            = 'departamento';
    protected $primaryKey       = 'iddepartamento';


    function getDepartamentos()
    {
        return $this->select(['iddepartamento', 'nombre'])
            ->where('status', '1')
            ->orderBy('nombre')
            ->findAll();
    }
}
