_table = 'integral_rule'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id', "title", //varchar(255) DEFAULT NULL COMMENT '规则名', "shopId", //int(10) DEFAULT '0' COMMENT '商铺id', "amount", //decimal(10,2) DEFAULT '0.00' COMMENT '每满足金额', "integral", //decimal(10,2) DEFAULT '0.00' COMMENT '奖励积分', "goods", //json DEFAULT NULL COMMENT '商品数据', "integralTotal", //decimal(10,2) DEFAULT '0.00' COMMENT '累计发放积分', "enableStatus", //tinyint(1) DEFAULT '5' COMMENT '启用状态 4:失效 5:正常', "deleteStatus", //tinyint(1) DEFAULT NULL COMMENT '删除状态 4:删除 5:正常', "createTime", //int(11) DEFAULT NULL COMMENT '创建时间', "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间', "extend", //json DEFAULT NULL COMMENT '扩展字段', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }