package model import ( "strings" "time" ) // 游戏基础表-BaseData exported from Base表.xlsx type BaseData struct { Uid int64 `json:"Uid"` // 编号 Key string `json:"Key"` // key Format string `json:"Format"` // 格式 服务端根据此字段识别格式 Value string `json:"Value"` // 参数值 } type Timestamp int64 func (t *Timestamp) UnmarshalJSON(b []byte) error { // Remove quotes s := strings.Trim(string(b), "\"") // Parse the date string parsedTime, err := time.ParseInLocation("2006/01/02", s, time.Local) if err != nil { return err } // Convert to Unix timestamp *t = Timestamp(parsedTime.Unix()) return nil } type BaseData2 struct { ChapterStartTime Timestamp `json:"StartTime"` // 章节基准时间 }