119 lines
3.5 KiB
Go
119 lines
3.5 KiB
Go
package listing
|
|
|
|
import "time"
|
|
|
|
type ListingDTO struct {
|
|
ID uint64 `json:"id"`
|
|
AccountID uint64 `json:"account_id"`
|
|
OwnerID uint64 `json:"owner_id"`
|
|
OwnerPhone string `json:"owner_phone,omitempty"`
|
|
OwnerNickname string `json:"owner_nickname,omitempty"`
|
|
Title string `json:"title"`
|
|
Description string `json:"description"`
|
|
GameName string `json:"game_name"`
|
|
ServerRegion string `json:"server_region"`
|
|
LoginPlatform string `json:"login_platform"`
|
|
RankLevel string `json:"rank_level"`
|
|
HafCoinAmount int64 `json:"haf_coin_amount"`
|
|
AssetSummary map[string]any `json:"asset_summary,omitempty"`
|
|
ScreenshotURLS []string `json:"screenshot_urls"`
|
|
CoverURL string `json:"cover_url"`
|
|
Price float64 `json:"price"`
|
|
DepositAmount float64 `json:"deposit_amount"`
|
|
IsAccelerated bool `json:"is_accelerated_sale"`
|
|
InTransaction bool `json:"in_transaction"`
|
|
Status string `json:"status"`
|
|
ReviewStatus string `json:"review_status"`
|
|
ReviewReason string `json:"review_reason"`
|
|
PublishedAt *time.Time `json:"published_at"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type CreateRequest struct {
|
|
Title string `json:"title" binding:"required"`
|
|
Description string `json:"description"`
|
|
ServerRegion string `json:"server_region" binding:"required"`
|
|
LoginPlatform string `json:"login_platform"`
|
|
RankLevel string `json:"rank_level"`
|
|
HafCoinAmount int64 `json:"haf_coin_amount"`
|
|
AssetSummary map[string]any `json:"asset_summary"`
|
|
ScreenshotURLS []string `json:"screenshot_urls"`
|
|
Price float64 `json:"price"`
|
|
DepositAmount float64 `json:"deposit_amount"`
|
|
}
|
|
|
|
type UpdateRequest = CreateRequest
|
|
|
|
type ReviewRequest struct {
|
|
Reason string `json:"reason"`
|
|
}
|
|
|
|
type AdminListQuery struct {
|
|
OwnerID uint64
|
|
Status string
|
|
ReviewStatus string
|
|
Limit int
|
|
Page int
|
|
PageSize int
|
|
}
|
|
|
|
type AdminListResult struct {
|
|
Items []ListingDTO `json:"items"`
|
|
Total int64 `json:"total"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
}
|
|
|
|
type PublicListQuery struct {
|
|
Page int
|
|
PageSize int
|
|
Keyword string
|
|
Sort string
|
|
Zone string
|
|
Server []string
|
|
Region []string
|
|
LoginMethod []string
|
|
Rank []string
|
|
Insurance []string
|
|
Stamina []string
|
|
Load []string
|
|
SkinGroup []string
|
|
SkinName []string
|
|
MinCoin *float64
|
|
MaxCoin *float64
|
|
MinPrice *float64
|
|
MaxPrice *float64
|
|
MinDeposit *float64
|
|
MaxDeposit *float64
|
|
MinTotal *float64
|
|
MaxTotal *float64
|
|
MinFireLevel *float64
|
|
MaxFireLevel *float64
|
|
MinSecretKD *float64
|
|
MaxSecretKD *float64
|
|
ResourceRanges map[string]NumberRange
|
|
}
|
|
|
|
type NumberRange struct {
|
|
Min *float64
|
|
Max *float64
|
|
}
|
|
|
|
type PublicListResult struct {
|
|
Items []ListingDTO `json:"items"`
|
|
Total int64 `json:"total"`
|
|
Page int `json:"page"`
|
|
PageSize int `json:"page_size"`
|
|
ZoneCounts map[string]int64 `json:"zone_counts"`
|
|
}
|
|
|
|
type AdminActionRequest struct {
|
|
Reason string `json:"reason" binding:"required"`
|
|
}
|
|
|
|
type AuditMeta struct {
|
|
IP string
|
|
UserAgent string
|
|
}
|