<?php

namespace App\Models;

use CodeIgniter\Model;

class ModelLogin extends Model
{
    protected $table = 'tb_guru';

    protected $primaryKey = 'id_guru';

    protected $allowedFields = [
        'nip',
        'nama',
        'password',
        'role'
    ];

    public function login($nip)
    {
        return $this->where('nip', $nip)->first();
    }
}
