_table = 'order_goods'; $this->_primary = 'id'; $this->_fields = [ "id", //int(10) NOT NULL AUTO_INCREMENT, "no", //char(20) NOT NULL COMMENT '订单编号', "orderId", //int(10) NOT NULL DEFAULT '0' COMMENT '订单Id', "goodsCode", //varchar(255) NOT NULL DEFAULT '' COMMENT '商品编号', "goodsId", //int(10) NOT NULL DEFAULT '0' COMMENT '商品Id', "goodsName", //varchar(50) NOT NULL DEFAULT '' COMMENT '商品名称', "shopId", //int(10) NOT NULL DEFAULT '0' COMMENT '商铺Id', "shopName", //varchar(50) NOT NULL DEFAULT '' COMMENT '商铺名称', "originPrice", //decimal(12,2) DEFAULT '0.00' COMMENT '原始单价', "price", //decimal(12,2) DEFAULT '0.00' COMMENT '商品单价', "buyNum", //int(10) NOT NULL DEFAULT '0' COMMENT '购买数量', "preferential", //decimal(12,2) DEFAULT '0.00' COMMENT '每/优惠', "totalMoney", //decimal(12,2) DEFAULT '0.00' COMMENT '小计金额', "deliverNum", //int(10) NOT NULL DEFAULT '0' COMMENT '发货数量', "extends", //json DEFAULT NULL COMMENT '拓展字段', "deleteStatus", //tinyint(3) NOT NULL DEFAULT '5' COMMENT '是否删除 默认5 正常 4删除', "returnStatus", //tinyint(3) DEFAULT '0' COMMENT '退货状态 0:未退货 1:已退货', "createTime", //int(10) NOT NULL DEFAULT '0' COMMENT '创建时间', "updateTime", //int(10) NOT NULL DEFAULT '0' COMMENT '更新时间', "preferentialActivityId", //int(10) DEFAULT '0' COMMENT '店铺优惠活动id', "skuId", //int(10) DEFAULT NULL COMMENT 'skuid', "goodsBasicId", //int(10) DEFAULT NULL COMMENT 'goodsBasicId', "unitName", //varchar(50) DEFAULT NULL COMMENT '单位名称', "conversion", //decimal(10,2) DEFAULT NULL COMMENT '换算比率', "outCostPrice", //decimal(10,2) DEFAULT NULL COMMENT '成本', ]; $this->_readonly = ['id']; $this->_create_autofill = [ 'createTime' => time() ]; $this->_update_autofill = [ 'updateTime' => time() ]; parent::__construct($serviceDB); } }