move: 后端
This commit is contained in:
18
backend/internal/video/like_entity.go
Normal file
18
backend/internal/video/like_entity.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package video
|
||||
|
||||
import "time"
|
||||
|
||||
type Like struct {
|
||||
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 {
|
||||
VideoID uint `json:"video_id"`
|
||||
}
|
||||
|
||||
type LikeHandler struct {
|
||||
service *LikeService
|
||||
}
|
||||
Reference in New Issue
Block a user