feat(tenant): 增加双站共享货架与跨站下单

This commit is contained in:
yml
2026-11-15 15:45:00 +08:00
parent abf0fce89b
commit 4eb2bc253b
20 changed files with 767 additions and 31 deletions
+4
View File
@@ -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:"-"`