59 lines
1.4 KiB
PHP
59 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace common\modelsgii;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "yii2_admin_access_token".
|
|
*
|
|
* @property int $id
|
|
* @property string|null $access_token 授权令牌
|
|
* @property int|null $admin_id admin用户id
|
|
* @property string|null $group 组别
|
|
* @property int|null $status 状态[-1:删除;0:禁用;1启用]
|
|
* @property int|null $expired_at 过期时间
|
|
* @property int|null $created_at 创建时间
|
|
* @property int|null $updated_at 修改时间
|
|
*/
|
|
class AdminAccessToken extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return '{{%admin_access_token}}';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['admin_id', 'status', 'expired_at', 'created_at', 'updated_at'], 'integer'],
|
|
[['access_token'], 'string', 'max' => 60],
|
|
[['group'], 'string', 'max' => 100],
|
|
[['access_token'], 'unique'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'access_token' => 'Access Token',
|
|
'admin_id' => 'Admin ID',
|
|
'group' => 'Group',
|
|
'status' => 'Status',
|
|
'expired_at' => 'Expired At',
|
|
'created_at' => 'Created At',
|
|
'updated_at' => 'Updated At',
|
|
];
|
|
}
|
|
}
|