feat: 加入了一些边界检查
This commit is contained in:
@@ -3,10 +3,10 @@ package video
|
||||
import "time"
|
||||
|
||||
type Like struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
VideoID uint `gorm:"index;not null"`
|
||||
AccountID uint `gorm:"index;not null"`
|
||||
CreatedAt time.Time
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
VideoID uint `gorm:"uniqueIndex:idx_like_video_account;not null" json:"video_id"`
|
||||
AccountID uint `gorm:"uniqueIndex:idx_like_video_account;not null" json:"account_id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type LikeRequest struct {
|
||||
|
||||
Reference in New Issue
Block a user