refactor:将request结构体写到entity

This commit is contained in:
Leon
2025-12-15 17:32:56 +08:00
parent a1d49f0ab1
commit b53593b920
2 changed files with 10 additions and 10 deletions

View File

@@ -4,7 +4,15 @@ import "time"
type Like struct {
ID uint `gorm:"primaryKey"`
VideoID uint `gorm:"index, not null"`
AccountID uint `gorm:"index, not null"`
VideoID uint `gorm:"index;not null"`
AccountID uint `gorm:"index;not null"`
CreatedAt time.Time
}
type LikeRequest struct {
VideoID uint `json:"video_id"`
}
type LikeHandler struct {
service *LikeService
}