update1.10.9.sql 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. Navicat Premium Data Transfer
  3. Source Server : 4dkk120.24.144.164
  4. Source Server Type : MySQL
  5. Source Server Version : 80025
  6. Source Host : 120.24.144.164:3306
  7. Source Schema : 4dkankan_v4
  8. Target Server Type : MySQL
  9. Target Server Version : 80025
  10. File Encoding : 65001
  11. Date: 17/03/2025 15:53:32
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for t_product
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `t_product`;
  19. CREATE TABLE `t_product` (
  20. `id` int NOT NULL AUTO_INCREMENT,
  21. `type_key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  22. `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  23. `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '单价',
  24. `limit_count` int NULL DEFAULT NULL COMMENT '限购数量',
  25. `free_count` int NULL DEFAULT NULL COMMENT '免费数量',
  26. `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
  27. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  28. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  29. PRIMARY KEY (`id`) USING BTREE
  30. ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
  31. -- ----------------------------
  32. -- Records of t_product
  33. -- ----------------------------
  34. INSERT INTO `t_product` VALUES (1, 'cooperation', '协作', 0.01, 5, 1, 'A', '2025-03-13 11:48:36', '2025-03-13 11:49:05');
  35. -- ----------------------------
  36. -- Table structure for t_product_cooperation
  37. -- ----------------------------
  38. DROP TABLE IF EXISTS `t_product_cooperation`;
  39. CREATE TABLE `t_product_cooperation` (
  40. `id` int NOT NULL AUTO_INCREMENT,
  41. `order_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  42. `num` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  43. `cooperation_user_id` int NULL DEFAULT NULL,
  44. `rec_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT 'A',
  45. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  46. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  47. PRIMARY KEY (`id`) USING BTREE
  48. ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
  49. -- ----------------------------
  50. -- Records of t_product_cooperation
  51. -- ----------------------------
  52. -- ----------------------------
  53. -- Table structure for t_product_order
  54. -- ----------------------------
  55. CREATE TABLE `t_product_order` (
  56. `id` int NOT NULL AUTO_INCREMENT,
  57. `product_id` int DEFAULT NULL,
  58. `order_sn` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '订单号',
  59. `amount` decimal(10,2) DEFAULT NULL,
  60. `number` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '' COMMENT '支付宝的交易号或者微信支付订单号',
  61. `pay_type` tinyint NOT NULL DEFAULT '-1' COMMENT '付款方式,0表示微信,1表示支付宝,2表示paypal,3表示其他',
  62. `pay_status` tinyint DEFAULT '0' COMMENT '状态,0或-1表示未付款,-2表示已退款,1表示已付款',
  63. `trade_time` datetime DEFAULT NULL COMMENT '交易时间',
  64. `user_id` bigint DEFAULT NULL COMMENT '用户表t_user的id',
  65. `count` tinyint DEFAULT NULL COMMENT '购买数量',
  66. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  67. `rec_status` varchar(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'A' COMMENT '记录的状态,A: 生效,I: 禁用',
  68. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  69. `time_zone_off` int DEFAULT '0' COMMENT '时区差,单位分钟',
  70. `lang` varchar(255) DEFAULT NULL,
  71. `camera_id` int DEFAULT NULL,
  72. PRIMARY KEY (`id`) USING BTREE
  73. ) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC;
  74. -- ----------------------------
  75. -- Records of t_product_order
  76. -- ----------------------------
  77. SET FOREIGN_KEY_CHECKS = 1;
  78. CREATE TABLE `t_scene_cooperation_count` (
  79. `id` int NOT NULL AUTO_INCREMENT,
  80. `num` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  81. `count` int DEFAULT NULL,
  82. `rec_status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT 'A',
  83. `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  84. `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  85. PRIMARY KEY (`id`)
  86. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
  87. ALTER TABLE `4dkankan_v4`.`t_scene_cooperation`
  88. ADD COLUMN `scene_type` varchar(255) NULL DEFAULT 'mesh' AFTER `rec_status`;
  89. ALTER TABLE `4dkankan_v4`.`t_product_cooperation`
  90. ADD COLUMN `scene_type` varchar(255) NULL DEFAULT 'mesh' AFTER `update_time`,
  91. ADD COLUMN `need_pay` int NULL DEFAULT 0 AFTER `scene_type`;
  92. ALTER TABLE `4dkankan_v4`.`t_product_order`
  93. ADD COLUMN `scene_type` varchar(255) NULL DEFAULT 'mesh' AFTER `update_time`,
  94. ADD COLUMN `need_pay` int NULL DEFAULT 0 AFTER `scene_type`;
  95. ALTER TABLE `4dkankan_v4`.`t_scene_cooperation_count`
  96. ADD COLUMN `scene_type` varchar(255) NULL DEFAULT 'mesh' AFTER `rec_status`;