钱包充值 表结构设计

plp
jason 3 years ago
parent 9358639c41
commit bcb3b19418

@ -4,18 +4,18 @@
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 '',
`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 '',
`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 '',
`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='';
@ -41,3 +41,34 @@ CREATE TABLE `pay_wallet_transaction`
`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',
`price` int NOT NULL COMMENT ' 100 20 120',
`pay_price` int NOT NULL COMMENT '',
`wallet_bonus` 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 '',
`wallet_transaction_id` bigint NULL COMMENT '',
`pay_refund_id` bigint NULL COMMENT '退',
`refund_price` int NOT NULL DEFAULT 0 COMMENT '退',
`refund_pay_price` int NOT NULL DEFAULT 0 COMMENT '退',
`refund_wallet_bonus` int NOT NULL DEFAULT 0 COMMENT '退',
`refund_wallet_transaction_id` bigint 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='';

Loading…
Cancel
Save