CREATE TABLE IF NOT EXISTS `charging_pile_account`.`t_app_user_site_favorite` (
|
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
|
`app_user_id` bigint NOT NULL COMMENT '小程序用户ID',
|
`site_id` int NOT NULL COMMENT '站点ID',
|
`favorite_price` decimal(10,4) NOT NULL DEFAULT 0.0000 COMMENT '收藏时电价',
|
`notify_enabled` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否允许降价提醒',
|
`last_notified_price` decimal(10,4) DEFAULT NULL COMMENT '最近一次已提醒价格',
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '收藏时间',
|
`del_flag` tinyint(1) NOT NULL DEFAULT 0 COMMENT '删除标记',
|
PRIMARY KEY (`id`),
|
UNIQUE KEY `uk_user_site` (`app_user_id`,`site_id`),
|
KEY `idx_notify` (`notify_enabled`,`del_flag`)
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='小程序用户收藏站点';
|
|
-- Nacos 的 ruoyi-account 配置需要补充真实微信订阅消息模板 ID:
|
-- wx.applet.price-drop-template-id: 你的模板ID
|