diff --git a/tables/sub_account_db.sql b/tables/sub_account_db.sql index 6560f755..d14242c3 100644 --- a/tables/sub_account_db.sql +++ b/tables/sub_account_db.sql @@ -1,5 +1,7 @@ -CREATE DATABASE `sub_account_db`; -USE `sub_account_db`; +CREATE + DATABASE `sub_account_db`; +USE + `sub_account_db`; -- t_block_parser_info CREATE TABLE `t_block_parser_info` @@ -94,4 +96,46 @@ CREATE TABLE `t_mint_sign_info` UNIQUE KEY `uk_mint_sign_id` (`mint_sign_id`) ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 - COLLATE = utf8mb4_0900_ai_ci COMMENT ='mint sign info'; \ No newline at end of file + COLLATE = utf8mb4_0900_ai_ci COMMENT ='mint sign info'; + +-- t_coupon_set_info +CREATE TABLE `t_coupon_set_info` +( + `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '', + `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `account_id` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `owner_aid` SMALLINT NOT NULL DEFAULT '0' COMMENT '', + `owner` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `root` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `name` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `note` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `price` DECIMAL(50, 10) NOT NULL DEFAULT '' COMMENT '', + `num` INT NOT NULL DEFAULT '0' COMMENT '', + `expired_at` BIGINT NOT NULL DEFAULT '0' COMMENT '', + `status` SMALLINT NOT NULL DEFAULT '0' COMMENT '', + `signature` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '', + `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_cid` (`cid`), + KEY `k_account_id` (`account_id`), + KEY `k_owner` (`owner`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci COMMENT ='coupon set info'; + + +-- t_coupon_info +CREATE TABLE `t_coupon_info` +( + `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '', + `cid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `code` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '', + `status` SMALLINT NOT NULL DEFAULT '0' COMMENT '', + `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '', + `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '', + PRIMARY KEY (`id`), + UNIQUE KEY `uk_cid` (`cid`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 + COLLATE = utf8mb4_0900_ai_ci COMMENT ='coupon info'; \ No newline at end of file