Files
shop-user-trade/model/config/market_config.go
2026-04-02 10:22:36 +08:00

36 lines
821 B
Go

package config
// MarketConfigInterface 市场配置接口
type MarketConfigInterface interface {
GetMarketType() string
}
// PhysicalMarketConfig 实物市场配置
type PhysicalMarketConfig struct {
DeliveryMethod string `json:"deliveryMethod"`
DeliveryFee int64 `json:"deliveryFee"`
}
func (PhysicalMarketConfig) GetMarketType() string {
return "physical"
}
// ServiceMarketConfig 服务市场配置
type ServiceMarketConfig struct {
ServiceLocation string `json:"serviceLocation"`
ServiceDuration int `json:"serviceDuration"`
}
func (ServiceMarketConfig) GetMarketType() string {
return "service"
}
// VirtualMarketConfig 虚拟市场配置
type VirtualMarketConfig struct {
TransferMethod string `json:"transferMethod"`
}
func (VirtualMarketConfig) GetMarketType() string {
return "virtual"
}