fix tính năng luôn mở , luôn đóng

This commit is contained in:
2020-11-02 16:45:33 +07:00
parent e4a665dd2e
commit 4cae8b3cb4
5 changed files with 39 additions and 25 deletions

View File

@@ -12,6 +12,8 @@ use Yii;
* @property string $name
* @property int $code
* @property int $duration
* @property int $always_open
* @property int $always_close
* @property int $created_at
* @property int $modified_at
*/
@@ -30,7 +32,7 @@ class Door extends \yii\db\ActiveRecord {
public function rules() {
return [
[['device_id', 'name', 'code'], 'required'],
[['device_id', 'code', 'created_at', 'modified_at', 'duration'], 'integer'],
[['device_id', 'code', 'created_at', 'modified_at', 'duration', 'always_open', 'always_close'], 'integer'],
[['name'], 'string', 'max' => 100],
];
}