27 lines
1.2 KiB
Go
27 lines
1.2 KiB
Go
![]() |
package data
|
||
|
|
||
|
type Shop struct {
|
||
|
Id int `json:"id"` //索引
|
||
|
ItemId int `json:"item_id"` //商品索引
|
||
|
ItemNum int `json:"item_num"` //商品数量
|
||
|
ShopType int `json:"shop_type"` //商店类型
|
||
|
PoolId int `json:"pool_id"` //商品池ID
|
||
|
PoolWeight int `json:"pool_weight"` //权重值
|
||
|
PriceType int `json:"price_type"` //价格类型
|
||
|
Price int `json:"price"` //物品单价
|
||
|
TimeNum int `json:"time_num"` //限购次数重置时间
|
||
|
LimitNum int `json:"limit_num"` //限购数量
|
||
|
IncrementalUnitPrice []int `json:"incremental_unit_price"` //递增价格
|
||
|
ConsumeItemId int `json:"consume_item_id"` //消耗物品
|
||
|
ConsumeItemNum int `json:"consume_item_num"` //消耗数量
|
||
|
OnlyOne int `json:"only_one"` //终生购买次数
|
||
|
}
|
||
|
|
||
|
func (data *Shop) id() int {
|
||
|
return data.Id
|
||
|
}
|
||
|
|
||
|
type ShopTable struct {
|
||
|
table[int, *Shop]
|
||
|
}
|