update.sql 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. DROP TABLE if exists `merchant_order`;
  2. create table `merchant_order` (
  3. `id` int(10) NOT NULL AUTO_INCREMENT,
  4. `order_name` varchar(30) NOT NULL default '' COMMENT '订单名',
  5. `del_flag` char(1) NOT NULL DEFAULT 'N' COMMENT '删除标识',
  6. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  7. `update_user` varchar(45) DEFAULT NULL COMMENT '更新人',
  8. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  9. `create_user` varchar(45) DEFAULT NULL COMMENT '创建人',
  10. `user_id` int(10) DEFAULT NULL COMMENT '用户',
  11. `order_code` varchar(45) DEFAULT NULL COMMENT '订单编码',
  12. `specification` varchar(45) DEFAULT NULL COMMENT '规格',
  13. `description` varchar(600) default null comment '订单描述',
  14. `unit_price` decimal(10,2) DEFAULT NULL COMMENT '单价',
  15. `quantity` int(10) DEFAULT NULL COMMENT '数量',
  16. `user_coupon_id` int(10) DEFAULT NULL COMMENT '优惠券',
  17. `off_price` decimal(10,2) DEFAULT NULL COMMENT '优惠金额',
  18. `totle_price` decimal(10,2) DEFAULT NULL COMMENT '总价',
  19. `deal_price` decimal(10,2) DEFAULT NULL COMMENT '成交价',
  20. `pay_mode` int(4) DEFAULT '0' COMMENT '支付方式',
  21. `pay_time` datetime DEFAULT NULL COMMENT '支付时间',
  22. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  23. `show_flag` char(1) DEFAULT 'Y' COMMENT '显示标识',
  24. `status_flag` int(4) DEFAULT '0' COMMENT '状态',
  25. `fee` decimal(10,2) DEFAULT NULL COMMENT '手续费',
  26. `coin` decimal(10,2) DEFAULT NULL COMMENT '余额',
  27. `point` decimal(10,2) DEFAULT NULL COMMENT '积分',
  28. `cash` decimal(10,2) DEFAULT NULL COMMENT '现金',
  29. `cancel_reason` varchar(255) DEFAULT NULL COMMENT '取消原因',
  30. `confirm_time` datetime DEFAULT NULL COMMENT '确认时间',
  31. `old_status` int(4) DEFAULT NULL COMMENT '退款前状态',
  32. `refund_status` int(4) DEFAULT NULL COMMENT '退款状态',
  33. `album_count` int(10) DEFAULT 0 comment '相册数',
  34. PRIMARY KEY (`id`)
  35. )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='签约商户订单';
  36. DROP TABLE if exists `merchant_order_img`;
  37. create table `merchant_order_img` (
  38. `id` int(10) NOT NULL AUTO_INCREMENT,
  39. `del_flag` char(1) NOT NULL DEFAULT 'N' COMMENT '删除标识',
  40. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  41. `update_user` varchar(45) DEFAULT NULL COMMENT '更新人',
  42. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  43. `create_user` varchar(45) DEFAULT NULL COMMENT '创建人',
  44. `order_id` int(10) DEFAULT NULL COMMENT '订单',
  45. `user_id` int(10) DEFAULT NULL COMMENT '创建人ID',
  46. `local_path` varchar(300) DEFAULT NULL COMMENT '本地地址',
  47. `size` decimal(10,0) DEFAULT '0' COMMENT '原片大小',
  48. `full_name` varchar(300) DEFAULT NULL COMMENT '全名',
  49. `op_user` int(10) DEFAULT NULL COMMENT '运营人员',
  50. `status_flag` int(4) DEFAULT '0' COMMENT '状态',
  51. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  52. `image_name` varchar(255) DEFAULT NULL COMMENT '图片名称',
  53. `clean_flag` char(1) DEFAULT 'N' COMMENT '是否清理OSS',
  54. `business_type` int(1) not null comment '业务类型',
  55. PRIMARY KEY (`id`)
  56. )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='签约商户订单交易图片';
  57. DROP TABLE if exists `merchant_order_checklink`;
  58. create table `merchant_order_checklink` (
  59. `id` int(10) NOT NULL AUTO_INCREMENT,
  60. `del_flag` char(1) NOT NULL DEFAULT 'N' COMMENT '删除标识',
  61. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  62. `update_user` varchar(45) DEFAULT NULL COMMENT '更新人',
  63. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  64. `create_user` varchar(45) DEFAULT NULL COMMENT '创建人',
  65. `title` varchar(45) DEFAULT NULL COMMENT '标题',
  66. `order_id` int(10) DEFAULT NULL COMMENT '订单',
  67. `user_id` int(10) DEFAULT NULL COMMENT '创建人ID',
  68. `check_link` varchar(300) DEFAULT NULL COMMENT '审核地址',
  69. `verify_code` varchar(6) DEFAULT NULL COMMENT '审核验证码',
  70. `status_flag` int(4) DEFAULT '0' COMMENT '状态',
  71. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  72. `check_times` int(2) DEFAULT '0' comment '审片次数',
  73. PRIMARY KEY (`id`)
  74. )ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='签约商户订单审核链接';
  75. alter table sys_user add user_type int(1) default '0' comment '用户类型';
  76. alter table sys_user add unit_price decimal(10, 2) default '0' comment '单价';
  77. alter table sys_user add contract_starttime timestamp DEFAULT '0000-00-00 00:00:00' comment '合约生效日期';
  78. alter table sys_user add contract_endtime timestamp DEFAULT '0000-00-00 00:00:00' comment '合约结束日期';
  79. alter table sys_user add relate_users varchar(1000) default null comment '关联人员';