feat:加入了mysql的一些标签

This commit is contained in:
Leon
2025-12-23 02:23:42 +08:00
parent 326782240f
commit a632768ef8
2 changed files with 12 additions and 5 deletions

View File

@@ -29,13 +29,20 @@ type ListLatestResponse struct {
} }
type ListLikesCountRequest struct { type ListLikesCountRequest struct {
Limit int `json:"limit"` Limit int `json:"limit"`
LikesCount int64 `json:"likes_count"` LikesCountBefore *int64 `json:"likes_count_before,omitempty"`
IDBefore *uint `json:"id_before,omitempty"`
}
type LikesCountCursor struct {
LikesCount int64
ID uint
} }
type ListLikesCountResponse struct { type ListLikesCountResponse struct {
VideoList []FeedVideoItem `json:"video_list"` VideoList []FeedVideoItem `json:"video_list"`
NextLikesCountBefore int64 `json:"next_likes_count_before"` NextLikesCountBefore *int64 `json:"next_likes_count_before,omitempty"`
NextIDBefore *uint `json:"next_id_before,omitempty"`
HasMore bool `json:"has_more"` HasMore bool `json:"has_more"`
} }

View File

@@ -4,8 +4,8 @@ import "feedsystem_video_go/internal/account"
type Social struct { type Social struct {
ID uint `gorm:"primaryKey"` ID uint `gorm:"primaryKey"`
FollowerID uint `gorm:"index"` FollowerID uint `gorm:"not null;index:idx_social_follower;uniqueIndex:idx_social_follower_vlogger"`
VloggerID uint `gorm:"index"` VloggerID uint `gorm:"not null;index:idx_social_vlogger;uniqueIndex:idx_social_follower_vlogger"`
} }
type FollowRequest struct { type FollowRequest struct {