generate models mobile_device & virtual_key
This commit is contained in:
parent
cfa1d237c5
commit
d6caffb11c
57
common/models/MobileDevice.php
Normal file
57
common/models/MobileDevice.php
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace common\models;
|
||||||
|
|
||||||
|
use Yii;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the model class for table "mobile_device".
|
||||||
|
*
|
||||||
|
* @property integer $id
|
||||||
|
* @property integer $id_card
|
||||||
|
* @property string $status
|
||||||
|
* @property string $device_identifier
|
||||||
|
* @property string $activated_at
|
||||||
|
* @property string $created_at
|
||||||
|
* @property string $updated_at
|
||||||
|
*/
|
||||||
|
class MobileDevice extends \yii\db\ActiveRecord
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public static function tableName()
|
||||||
|
{
|
||||||
|
return 'mobile_device';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[['id_card'], 'integer'],
|
||||||
|
[['activated_at', 'created_at', 'updated_at'], 'safe'],
|
||||||
|
[['created_at', 'updated_at'], 'required'],
|
||||||
|
[['status'], 'string', 'max' => 20],
|
||||||
|
[['device_identifier'], 'string', 'max' => 255]
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function attributeLabels()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'id' => Yii::t('common/mobiledevice', 'ID'),
|
||||||
|
'id_card' => Yii::t('common/mobiledevice', 'Id Card'),
|
||||||
|
'status' => Yii::t('common/mobiledevice', 'Status'),
|
||||||
|
'device_identifier' => Yii::t('common/mobiledevice', 'Device Identifier'),
|
||||||
|
'activated_at' => Yii::t('common/mobiledevice', 'Activated At'),
|
||||||
|
'created_at' => Yii::t('common/mobiledevice', 'Created At'),
|
||||||
|
'updated_at' => Yii::t('common/mobiledevice', 'Updated At'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
57
common/models/VirtualKey.php
Normal file
57
common/models/VirtualKey.php
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace common\models;
|
||||||
|
|
||||||
|
use Yii;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is the model class for table "virtual_key".
|
||||||
|
*
|
||||||
|
* @property integer $id
|
||||||
|
* @property integer $id_card
|
||||||
|
* @property integer $id_key
|
||||||
|
* @property string $valid_until
|
||||||
|
* @property string $direction_in_at
|
||||||
|
* @property string $direction_out_at
|
||||||
|
* @property string $created_at
|
||||||
|
* @property string $updated_at
|
||||||
|
*/
|
||||||
|
class VirtualKey extends \yii\db\ActiveRecord
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public static function tableName()
|
||||||
|
{
|
||||||
|
return 'virtual_key';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
public function rules()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
[['id_card', 'id_key'], 'integer'],
|
||||||
|
[['valid_until', 'created_at', 'updated_at'], 'required'],
|
||||||
|
[['valid_until', 'direction_in_at', 'direction_out_at', 'created_at', 'updated_at'], 'safe']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
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'),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user