<?php
 namespace VnChocola\Model;
 use TCMS\Model;
 use TCMS\FieldModel;
 use FIELD_DATA_TYPE;
 class NotificationModel extends Model {
 public $tableName = 'Notifications';
 public $timestamp = true;
 public function registerField() {
 $this->addField('id', FIELD_DATA_TYPE::INTEGER);
 $this->addField('staffID', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('key', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('content', FIELD_DATA_TYPE::TEXT, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('status', FIELD_DATA_TYPE::BOOLEAN, function(FieldModel $field) {
 $field->required = true;
 $field->defaultValue = false;
 }
);
 $this->addField('created_at', FIELD_DATA_TYPE::DATETIME,function(FieldModel $field){
 $this->require = true;
 $field->format = lang('time.dateFormat');
 $field->autoFormat = true;
 $field->defaultValue = date('Y-m-d H:i:s');
 }
);
 }
 }
