<?php
 namespace VnChocola\Model;
 use TCMS\Model;
 use TCMS\FieldModel;
 use FIELD_DATA_TYPE;
 class FloorManagerSettingModel extends Model {
 public $tableName = 'FloorManagerSetting';
 public function registerField() {
 $this->addField('id', FIELD_DATA_TYPE::STRING);
 $this->addField('storeID', FIELD_DATA_TYPE::STRING);
 $this->addField('drinking_time', FIELD_DATA_TYPE::INTEGER, function(FieldModel $field) {
 $field->displayName = lang('floor_manager_setting.drinking_time');
 $field->required = true;
 $field->defaultValue = 30;
 }
);
 $this->addField('water_inviting_time', FIELD_DATA_TYPE::INTEGER, function(FieldModel $field) {
 $field->displayName = lang('floor_manager_setting.water_inviting_time');
 $field->required = true;
 $field->defaultValue = 5;
 }
);
 $this->addField('waiting_time', FIELD_DATA_TYPE::INTEGER, function(FieldModel $field) {
 $field->displayName = lang('floor_manager_setting.waiting_time');
 $field->required = true;
 $field->defaultValue = 60;
 }
);
 $this->addField('email_senders', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->defaultValue = '';
 $field->displayName = lang('floor_manager_setting.email_senders');
 }
);
 $this->addField('email_title', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->defaultValue = '';
 $field->displayName = lang('floor_manager_setting.email_title');
 }
);
 $this->addField('email_body', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->displayName = lang('floor_manager_setting.email_body');
 $field->defaultValue = '';
 $field->extension = 'editor';
 $field->extensionOption = [ 'height' => '200px', 'visible' => false ];
 $field->validate = [ 'max' => 1024 ];
 }
);
 $this->addField('floor_size', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 }
);
 }
 }
