74 lines
1.8 KiB
PHP
74 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace app\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "{{%user_logout_review}}".
|
|
*
|
|
* @property int $id
|
|
* @property int $user_id 用户id
|
|
* @property int|null $status 状态0待审核1已注销2驳回
|
|
* @property int|null $status_time 审核时间
|
|
* @property string|null $content 内容
|
|
* @property int|null $is_delete
|
|
* @property int|null $created_at 申请时间
|
|
* @property int|null $updated_at
|
|
*/
|
|
class UserLogoutReview extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return '{{%user_logout_review}}';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['user_id'], 'required'],
|
|
[['user_id', 'status', 'status_time', 'is_delete', 'created_at', 'updated_at'], 'integer'],
|
|
[['content'], 'string'],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'user_id' => '用户id',
|
|
'status' => '状态0待审核1已注销2驳回',
|
|
'status_time' => '审核时间',
|
|
'content' => '内容',
|
|
'is_delete' => 'Is Delete',
|
|
'created_at' => '申请时间',
|
|
'updated_at' => 'Updated At',
|
|
];
|
|
}
|
|
|
|
public static function getStatus($status)
|
|
{
|
|
$labels = self::statusLabels();
|
|
return isset($labels[$status]) ? $labels[$status] : "未知";
|
|
}
|
|
|
|
public static function statusLabels()
|
|
{
|
|
return [
|
|
'0' => '待审核',
|
|
'1' => '已注销',
|
|
'2' => '已驳回',
|
|
'3' => '用户撤销',
|
|
];
|
|
}
|
|
}
|