86 lines
2.9 KiB
Go
86 lines
2.9 KiB
Go
package dto
|
|
|
|
import "time"
|
|
|
|
type LiveStreamResponse struct {
|
|
StreamID string `json:"streamId"`
|
|
PublisherOnline bool `json:"publisherOnline"`
|
|
SubscriberCount int `json:"subscriberCount"`
|
|
}
|
|
type LiveListRequest struct {
|
|
Page int `form:"page" json:"page"`
|
|
PageSize int `form:"pageSize" json:"pageSize"`
|
|
OrderBy string `form:"orderBy" json:"orderBy"`
|
|
}
|
|
type LiveCategoryListRequest struct {
|
|
LiveListRequest
|
|
Name string `form:"name"`
|
|
Enabled *bool `form:"enabled"`
|
|
}
|
|
type LiveCategoryRequest struct {
|
|
Name string `json:"name" binding:"required"`
|
|
Icon string `json:"icon"`
|
|
Sort int `json:"sort"`
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
type LiveCategoryResponse struct {
|
|
ID uint `json:"id"`
|
|
Name string `json:"name"`
|
|
Icon string `json:"icon"`
|
|
Sort int `json:"sort"`
|
|
Enabled bool `json:"enabled"`
|
|
RoomCount int64 `json:"roomCount"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
type LiveRoomListRequest struct {
|
|
LiveListRequest
|
|
Name string `form:"name"`
|
|
AnchorName string `form:"anchorName"`
|
|
CategoryID uint `form:"categoryId"`
|
|
Status string `form:"status"`
|
|
Enabled *bool `form:"enabled"`
|
|
StartedAt string `form:"startedAt"`
|
|
EndedAt string `form:"endedAt"`
|
|
}
|
|
type LiveRoomRequest struct {
|
|
Name string `json:"name" binding:"required"`
|
|
CategoryID uint `json:"categoryId" binding:"required"`
|
|
CoverURL string `json:"coverUrl" binding:"required"`
|
|
Intro string `json:"intro"`
|
|
Sort int `json:"sort"`
|
|
AnchorUserID uint `json:"anchorUserId" binding:"required"`
|
|
StreamURL string `json:"streamUrl"`
|
|
ReplayURL string `json:"replayUrl"`
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
type LiveRoomResponse struct {
|
|
ID uint `json:"id"`
|
|
StreamID string `json:"streamId"`
|
|
Name string `json:"name"`
|
|
CategoryID uint `json:"categoryId"`
|
|
CategoryName string `json:"categoryName"`
|
|
CoverURL string `json:"coverUrl"`
|
|
Intro string `json:"intro"`
|
|
Sort int `json:"sort"`
|
|
AnchorUserID uint `json:"anchorUserId"`
|
|
AnchorName string `json:"anchorName"`
|
|
AnchorAvatar string `json:"anchorAvatar"`
|
|
StreamURL string `json:"streamUrl"`
|
|
ReplayURL string `json:"replayUrl"`
|
|
Enabled bool `json:"enabled"`
|
|
Status string `json:"status"`
|
|
ViewerCount int `json:"viewerCount"`
|
|
ViewerCountText string `json:"viewerCountText"`
|
|
LikeCount int `json:"likeCount"`
|
|
StartedAt *time.Time `json:"startedAt,omitempty"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
type LiveStatusRequest struct {
|
|
Enabled bool `json:"enabled"`
|
|
}
|
|
type LiveSortRequest struct {
|
|
Values map[uint]int `json:"values" binding:"required"`
|
|
}
|