代码初始化
This commit is contained in:
35
model/config/market_config.go
Normal file
35
model/config/market_config.go
Normal file
@@ -0,0 +1,35 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user