<?php

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;

class User extends Authenticatable
{

    use  Notifiable;
    protected $connection = 'mai2'; 
    protected $table = 'tuser';

    protected $primaryKey = 'id'; 
    public $incrementing = false;     
    protected $keyType = 'string';

    public $timestamps = false;

    protected $fillable = [
        'userid',
        'pass',
        'lev',
        'tin',
        'super',
        'sta',
        'no_hp',
        'email',
    ];

    protected $hidden = [
        'pass',
    ];

    // 🔥 mapping password Laravel ke kolom 'pass'
    public function getAuthPassword()
    {
        return $this->pass;
    }

    
}