_table = 'customer_balance_turnover'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT COMMENT '客户余额流水', "sourceId", //int(10) DEFAULT NULL COMMENT '来源id', "sourceNo", //char(25) DEFAULT NULL COMMENT '来源单号', "source", //tinyint(2) DEFAULT NULL COMMENT '来源', "customerId", //int(10) DEFAULT NULL COMMENT '客户id', "userCenterId", //int(10) DEFAULT NULL COMMENT 'userCenterId', "shopId", //int(10) DEFAULT NULL COMMENT '商铺id', "money", //decimal(8,2) DEFAULT NULL COMMENT '金额', "balance", //decimal(8,2) DEFAULT NULL COMMENT '变动后余额', "type", //tinyint(1) DEFAULT NULL COMMENT '出入状态 4:支出 5:支入', "desc", //varchar(255) DEFAULT NULL COMMENT '文字描述', "createTime", //int(10) 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); } }