fix mobileapi login
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace common\models;
|
||||
|
||||
use Yii;
|
||||
use yii\behaviors\TimestampBehavior;
|
||||
use yii\helpers\ArrayHelper;
|
||||
|
||||
/**
|
||||
* This is the model class for table "virtual_key".
|
||||
@@ -44,14 +46,25 @@ class VirtualKey extends \yii\db\ActiveRecord
|
||||
public function attributeLabels()
|
||||
{
|
||||
return [
|
||||
'id' => Yii::t('common/mobiledevice', 'ID'),
|
||||
'id_card' => Yii::t('common/mobiledevice', 'Id Card'),
|
||||
'id_key' => Yii::t('common/mobiledevice', 'Id Key'),
|
||||
'valid_until' => Yii::t('common/mobiledevice', 'Valid Until'),
|
||||
'direction_in_at' => Yii::t('common/mobiledevice', 'Direction In At'),
|
||||
'direction_out_at' => Yii::t('common/mobiledevice', 'Direction Out At'),
|
||||
'created_at' => Yii::t('common/mobiledevice', 'Created At'),
|
||||
'updated_at' => Yii::t('common/mobiledevice', 'Updated At'),
|
||||
'id' => Yii::t('common/virtualkey', 'ID'),
|
||||
'id_card' => Yii::t('common/virtualkey', 'Id Card'),
|
||||
'id_key' => Yii::t('common/virtualkey', 'Id Key'),
|
||||
'valid_until' => Yii::t('common/virtualkey', 'Valid Until'),
|
||||
'direction_in_at' => Yii::t('common/virtualkey', 'Direction In At'),
|
||||
'direction_out_at' => Yii::t('common/virtualkey', 'Direction Out At'),
|
||||
'created_at' => Yii::t('common/virtualkey', 'Created At'),
|
||||
'updated_at' => Yii::t('common/virtualkey', 'Updated At'),
|
||||
];
|
||||
}
|
||||
|
||||
public function behaviors()
|
||||
{
|
||||
return ArrayHelper::merge( [
|
||||
[
|
||||
'class' => TimestampBehavior::className(),
|
||||
'value' => function(){ return date('Y-m-d H:i:s' ); }
|
||||
]
|
||||
],
|
||||
parent::behaviors());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user