feat: 收藏夹系统 + Studio 趋势图 + 通知偏好设置
- 新增收藏夹系统 (Folder/FolderItem 模型、CRUD API、前端管理页) - 新增文章详情页收藏按钮 (书签图标、ToggleFavorite 一键收藏) - 新增 Studio 趋势图 (赋能值/评论/点赞/收藏 4 线图, 7d/30d/90d) - 新增通知偏好设置页 (评论/回复/点赞/关注 4 类开关) - 后端通知列表支持按偏好过滤 (排除已关闭的通知类型) - 下载 Chart.js 到本地静态资源 (static/js/chart.umd.min.js) - 补充收藏夹卡片、开关滑块、趋势图网格等 CSS 样式
This commit is contained in:
@ -185,3 +185,29 @@ type FollowStore interface {
|
||||
GetFollowListPublic(userID uint) (bool, error)
|
||||
WithTx(tx *gorm.DB) FollowStore
|
||||
}
|
||||
|
||||
// TrendPoint 趋势数据点
|
||||
type TrendPoint struct {
|
||||
Date string `json:"date"`
|
||||
Value int `json:"value"`
|
||||
}
|
||||
|
||||
// EnergyTrendStore 赋能趋势聚合(ISP)
|
||||
type EnergyTrendStore interface {
|
||||
AggregateEnergyByAuthor(userID uint, since string) ([]TrendPoint, error)
|
||||
}
|
||||
|
||||
// CommentTrendStore 评论趋势聚合(ISP)
|
||||
type CommentTrendStore interface {
|
||||
AggregateCommentsByAuthor(userID uint, since string) ([]TrendPoint, error)
|
||||
}
|
||||
|
||||
// LikeTrendStore 点赞趋势聚合(ISP)
|
||||
type LikeTrendStore interface {
|
||||
AggregateLikesByAuthor(userID uint, since string) ([]TrendPoint, error)
|
||||
}
|
||||
|
||||
// FavoriteTrendStore 收藏趋势聚合(ISP)
|
||||
type FavoriteTrendStore interface {
|
||||
AggregateFavoritesByAuthor(userID uint, since string) ([]TrendPoint, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user