Files
ruoyi-java/sql/gift_coupon_table.sql
2025-11-01 12:42:03 +08:00

17 lines
840 B
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 IF NOT EXISTS `gift_coupon` (
`gift_coupon_key` varchar(100) NOT NULL COMMENT '礼金Key主键',
`sku_id` varchar(50) DEFAULT NULL COMMENT '商品SKU ID',
`sku_name` varchar(500) DEFAULT NULL COMMENT '商品名称',
`owner` varchar(10) DEFAULT 'g' COMMENT '商品类型g:自营, pop:POP',
`amount` decimal(10,2) DEFAULT NULL COMMENT '礼金金额(元)',
`quantity` int(11) DEFAULT NULL COMMENT '礼金数量',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`expire_time` datetime DEFAULT NULL COMMENT '过期时间',
PRIMARY KEY (`gift_coupon_key`),
KEY `idx_sku_id` (`sku_id`),
KEY `idx_create_time` (`create_time`),
KEY `idx_owner` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='礼金信息表';