150 行
3.4 KiB
PHP
150 行
3.4 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
* Date: Wed, 24 Jan 2018 17:18:07 +0900.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Reliese\Database\Eloquent\Model as Eloquent;
|
|
use Tymon\JWTAuth\Contracts\JWTSubject;
|
|
|
|
/**
|
|
* Class ForUser
|
|
*
|
|
* @property int $id
|
|
* @property string $username
|
|
* @property string $password
|
|
* @property string $salt
|
|
* @property int $group
|
|
* @property int $perm_id
|
|
* @property string $member_title
|
|
* @property int $permission_id
|
|
* @property int $total_posts
|
|
* @property int $total_threads
|
|
* @property int $reg_date
|
|
* @property int $last_post_date
|
|
* @property int $last_post_location
|
|
* @property string $email
|
|
* @property string $website_address
|
|
* @property string $website_name
|
|
* @property int $gender
|
|
* @property string $location
|
|
* @property int $birthday
|
|
* @property string $bio
|
|
* @property string $ip_address
|
|
* @property string $avatar
|
|
* @property int $ontime
|
|
* @property int $ostatus
|
|
* @property string $header
|
|
* @property string $footer
|
|
* @property int $strikes
|
|
* @property string $name_colour
|
|
* @property int $permission_access
|
|
* @property string $display_name
|
|
* @property string $yt_channel
|
|
* @property string $country
|
|
* @property int $usr_per_id
|
|
* @property int $blg_per_id
|
|
* @property int $for_per_id
|
|
* @property int $sbx_per_id
|
|
* @property int $str_per_id
|
|
* @property int $doc_per_id
|
|
* @property int $odb_per_id
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class ForUser extends Eloquent
|
|
{
|
|
/**
|
|
* Get the identifier that will be stored in the subject claim of the JWT.
|
|
*
|
|
* @return mixed
|
|
*/
|
|
public function getJWTIdentifier() {
|
|
return $this->getKey(); // Eloquent Model method
|
|
}
|
|
|
|
/**
|
|
* Return a key value array, containing any custom claims to be added to the JWT.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function getJWTCustomClaims() {
|
|
return [];
|
|
}
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $casts = [
|
|
'group' => 'int',
|
|
'perm_id' => 'int',
|
|
'permission_id' => 'int',
|
|
'total_posts' => 'int',
|
|
'total_threads' => 'int',
|
|
'reg_date' => 'int',
|
|
'last_post_date' => 'int',
|
|
'last_post_location' => 'int',
|
|
'gender' => 'int',
|
|
'birthday' => 'int',
|
|
'ontime' => 'int',
|
|
'ostatus' => 'int',
|
|
'strikes' => 'int',
|
|
'permission_access' => 'int',
|
|
'usr_per_id' => 'int',
|
|
'blg_per_id' => 'int',
|
|
'for_per_id' => 'int',
|
|
'sbx_per_id' => 'int',
|
|
'str_per_id' => 'int',
|
|
'doc_per_id' => 'int',
|
|
'odb_per_id' => 'int'
|
|
];
|
|
|
|
protected $hidden = [
|
|
'password',
|
|
'salt'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'username',
|
|
'password',
|
|
'salt',
|
|
'group',
|
|
'perm_id',
|
|
'member_title',
|
|
'permission_id',
|
|
'total_posts',
|
|
'total_threads',
|
|
'reg_date',
|
|
'last_post_date',
|
|
'last_post_location',
|
|
'email',
|
|
'website_address',
|
|
'website_name',
|
|
'gender',
|
|
'location',
|
|
'birthday',
|
|
'bio',
|
|
'ip_address',
|
|
'avatar',
|
|
'ontime',
|
|
'ostatus',
|
|
'header',
|
|
'footer',
|
|
'strikes',
|
|
'name_colour',
|
|
'permission_access',
|
|
'display_name',
|
|
'yt_channel',
|
|
'country',
|
|
'usr_per_id',
|
|
'blg_per_id',
|
|
'for_per_id',
|
|
'sbx_per_id',
|
|
'str_per_id',
|
|
'doc_per_id',
|
|
'odb_per_id'
|
|
];
|
|
}
|