go_dreamfactory/sys/configure/structs/Game.itinerant_thingData.go
2023-04-17 18:55:11 +08:00

127 lines
6.5 KiB
Go

//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Gameitinerant_thingData struct {
Id int32
Goodsname string
Goodsinfor string
Goodsicon string
Goodsprice int32
Changeperiod []int32
Changetime int32
PriceChangeWeight []int32
PriceChangeWeightOne []int32
PriceChangeWeightTwo []int32
PriceChangeWeightThree []int32
FluctuationRange int32
Pricemin int32
Pricemax int32
}
const TypeId_Gameitinerant_thingData = -91590553
func (*Gameitinerant_thingData) GetTypeId() int32 {
return -91590553
}
func (_v *Gameitinerant_thingData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["id"].(float64); !_ok_ { err = errors.New("id error"); return }; _v.Id = int32(_tempNum_) }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["goodsname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Goodsname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Goodsname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["goodsinfor"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Goodsinfor error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Goodsinfor, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Goodsicon, _ok_ = _buf["goodsicon"].(string); !_ok_ { err = errors.New("goodsicon error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["goodsprice"].(float64); !_ok_ { err = errors.New("goodsprice error"); return }; _v.Goodsprice = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["changeperiod"].([]interface{}); !_ok_ { err = errors.New("changeperiod error"); return }
_v.Changeperiod = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Changeperiod = append(_v.Changeperiod, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["changetime"].(float64); !_ok_ { err = errors.New("changetime error"); return }; _v.Changetime = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["PriceChangeWeight"].([]interface{}); !_ok_ { err = errors.New("PriceChangeWeight error"); return }
_v.PriceChangeWeight = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.PriceChangeWeight = append(_v.PriceChangeWeight, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["PriceChangeWeight_one"].([]interface{}); !_ok_ { err = errors.New("PriceChangeWeight_one error"); return }
_v.PriceChangeWeightOne = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.PriceChangeWeightOne = append(_v.PriceChangeWeightOne, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["PriceChangeWeight_two"].([]interface{}); !_ok_ { err = errors.New("PriceChangeWeight_two error"); return }
_v.PriceChangeWeightTwo = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.PriceChangeWeightTwo = append(_v.PriceChangeWeightTwo, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["PriceChangeWeight_three"].([]interface{}); !_ok_ { err = errors.New("PriceChangeWeight_three error"); return }
_v.PriceChangeWeightThree = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.PriceChangeWeightThree = append(_v.PriceChangeWeightThree, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["FluctuationRange"].(float64); !_ok_ { err = errors.New("FluctuationRange error"); return }; _v.FluctuationRange = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pricemin"].(float64); !_ok_ { err = errors.New("pricemin error"); return }; _v.Pricemin = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pricemax"].(float64); !_ok_ { err = errors.New("pricemax error"); return }; _v.Pricemax = int32(_tempNum_) }
return
}
func DeserializeGameitinerant_thingData(_buf map[string]interface{}) (*Gameitinerant_thingData, error) {
v := &Gameitinerant_thingData{}
if err := v.Deserialize(_buf); err == nil {
return v, nil
} else {
return nil, err
}
}