18
18
* @property string $key
19
19
* @property string $value
20
20
* @property bool $status
21
+ * @property string $description
21
22
* @property string $createdAt
22
23
* @property string $updatedAt
23
24
*/
@@ -40,10 +41,10 @@ public function rules()
40
41
[['section ' , 'key ' , 'value ' ], 'required ' ],
41
42
[['section ' , 'key ' ], 'unique ' , 'targetAttribute ' => ['section ' , 'key ' ]],
42
43
[['value ' , 'type ' ], 'string ' ],
43
- [['section ' , 'key ' ], 'string ' , 'max ' => 255 ],
44
+ [['section ' , 'key ' , ' description ' ], 'string ' , 'max ' => 255 ],
44
45
[['status ' ], 'integer ' ],
45
46
['status ' , 'default ' , 'value ' => SettingStatus::ACTIVE ],
46
- ['status ' , 'in ' , 'range ' => [ SettingStatus::ACTIVE , SettingStatus:: INACTIVE ] ],
47
+ ['status ' , 'in ' , 'range ' => SettingStatus::getConstantsByName () ],
47
48
[['type ' ], 'safe ' ],
48
49
];
49
50
}
@@ -60,6 +61,7 @@ public function attributeLabels()
60
61
'key ' => Yii::t ('yii2mod.settings ' , 'Key ' ),
61
62
'value ' => Yii::t ('yii2mod.settings ' , 'Value ' ),
62
63
'status ' => Yii::t ('yii2mod.settings ' , 'Status ' ),
64
+ 'description ' => Yii::t ('yii2mod.settings ' , 'Description ' ),
63
65
'createdAt ' => Yii::t ('yii2mod.settings ' , 'Created date ' ),
64
66
'updatedAt ' => Yii::t ('yii2mod.settings ' , 'Updated date ' ),
65
67
];
0 commit comments