72 lines
1.3 KiB
PHP
72 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
|
use Illuminate\Notifications\Notifiable;
|
|
|
|
class User extends Authenticatable
|
|
{
|
|
use HasFactory, Notifiable;
|
|
|
|
const ROLE_MEMBER = 0;
|
|
const ROLE_ADMIN = 1;
|
|
|
|
const STATUS_INACTIVE = 0;
|
|
const STATUS_ACTIVE = 1;
|
|
|
|
const FLAG_SEND_DISABLED = 0;
|
|
const FLAG_SEND_ENABLED = 1;
|
|
|
|
const FIRST_LOGIN_FALSE = 0;
|
|
const FIRST_LOGIN_TRUE = 1;
|
|
|
|
|
|
protected $table = 'user';
|
|
public $timestamps = false;
|
|
protected $primaryKey = 'msnv';
|
|
public $incrementing = false;
|
|
protected $keyType = 'string';
|
|
|
|
protected $fillable = [
|
|
'msnv',
|
|
'mail',
|
|
'pass',
|
|
'role',
|
|
'status',
|
|
'card',
|
|
'flag_send',
|
|
'first_login',
|
|
];
|
|
|
|
protected $hidden = [
|
|
'pass',
|
|
];
|
|
|
|
/**
|
|
* Get the password for the user.
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getAuthPassword()
|
|
{
|
|
return $this->pass;
|
|
}
|
|
|
|
// Disable remember token support in database
|
|
public function getRememberToken()
|
|
{
|
|
return null;
|
|
}
|
|
|
|
public function setRememberToken($value)
|
|
{
|
|
}
|
|
|
|
public function getRememberTokenName()
|
|
{
|
|
return '';
|
|
}
|
|
}
|