add key crud
This commit is contained in:
54
common/models/Key.php
Normal file
54
common/models/Key.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?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'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user