union.sql 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. CREATE TABLE `eb_security_category` (
  2. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  3. `name` varchar(50) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '类别名称',
  4. `price` decimal(12,2) NOT NULL DEFAULT '0.00' COMMENT '分类商品价格',
  5. `point` int(6) NOT NULL DEFAULT '0' COMMENT '赠送积分',
  6. `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '卡状态:0:冻结;1:激活',
  7. `remark` varchar(100) DEFAULT NULL COMMENT '备注',
  8. `add_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
  9. `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  10. PRIMARY KEY (`id`) USING BTREE
  11. ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='防伪码类别';
  12. CREATE TABLE `eb_security_code_record` (
  13. `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  14. `category_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '类别id',
  15. `security_code` varchar(30) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '防伪码编码',
  16. `wx_url` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '微信扫码链接地址',
  17. `scan_uid` int(11) DEFAULT NULL COMMENT '扫码使用用户',
  18. `scan_time` int(10) DEFAULT NULL COMMENT '首次扫码时间',
  19. `status` tinyint(1) DEFAULT NULL COMMENT '防伪码状态:0:冻结;1:激活 2:已使用',
  20. `add_time` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
  21. `update_time` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  22. PRIMARY KEY (`id`) USING BTREE,
  23. UNIQUE KEY `udx_code` (`security_code`) USING HASH
  24. ) ENGINE=InnoDB AUTO_INCREMENT=22009 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='防伪码记录';
  25. alter table eb_user add column
  26. `city_id` int(11) NOT NULL DEFAULT '0' COMMENT '城市id';
  27. alter table eb_user add column
  28. `city_name` varchar(100) NOT NULL DEFAULT '' COMMENT '所在市';
  29. alter table eb_user add column
  30. `store_name` varchar(100) NOT NULL DEFAULT '' COMMENT '门店名称';