55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "key".
|
|
*
|
|
* @property integer $id_key
|
|
* @property string $number
|
|
* @property integer $status
|
|
* @property integer $type
|
|
* @property string $created_at
|
|
* @property string $updated_at
|
|
*/
|
|
class Key extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'key';
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['status', 'type'], 'integer'],
|
|
[['created_at', 'updated_at'], 'required'],
|
|
[['created_at', 'updated_at'], 'safe'],
|
|
[['number'], 'string', 'max' => 255]
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @inheritdoc
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id_key' => Yii::t('common/key', 'Id Key'),
|
|
'number' => Yii::t('common/key', 'Number'),
|
|
'status' => Yii::t('common/key', 'Status'),
|
|
'type' => Yii::t('common/key', 'Type'),
|
|
'created_at' => Yii::t('common/key', 'Created At'),
|
|
'updated_at' => Yii::t('common/key', 'Updated At'),
|
|
];
|
|
}
|
|
}
|