refactor:将request结构体写到entity
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user