This commit is contained in:
2025-11-01 12:42:03 +08:00
parent f24cc851f0
commit b5f74c465d
6 changed files with 183 additions and 9 deletions

16
sql/gift_coupon_table.sql Normal file
View File

@@ -0,0 +1,16 @@
-- 礼金表:存储所有创建的礼金信息
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='礼金信息表';