diff --git a/mallinkAdmin/src/main/resources/db/migration/V2023042700006_wx_merchant_score_rules.sql b/mallinkAdmin/src/main/resources/db/migration/V2023042700006_wx_merchant_score_rules.sql new file mode 100644 index 000000000..f58eee645 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V2023042700006_wx_merchant_score_rules.sql @@ -0,0 +1,15 @@ + +CREATE TABLE `wx_merchant_score_rules` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', + `merchant_id` bigint(20) NOT NULL, + `rules` json, + `create_date` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_date` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '更新时间', + `type` smallint(2) NOT NULL DEFAULT 1 COMMENT '1成长值 2积分', + `open` smallint(2) NOT NULL DEFAULT 0, + `scale` smallint(5) UNSIGNED DEFAULT NULL COMMENT '积分倍率', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id_UNIQUE`(`id`) USING BTREE, + UNIQUE INDEX `merchant_id`(`merchant_id`, `type`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商户积分规则' ROW_FORMAT = Dynamic; \ No newline at end of file