You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
5.1 KiB
Java

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

-- ----------------------------
--
-- ----------------------------
DROP TABLE IF EXISTS `pay_wallet`;
CREATE TABLE `pay_wallet`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`user_id` bigint NOT NULL COMMENT '',
`user_type` tinyint NOT NULL DEFAULT 0 COMMENT '',
`balance` int NOT NULL DEFAULT 0 COMMENT '',
`total_expense` int NOT NULL DEFAULT 0 COMMENT '',
`total_recharge` int NOT NULL DEFAULT 0 COMMENT '',
`freeze_price` int NOT NULL DEFAULT 0 COMMENT '',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='';
-- ----------------------------
--
-- ----------------------------
DROP TABLE IF EXISTS `pay_wallet_transaction`;
CREATE TABLE `pay_wallet_transaction`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`wallet_id` bigint NOT NULL COMMENT ' id',
`biz_type` tinyint NOT NULL COMMENT '',
`biz_id` varchar(64) NOT NULL COMMENT '',
`no` varchar(64) NOT NULL COMMENT '',
`title` varchar(128) NOT NULL COMMENT '',
`price` int NOT NULL COMMENT ', ',
`balance` int NOT NULL COMMENT ', ',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='';
-- ----------------------------
--
-- ----------------------------
DROP TABLE IF EXISTS `pay_wallet_recharge`;
CREATE TABLE `pay_wallet_recharge`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '',
`wallet_id` bigint NOT NULL COMMENT ' id',
`total_price` int NOT NULL COMMENT ' 100 20 120',
`pay_price` int NOT NULL COMMENT '',
`bonus_price` int NOT NULL COMMENT '',
`pay_status` bit(1) NOT NULL DEFAULT b'0' COMMENT '[0: 1:]',
`pay_order_id` bigint NULL COMMENT '',
`pay_channel_code` varchar(16) NULL COMMENT '',
`pay_time` datetime NULL COMMENT '',
`pay_refund_id` bigint NULL COMMENT '退',
`refund_total_price` int NOT NULL DEFAULT 0 COMMENT '退',
`refund_pay_price` int NOT NULL DEFAULT 0 COMMENT '退',
`refund_bonus_price` int NOT NULL DEFAULT 0 COMMENT '退',
`refund_time` datetime NULL COMMENT '退',
`refund_status` int NOT NULL DEFAULT 0 COMMENT '退',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '',
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB COMMENT='';