第 3 阶段:租号发布与审核
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
type GameAccount struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
OwnerID uint64 `gorm:"not null;index" json:"owner_id"`
|
||||
GameName string `gorm:"size:64;not null;default:'delta_force'" json:"game_name"`
|
||||
ServerRegion string `gorm:"size:64;not null" json:"server_region"`
|
||||
LoginPlatform string `gorm:"size:64;not null" json:"login_platform"`
|
||||
Title string `gorm:"size:128;not null" json:"title"`
|
||||
Description string `json:"description"`
|
||||
RankLevel string `gorm:"size:64;not null;default:''" json:"rank_level"`
|
||||
HafCoinAmount int64 `gorm:"not null;default:0" json:"haf_coin_amount"`
|
||||
AssetSummary datatypes.JSON `json:"asset_summary"`
|
||||
SeasonTags datatypes.JSON `json:"season_tags"`
|
||||
ScreenshotURLS datatypes.JSON `gorm:"column:screenshot_urls" json:"screenshot_urls"`
|
||||
Status string `gorm:"size:32;not null;default:'draft'" json:"status"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (GameAccount) TableName() string {
|
||||
return "game_accounts"
|
||||
}
|
||||
|
||||
type RentalListing struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
AccountID uint64 `gorm:"not null;index" json:"account_id"`
|
||||
OwnerID uint64 `gorm:"not null;index" json:"owner_id"`
|
||||
PriceHourly float64 `gorm:"type:decimal(12,2);not null;default:0" json:"price_hourly"`
|
||||
PriceDaily float64 `gorm:"type:decimal(12,2);not null;default:0" json:"price_daily"`
|
||||
PriceWeekly float64 `gorm:"type:decimal(12,2);not null;default:0" json:"price_weekly"`
|
||||
DepositAmount float64 `gorm:"type:decimal(12,2);not null;default:0" json:"deposit_amount"`
|
||||
MinRentHours int `gorm:"not null;default:1" json:"min_rent_hours"`
|
||||
MaxRentHours int `gorm:"not null;default:168" json:"max_rent_hours"`
|
||||
Status string `gorm:"size:32;not null;default:'draft'" json:"status"`
|
||||
ReviewStatus string `gorm:"size:32;not null;default:'none'" json:"review_status"`
|
||||
ReviewReason string `gorm:"size:255;not null;default:''" json:"review_reason"`
|
||||
PublishedAt *time.Time `json:"published_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (RentalListing) TableName() string {
|
||||
return "rental_listings"
|
||||
}
|
||||
Reference in New Issue
Block a user