shish %!s(int64=5) %!d(string=hai) anos
pai
achega
ef12c9e55e
Modificáronse 1 ficheiros con 88 adicións e 0 borrados
  1. 88 0
      sql.sql

+ 88 - 0
sql.sql

@@ -0,0 +1,88 @@
+shish 1.1
+
+ALTER TABLE xhMerchantAccount RENAME TO xhMerchantApply
+
+CREATE TABLE xhItem(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+`name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '花材名称',
+unitNum tinyint not null default 0 comment '每扎多少支',
+unitWeight decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎多少公斤',
+unitCost decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎成本价,采购价',
+unitAddPrice decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎加价',
+unit int not null default 0 comment '单位名称ID',
+addTime int not null default 0 comment '添加时间',
+updateTime int not null default 0 comment '修改时间'
+)comment='花材,资材';
+
+create table if not exists xhItemClass(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+`name` varchar(50) not null default '' comment '名称',
+inTurn int not null default 0 comment '排序,越大越靠前',
+addTime int not null default 0 comment '添加时间',
+updateTime int not null default 0 comment '修改时间'
+)comment='花材分类';
+
+CREATE TABLE xhUnit(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+`name` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '单位名称',
+addTime int not null default 0 comment '添加时间',
+updateTime int not null default 0 comment '修改时间'
+)COMMENT='花材单位';
+
+create table xhMerchantItemClass(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+merchantId int not null default 0 comment '商家id',
+`name` varchar(50) not null default '' comment '名称',
+inTurn int not null default 0 comment '排序,越大越靠前',
+addTime int not null default 0 comment '添加时间',
+updateTime int not null default 0 comment '修改时间'
+)comment='商家花材分类';
+create table xhMerchantItem(
+id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+merchantId int not null default 0 comment '商家id',
+classId int not null default 0 comment '商家花材分类id',
+itemId int not null default 0 comment '花材id',
+unitCost decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎成本价,采购价',
+unitAddPrice decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎加价',
+addTime int not null default 0 comment '添加时间',
+updateTime int not null default 0 comment '修改时间'
+)comment='商家花材';
+
+CREATE TABLE `xhGhsOrder` (
+  `id` int(11) NOT NULL AUTO_INCREMENT primary key COMMENT '自增id',
+  `orderSn` char(40) NOT NULL DEFAULT '' COMMENT '订单编号',
+  `goodsNum` tinyint(4) NOT NULL DEFAULT '0' COMMENT '商品数量',
+  `payWay` tinyint(4) NOT NULL DEFAULT '0' COMMENT '支付方式 0微信 1支付宝 2余额',
+  `wxPayType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 H5支付 1 小程序支付',
+  `payCode` varchar(1000) NOT NULL DEFAULT '' COMMENT '支付返回号',
+  `fromType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '来源:0门店 1商城 2朋友圈',
+  `store` tinyint(4) NOT NULL DEFAULT '0' COMMENT '门店订单 0不是 1是',
+  `capitalId` int(11) NOT NULL DEFAULT '0' COMMENT '流水id',
+  `prePrice` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '应付款,原价,未修改价格,打折前',
+  `actPrice` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '实际付款,实价,修改后价格,打折后',
+  `userId` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
+  `merchantId` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
+  `shopId` int(11) NOT NULL DEFAULT '0' COMMENT '门店id',
+  `sendType` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0未确认配送方式 1免配送 2自己送 3别人送;快递送',
+  `sendSide` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配送方 0没有 1达达',
+  `sendStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '配送状态:0未发货,待接单 1已发货,已接单 2已送达',
+  `refund` tinyint(4) NOT NULL DEFAULT '0' COMMENT '1已退款 0正常订单',
+  `payStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0待付款 1已付款',
+  `printStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0未打印 1已打印',
+  `remark` varchar(1000) NOT NULL DEFAULT '' COMMENT '备注',
+  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态 0待付款 1待配送 2配送中 3待通知 4已取消 5已完成',
+  `deadline` int(11) NOT NULL DEFAULT '0' COMMENT '订单有效期',
+  `payTime` int(11) NOT NULL DEFAULT '0' COMMENT '付款时间',
+  addTime int not null default 0 comment '添加时间',
+  `updateTime` int not null default 0 comment '修改时间'
+) COMMENT='供货商订单';
+create table xhGhsOrderItem(
+`id` int(11) unsigned NOT NULL AUTO_INCREMENT primary key COMMENT 'id',
+`orderId` int(11) NOT NULL DEFAULT '0' COMMENT '订单id',
+`userId` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
+`merchantId` int(11) NOT NULL DEFAULT '0' COMMENT '商户id',
+itemId int not null default 0 comment '商家花材id',
+`unitPrice` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '每扎价格',
+unitNum int not null default 0 comment '每扎多少支',
+`num` decimal(9,2) NOT NULL DEFAULT '0.00' COMMENT '多少扎'
+)comment='供货商订单商品';