go_dreamfactory/sys/configure/structs/game.chatSystemData.go
2022-07-20 17:56:09 +08:00

55 lines
2.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 Game_chatSystemData struct {
Key int32
Type int32
Title string
Close string
Test string
Data int32
Week []int32
TimeH int32
TimeM int32
}
func (Game_chatSystemData) GetTypeId() int {
return -198348435
}
func NewGame_chatSystemData(_buf map[string]interface{}) (_v *Game_chatSystemData, err error) {
_v = &Game_chatSystemData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
{ var _ok_ bool; if _v.Title, _ok_ = _buf["title"].(string); !_ok_ { err = errors.New("title error"); return } }
{ var _ok_ bool; if _v.Close, _ok_ = _buf["close"].(string); !_ok_ { err = errors.New("close error"); return } }
{ var _ok_ bool; if _v.Test, _ok_ = _buf["test"].(string); !_ok_ { err = errors.New("test error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["data"].(float64); !_ok_ { err = errors.New("data error"); return }; _v.Data = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["week"].([]interface{}); !_ok_ { err = errors.New("week error"); return }
_v.Week = 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.Week = append(_v.Week, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time_h"].(float64); !_ok_ { err = errors.New("time_h error"); return }; _v.TimeH = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["time_m"].(float64); !_ok_ { err = errors.New("time_m error"); return }; _v.TimeM = int32(_tempNum_) }
return
}