_table = 'sku'; $this->_primary = 'id'; $this->_fields = [ "id",//int(10) NOT NULL AUTO_INCREMENT, "goodsId",//int(10) NOT NULL DEFAULT '0' COMMENT '商品id', "conversion",//decimal(10,2) DEFAULT NULL COMMENT '换算比率', "unitId",//int(10) DEFAULT NULL COMMENT '单位id', "unitName",//varchar(50) DEFAULT '' COMMENT '单位名称', "isMaster",//tinyint(3) DEFAULT '4' COMMENT '是否主单位 默认4 否 5是', "deleteStatus",//tinyint(3) DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除', "extends",//json DEFAULT NULL COMMENT '拓展字段', "createTime",//int(10) DEFAULT '0' COMMENT '创建时间', "updateTime",//int(10) DEFAULT '0' COMMENT '更新时间', "specType",//tinyint(3) DEFAULT '1' COMMENT '规格类型 默认1 单规格 2多规格', "specImage",//json DEFAULT NULL COMMENT '规格图片', "specData",//json DEFAULT NULL COMMENT '规格明细', "specGroupHash",// varchar(255) NOT NULL DEFAULT '' COMMENT '属性明细hash', "barCode",//varchar(255) NOT NULL DEFAULT '' COMMENT '条码', 'isDefault',//是否默认 4=>否 5=>是 'weight', 'isNew' ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }