feat: live module and jenkins pipeline to harbor deploy
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package dto
|
||||
|
||||
type DashboardResponse struct {
|
||||
RoomTotal int64 `json:"roomTotal"`
|
||||
RoomLive int64 `json:"roomLive"`
|
||||
RechargeCents int64 `json:"rechargeCents"`
|
||||
PaidOrderCount int64 `json:"paidOrderCount"`
|
||||
GiftDiamonds int64 `json:"giftDiamonds"`
|
||||
GiftSendCount int64 `json:"giftSendCount"`
|
||||
DiamondRateCents int64 `json:"diamondRateCents"`
|
||||
RechargeTrend []DashboardTrend `json:"rechargeTrend"`
|
||||
GiftRanking []DashboardRank `json:"giftRanking"`
|
||||
}
|
||||
type DashboardTrend struct {
|
||||
Date string `json:"date"`
|
||||
AmountCents int64 `json:"amountCents"`
|
||||
}
|
||||
type DashboardRank struct {
|
||||
RoomID uint `json:"roomId"`
|
||||
RoomName string `json:"roomName"`
|
||||
AnchorName string `json:"anchorName"`
|
||||
Diamonds int64 `json:"diamonds"`
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type AssetUserListRequest struct {
|
||||
LiveListRequest
|
||||
Keyword string `form:"keyword"`
|
||||
UserID uint `form:"userId"`
|
||||
Enabled *bool `form:"enabled"`
|
||||
StartedAt string `form:"startedAt"`
|
||||
EndedAt string `form:"endedAt"`
|
||||
}
|
||||
type AssetAdjustmentRequest struct {
|
||||
Type string `json:"type" binding:"required"`
|
||||
Amount int64 `json:"amount" binding:"required"`
|
||||
Reason string `json:"reason" binding:"required"`
|
||||
}
|
||||
type AssetOrderRecord struct {
|
||||
OrderNo string `json:"orderNo"`
|
||||
Diamonds int64 `json:"diamonds"`
|
||||
AmountCents int64 `json:"amountCents"`
|
||||
Status string `json:"status"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
type AssetSendRecord struct {
|
||||
SerialNo string `json:"serialNo"`
|
||||
RoomName string `json:"roomName"`
|
||||
GiftName string `json:"giftName"`
|
||||
GiftIcon string `json:"giftIcon"`
|
||||
DiamondTotal int64 `json:"diamondTotal"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
type AssetUserResponse struct {
|
||||
UserID uint `json:"userId"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Enabled bool `json:"enabled"`
|
||||
DiamondBalance int64 `json:"diamondBalance"`
|
||||
TotalRechargeCents int64 `json:"totalRechargeCents"`
|
||||
TotalSpentDiamonds int64 `json:"totalSpentDiamonds"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
LastLoginAt *time.Time `json:"lastLoginAt"`
|
||||
RecentOrders []AssetOrderRecord `json:"recentOrders,omitempty"`
|
||||
RecentSends []AssetSendRecord `json:"recentSends,omitempty"`
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type GiftListRequest struct {
|
||||
LiveListRequest
|
||||
Name string `form:"name"`
|
||||
MinPrice int64 `form:"minPrice"`
|
||||
MaxPrice int64 `form:"maxPrice"`
|
||||
Enabled *bool `form:"enabled"`
|
||||
}
|
||||
type GiftRequest struct {
|
||||
Name string `json:"name" binding:"required"`
|
||||
Icon string `json:"icon" binding:"required"`
|
||||
Price int64 `json:"price" binding:"required"`
|
||||
Description string `json:"description"`
|
||||
Tiers []int `json:"tiers" binding:"required"`
|
||||
Sort int `json:"sort"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
type GiftResponse struct {
|
||||
ID uint `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Icon string `json:"icon"`
|
||||
Price int64 `json:"price"`
|
||||
Description string `json:"description"`
|
||||
Tiers []int `json:"tiers"`
|
||||
Sort int `json:"sort"`
|
||||
Enabled bool `json:"enabled"`
|
||||
SendCount int64 `json:"sendCount"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
type GiftSendListRequest struct {
|
||||
LiveListRequest
|
||||
RoomName string `form:"roomName"`
|
||||
AnchorName string `form:"anchorName"`
|
||||
UserKeyword string `form:"userKeyword"`
|
||||
GiftID uint `form:"giftId"`
|
||||
StartedAt string `form:"startedAt"`
|
||||
EndedAt string `form:"endedAt"`
|
||||
}
|
||||
type GiftSendRequest struct {
|
||||
GiftID uint `json:"giftId" binding:"required"`
|
||||
Quantity int `json:"quantity" binding:"required"`
|
||||
}
|
||||
type GiftSendResponse struct {
|
||||
ID uint `json:"id"`
|
||||
SerialNo string `json:"serialNo"`
|
||||
UserID uint `json:"userId"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
RoomID *uint `json:"roomId"`
|
||||
RoomName string `json:"roomName"`
|
||||
RoomDeleted bool `json:"roomDeleted"`
|
||||
AnchorUserID uint `json:"anchorUserId"`
|
||||
AnchorName string `json:"anchorName"`
|
||||
GiftID *uint `json:"giftId"`
|
||||
GiftName string `json:"giftName"`
|
||||
GiftIcon string `json:"giftIcon"`
|
||||
GiftPrice int64 `json:"giftPrice"`
|
||||
Quantity int `json:"quantity"`
|
||||
DiamondTotal int64 `json:"diamondTotal"`
|
||||
EquivalentCents int64 `json:"equivalentCents"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
type GiftSendSummary struct {
|
||||
Count int64 `json:"count"`
|
||||
Diamonds int64 `json:"diamonds"`
|
||||
AmountCents int64 `json:"amountCents"`
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
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"`
|
||||
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"`
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type LiveChatHistoryRequest struct {
|
||||
Limit int `form:"limit"`
|
||||
}
|
||||
|
||||
type LiveChatMessageResponse struct {
|
||||
ID uint `json:"id"`
|
||||
RoomID uint `json:"roomId"`
|
||||
Type string `json:"type"`
|
||||
UserID uint `json:"userId"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Content string `json:"content,omitempty"`
|
||||
GiftID uint `json:"giftId,omitempty"`
|
||||
GiftName string `json:"giftName,omitempty"`
|
||||
GiftIcon string `json:"giftIcon,omitempty"`
|
||||
Quantity int `json:"quantity,omitempty"`
|
||||
DiamondTotal int64 `json:"diamondTotal,omitempty"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type LiveClientLoginRequest struct {
|
||||
Username string `json:"username" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
}
|
||||
|
||||
type LiveClientRegisterRequest struct {
|
||||
Username string `json:"username" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
ConfirmPassword string `json:"confirmPassword" binding:"required"`
|
||||
}
|
||||
|
||||
type LiveClientProfileRequest struct {
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
}
|
||||
|
||||
type LiveClientPasswordRequest struct {
|
||||
OldPassword string `json:"oldPassword" binding:"required"`
|
||||
NewPassword string `json:"newPassword" binding:"required"`
|
||||
ConfirmPassword string `json:"confirmPassword" binding:"required"`
|
||||
}
|
||||
|
||||
type LiveClientAccountResponse struct {
|
||||
UserID uint `json:"userId"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Avatar string `json:"avatar"`
|
||||
Enabled bool `json:"enabled"`
|
||||
DiamondBalance int64 `json:"diamondBalance"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
}
|
||||
|
||||
type LiveClientAuthResponse struct {
|
||||
User *LiveClientAccountResponse `json:"user"`
|
||||
Token string `json:"token"`
|
||||
ExpiresAt int64 `json:"expiresAt"`
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package dto
|
||||
|
||||
type PlatformSetting struct {
|
||||
DiamondRateCents int64 `json:"diamondRateCents"`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package dto
|
||||
|
||||
import "time"
|
||||
|
||||
type RechargePlan struct {
|
||||
ID uint `json:"id"`
|
||||
Sort int `json:"sort"`
|
||||
Diamonds int64 `json:"diamonds"`
|
||||
AmountCents int64 `json:"amountCents"`
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
type RechargePlansRequest struct {
|
||||
Plans []*RechargePlan `json:"plans" binding:"required"`
|
||||
}
|
||||
type RechargeOrderListRequest struct {
|
||||
LiveListRequest
|
||||
OrderNo string `form:"orderNo"`
|
||||
UserKeyword string `form:"userKeyword"`
|
||||
PaymentStatus string `form:"paymentStatus"`
|
||||
Provider string `form:"provider"`
|
||||
StartedAt string `form:"startedAt"`
|
||||
EndedAt string `form:"endedAt"`
|
||||
}
|
||||
type RechargeOrderRequest struct {
|
||||
PlanID uint `json:"planId" binding:"required"`
|
||||
Provider string `json:"provider" binding:"required"`
|
||||
NotifyURL string `json:"notifyUrl"`
|
||||
ReturnURL string `json:"returnUrl"`
|
||||
Extra map[string]any `json:"extra"`
|
||||
ClientIP string `json:"-"`
|
||||
UserAgent string `json:"-"`
|
||||
DeviceID string `json:"-"`
|
||||
}
|
||||
type RechargeOrderResponse struct {
|
||||
ID uint `json:"id"`
|
||||
OrderNo string `json:"orderNo"`
|
||||
UserID uint `json:"userId"`
|
||||
Username string `json:"username"`
|
||||
Nickname string `json:"nickname"`
|
||||
Diamonds int64 `json:"diamonds"`
|
||||
AmountCents int64 `json:"amountCents"`
|
||||
Provider string `json:"provider"`
|
||||
ProviderTradeNo string `json:"providerTradeNo"`
|
||||
PaymentStatus string `json:"paymentStatus"`
|
||||
FulfillmentStatus string `json:"fulfillmentStatus"`
|
||||
RefundStatus string `json:"refundStatus"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
CreditedAt *time.Time `json:"creditedAt"`
|
||||
}
|
||||
type RechargeCheckoutResponse struct {
|
||||
Order *RechargeOrderResponse `json:"order"`
|
||||
Payment *PaymentResultResponse `json:"payment"`
|
||||
}
|
||||
type RechargeSummary struct {
|
||||
Count int64 `json:"count"`
|
||||
PaidCount int64 `json:"paidCount"`
|
||||
AmountCents int64 `json:"amountCents"`
|
||||
}
|
||||
Reference in New Issue
Block a user