<?php
 namespace VnChocola\Model;
 use TCMS\Model;
 use TCMS\FieldModel;
 use FIELD_DATA_TYPE;
 class WorkContentsModel extends Model {
 public $tableName = 'Work_Contents';
 public $timestamp = true;
 public function registerField() {
 $this->addField('id', FIELD_DATA_TYPE::STRING);
 $this->addField('wDate', FIELD_DATA_TYPE::DATE, function(FieldModel $field) {
 $field->required = true;
 $field->format = lang('time.dateFormat');
 $field->autoFormat = true;
 }
);
 $this->addField('wStaffID', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('wCode_workID', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('HotCustomerID', FIELD_DATA_TYPE::STRING, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('wIsCheck', FIELD_DATA_TYPE::BOOLEAN, function(FieldModel $field) {
 $field->required = true;
 }
);
 $this->addField('wNote', FIELD_DATA_TYPE::STRING);
 $this->addField("nextContactDate",FIELD_DATA_TYPE::DATE,function(FieldModel $field){
 $field->format = lang('time.dateFormat');
 $field->autoFormat = true;
 }
);
 $this->addField("nextPlan",FIELD_DATA_TYPE::STRING);
 }
 }
