138 lines
4.4 KiB
Go
138 lines
4.4 KiB
Go
package domain
|
|
|
|
import "encoding/json"
|
|
|
|
type BaseNonLiveOddResponse struct {
|
|
Success int `json:"success"`
|
|
Results []json.RawMessage `json:"results"`
|
|
}
|
|
|
|
type OddsSection struct {
|
|
UpdatedAt string `json:"updated_at"`
|
|
Sp map[string]OddsMarket `json:"sp"`
|
|
}
|
|
|
|
type ParseOddSectionsRes struct {
|
|
Sections map[string]OddsSection
|
|
OtherRes []OddsSection
|
|
EventFI string
|
|
}
|
|
type RawOdd struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
Header string `json:"header,omitempty"`
|
|
Handicap string `json:"handicap,omitempty"`
|
|
Odds string `json:"odds"`
|
|
}
|
|
|
|
// The Market ID for the json data can be either string / int which is causing problems when UnMarshalling
|
|
type OddsMarket struct {
|
|
ID ValidInt64 `json:"id"`
|
|
Name string `json:"name"`
|
|
Odds []json.RawMessage `json:"odds"`
|
|
Header string `json:"header,omitempty"`
|
|
Handicap string `json:"handicap,omitempty"`
|
|
Open int64 `json:"open,omitempty"`
|
|
}
|
|
|
|
type FootballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
AsianLines OddsSection `json:"asian_lines"`
|
|
Goals OddsSection `json:"goals"`
|
|
Half OddsSection `json:"half"`
|
|
}
|
|
|
|
type BasketballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
HalfProps OddsSection `json:"half_props"`
|
|
QuarterProps OddsSection `json:"quarter_props"`
|
|
TeamProps OddsSection `json:"team_props"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
|
|
type IceHockeyOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
Main2 OddsSection `json:"main_2"`
|
|
FirstPeriod OddsSection `json:"1st_period"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
type CricketOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
First_Over OddsSection `json:"1st_over"`
|
|
First_Innings OddsSection `json:"innings_1"`
|
|
Main OddsSection `json:"main"`
|
|
Match OddsSection `json:"match"`
|
|
Others []OddsSection `json:"others"`
|
|
Player OddsSection `json:"player"`
|
|
Team OddsSection `json:"team"`
|
|
}
|
|
type VolleyballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
type DartsOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
OneEightys OddsSection `json:"180s"`
|
|
Extra OddsSection `json:"extra"`
|
|
Leg OddsSection `json:"leg"`
|
|
Main OddsSection `json:"main"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
|
|
type FutsalOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
Score OddsSection `json:"score"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
|
|
type AmericanFootballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
HalfProps OddsSection `json:"half_props"`
|
|
Main OddsSection `json:"main"`
|
|
QuarterProps OddsSection `json:"quarter_props"`
|
|
Others []OddsSection `json:"others"`
|
|
}
|
|
|
|
type RugbyLeagueOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
TenMinute OddsSection `json:"10minute"`
|
|
Half OddsSection `json:"half"`
|
|
Main OddsSection `json:"main"`
|
|
Main2 OddsSection `json:"main_2"`
|
|
Others []OddsSection `json:"others"`
|
|
Player OddsSection `json:"player"`
|
|
Score OddsSection `json:"score"`
|
|
Team OddsSection `json:"team"`
|
|
}
|
|
type RugbyUnionOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Half OddsSection `json:"half"`
|
|
Main OddsSection `json:"main"`
|
|
Main2 OddsSection `json:"main_2"`
|
|
Others []OddsSection `json:"others"`
|
|
Player OddsSection `json:"player"`
|
|
Score OddsSection `json:"score"`
|
|
Team OddsSection `json:"team"`
|
|
}
|
|
type BaseballOddsResponse struct {
|
|
EventID string `json:"event_id"`
|
|
FI string `json:"FI"`
|
|
Main OddsSection `json:"main"`
|
|
MainProps OddsSection `json:"main_props"`
|
|
}
|