36 lines
821 B
Go
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"
|
|
}
|