Files
bl/common/data/xmlres/shop.go

17 lines
690 B
Go
Raw Normal View History

package xmlres
// Root 对应 XML 根节点 <root>
type ShopRoot struct {
Items []ShopItem `xml:"item"` // 所有 <item> 子节点映射为 Items 切片
}
// Item 对应 XML 中的 <item> 节点
type ShopItem struct {
ItemID string `xml:"itemID,attr"` // 物品ID属性
Name string `xml:"name,attr"` // 物品名称(属性)
ProductID string `xml:"productID,attr"` // 商品ID属性可能为空
Price int `xml:"price,attr"` // 金豆价格(属性,整数)
Vip float64 `xml:"vip,attr"` // VIP折扣属性小数
MoneyType string `xml:"moneyType,attr"` // 货币类型属性部分item可能缺失
}