Files
cai-server/doc/20251211.sql
2025-12-23 17:10:31 +08:00

45 lines
3.2 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE TABLE `cai_prize_info`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '奖品ID',
`prize_name` varchar(100) NOT NULL COMMENT '奖品名称',
`prize_desc` varchar(500) DEFAULT '' COMMENT '奖品描述',
`prize_img` varchar(255) DEFAULT '' COMMENT '奖品图片地址',
`win_probability` decimal(5, 4) NOT NULL COMMENT '中奖率0-1如0.0100表示1%',
`guarantee_draws` int NOT NULL DEFAULT 0 COMMENT '保底抽数0表示无保底谢谢惠顾奖无效',
`min_win_draws` int NOT NULL DEFAULT 0 COMMENT '最低中奖抽数0表示无限制谢谢惠顾奖无效',
`stock` int NOT NULL DEFAULT 0 COMMENT '奖品库存谢谢惠顾奖填0不校验',
`prize_type` tinyint not null comment '奖品类型',
`prize_price` bigint(20) not null default 0 comment '奖品价值估算',
`auto_give` tinyint not null default 0 comment '是否自动兑奖',
`is_thank` tinyint NOT NULL DEFAULT 0 COMMENT '是否为谢谢惠顾奖0-否1-是(全局仅一个)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_is_thank` (`is_thank`) COMMENT '谢谢惠顾奖索引'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='奖品基础表';
CREATE TABLE `cai_prize_online`
(
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '奖品ID',
`prize_id` bigint NOT NULL COMMENT '奖品ID',
`gender` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别 1-女 2-男',
`prize_name` varchar(100) NOT NULL COMMENT '奖品名称',
`prize_desc` varchar(500) DEFAULT '' COMMENT '奖品描述',
`prize_img` varchar(255) DEFAULT '' COMMENT '奖品图片地址',
`win_probability` decimal(5, 4) NOT NULL COMMENT '中奖率0-1如0.0100表示1%',
`guarantee_draws` int NOT NULL DEFAULT 0 COMMENT '保底抽数0表示无保底谢谢惠顾奖无效',
`min_win_draws` int NOT NULL DEFAULT 0 COMMENT '最低中奖抽数0表示无限制谢谢惠顾奖无效',
`stock` int NOT NULL DEFAULT 0 COMMENT '奖品库存谢谢惠顾奖填0不校验',
`prize_type` tinyint not null comment '奖品类型',
`prize_price` bigint(20) not null default 0 comment '奖品价值估算',
`auto_give` tinyint not null default 0 comment '是否自动兑奖',
`is_thank` tinyint NOT NULL DEFAULT 0 COMMENT '是否为谢谢惠顾奖0-否1-是(全局仅一个)',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_is_thank` (`is_thank`) COMMENT '谢谢惠顾奖索引'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='已发布奖品表';