_table = 'commission_grade'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '分销商等级设置表', "enterpriseId", //int(10) DEFAULT NULL COMMENT '企业id', "name", //varchar(255) DEFAULT NULL COMMENT '等级名称', "grade", //int(10) DEFAULT NULL COMMENT '等级', "oneRate", //decimal(8,2) DEFAULT NULL COMMENT '一级佣金比例', "twoRate", //decimal(8,2) DEFAULT NULL COMMENT '二级佣金比例', "threeRate", //decimal(8,2) DEFAULT NULL COMMENT '三级佣金比例', "upgradeMode", //tinyint(1) DEFAULT NULL COMMENT '升级方式 1:满足任意条件 2:满足所有条件', "upgradeCondition", //json DEFAULT NULL COMMENT '升级条件 例: 条件id : 条件值', "deleteStatus", //tinyint(1) DEFAULT NULL COMMENT '删除状态 4:删除 5:正常', "enableStatus", //tinyint(1) DEFAULT NULL COMMENT '启用状态 4:禁用 5:启用', "updateTime", //int(10) DEFAULT NULL COMMENT '修改时间', "createTime", //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); } }