<?php
 namespace VnChocola\Model;
 use TCMS\Model;
 use TCMS\FieldModel;
 use FIELD_DATA_TYPE;
 class MessageModel extends Model {
 public $tableName = 'Message';
 public function registerField() {
 $this->addField('id', FIELD_DATA_TYPE::INTEGER);
 $this->addField('title', FIELD_DATA_TYPE::STRING);
 $this->addField('content', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('email', FIELD_DATA_TYPE::STRING);
 $this->addField('phone', FIELD_DATA_TYPE::STRING);
 $this->addField('type', FIELD_DATA_TYPE::INTEGER, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('customerID', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('userID', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('status', FIELD_DATA_TYPE::INTEGER, function(FieldModel $field) {
 $field->required = true;
 }
);
 }
 }
