<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use DB;
class User extends Model implements AuthenticatableContract
{
protected $table = 'user';
protected $primarykey = 'id';
public $timestamps = false;
protected $fillable = ['user_name', 'password', 'user_phone', 'user_email', 'user_role_id', 'user_avart', 'user_sex', 'user_age', 'user_birthday', 'last_login_ip', 'last_login_time', 'is_disabled', 'remember_token'];
/**
* Get the unique identifier for the user.
*
* @return mixed
*/
public function getAuthIdentifier(){
return $this->getKey();
}
/**
* Get the password for the user.
*
* @return string
*/
public function getAuthPassword(){
return $this->password;
}
/**
* Get the token value for the "remember me" session.
*
* @return string
*/
public function getRememberToken()
{
return $this->{$this->getRememberTokenName()};
}
/**
* Set the token value for the "remember me" session.
*
* @param string $value
* @return void
*/
public function setRememberToken($value)
{
$this->{$this->getRememberTokenName()} = $value;
}
/**
* Get the column name for the "remember me" token.
*
* @return string
*/
public function getRememberTokenName()
{
return 'remember_token';
}
}