73 lines
2.7 KiB
Go
73 lines
2.7 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"`
|
|
PriceHourly float64 `json:"price_hourly"`
|
|
PriceDaily float64 `json:"price_daily"`
|
|
PriceWeekly float64 `json:"price_weekly"`
|
|
DepositAmount float64 `json:"deposit_amount"`
|
|
MinRentHours int `json:"min_rent_hours"`
|
|
MaxRentHours int `json:"max_rent_hours"`
|
|
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"`
|
|
PriceHourly float64 `json:"price_hourly" binding:"required"`
|
|
PriceDaily float64 `json:"price_daily"`
|
|
PriceWeekly float64 `json:"price_weekly"`
|
|
DepositAmount float64 `json:"deposit_amount" binding:"required"`
|
|
MinRentHours int `json:"min_rent_hours" binding:"required"`
|
|
MaxRentHours int `json:"max_rent_hours" binding:"required"`
|
|
}
|
|
|
|
type UpdateRequest = CreateRequest
|
|
|
|
type ReviewRequest struct {
|
|
Reason string `json:"reason"`
|
|
}
|
|
|
|
type AdminListQuery struct {
|
|
OwnerID uint64
|
|
Status string
|
|
ReviewStatus string
|
|
Limit int
|
|
}
|
|
|
|
type AdminActionRequest struct {
|
|
Reason string `json:"reason" binding:"required"`
|
|
}
|
|
|
|
type AuditMeta struct {
|
|
IP string
|
|
UserAgent string
|
|
}
|