feat(tenant): 增加双站共享货架与跨站下单
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
type GameAccount struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
SourceTenantID uint64 `gorm:"not null;default:0;index:idx_game_accounts_source_tenant" json:"source_tenant_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"`
|
||||
@@ -30,6 +31,7 @@ func (GameAccount) TableName() string {
|
||||
|
||||
type RentalListing struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
SourceTenantID uint64 `gorm:"not null;default:0;index:idx_rental_listings_source_tenant" json:"source_tenant_id"`
|
||||
ListingNo string `gorm:"column:listing_no;size:20;not null;uniqueIndex" json:"listing_no"`
|
||||
AccountID uint64 `gorm:"not null;index" json:"account_id"`
|
||||
OwnerID uint64 `gorm:"not null;index" json:"owner_id"`
|
||||
|
||||
@@ -9,6 +9,9 @@ import (
|
||||
|
||||
type RentalOrder struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
BuyerTenantID uint64 `gorm:"not null;default:0;index:idx_rental_orders_buyer_tenant_created" json:"buyer_tenant_id"`
|
||||
SourceTenantID uint64 `gorm:"not null;default:0;index:idx_rental_orders_source_tenant_created" json:"source_tenant_id"`
|
||||
PaymentTenantID uint64 `gorm:"not null;default:0" json:"payment_tenant_id"`
|
||||
OrderNo string `gorm:"size:64;not null;uniqueIndex" json:"order_no"`
|
||||
ListingID uint64 `gorm:"not null;index" json:"listing_id"`
|
||||
AccountID uint64 `gorm:"not null;index" json:"account_id"`
|
||||
@@ -19,6 +22,7 @@ type RentalOrder struct {
|
||||
EstimatedDurationHours int `gorm:"not null;default:24" json:"estimated_duration_hours"`
|
||||
RentAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
OwnerRentAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
SourceAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
DepositAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
DepositOriginalAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
DepositWaivedAmountCent int64 `gorm:"not null;default:0" json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user