41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type Clip struct {
|
|
ID int `json:"id"`
|
|
Title string `json:"title"`
|
|
VideoURL string `json:"videoUrl"`
|
|
ThumbnailURL string `json:"thumbnailUrl"`
|
|
AuthorID int `json:"-"`
|
|
LikesCount int `json:"likesCount"`
|
|
CommentsCount int `json:"commentsCount"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
type ClipLike struct {
|
|
ID int `json:"id"`
|
|
ClipID int `json:"clip_id"`
|
|
UserID int `json:"user_id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
|
|
type ClipComment struct {
|
|
ID int `json:"id"`
|
|
ClipID int `json:"clip_id"`
|
|
AuthorID int `json:"-"`
|
|
Author *User `json:"author"`
|
|
Content string `json:"content"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type CreateClipRequest struct {
|
|
UserID int
|
|
Title string
|
|
VideoData []byte
|
|
FileName string
|
|
ContentType string
|
|
}
|