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.

45 lines
2.8 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` bigint NOT NULL DEFAULT 0 COMMENT '',
`total_recharge` bigint 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` bigint NOT NULL COMMENT '',
`no` varchar(64) NOT NULL COMMENT '',
`description` varchar(255) COMMENT '',
`amount` int NOT NULL COMMENT ', ',
`balance` int NOT NULL COMMENT ', ',
`transaction_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP 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='';