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

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