469 lines
16 KiB
Go
469 lines
16 KiB
Go
package domain
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type BaseResultResponse struct {
|
|
Success int `json:"success"`
|
|
Results []json.RawMessage `json:"results"`
|
|
}
|
|
|
|
type LeagueResultResponse struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
}
|
|
|
|
type TeamResultResponse struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID ValidInt64 `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
}
|
|
|
|
type ScoreResultResponse struct {
|
|
Home string `json:"home"`
|
|
Away string `json:"away"`
|
|
}
|
|
|
|
type CommonResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus ValidInt64 `json:"time_status"`
|
|
League LeagueResultResponse `json:"league"`
|
|
Home TeamResultResponse `json:"home"`
|
|
Away TeamResultResponse `json:"away"`
|
|
SS string `json:"ss"`
|
|
}
|
|
|
|
type FootballResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League LeagueResultResponse `json:"league"`
|
|
Home TeamResultResponse `json:"home"`
|
|
Away TeamResultResponse `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstHalf ScoreResultResponse `json:"1"`
|
|
SecondHalf ScoreResultResponse `json:"2"`
|
|
} `json:"scores"`
|
|
Stats struct {
|
|
Attacks []string `json:"attacks"`
|
|
Corners []string `json:"corners"`
|
|
HalfTimeCorners []string `json:"corner_h"`
|
|
DangerousAttacks []string `json:"dangerous_attacks"`
|
|
Goals []string `json:"goals"`
|
|
OffTarget []string `json:"off_target"`
|
|
OnTarget []string `json:"on_target"`
|
|
Penalties []string `json:"penalties"`
|
|
PossessionRT []string `json:"possession_rt"`
|
|
RedCards []string `json:"redcards"`
|
|
Substitutions []string `json:"substitutions"`
|
|
YellowCards []string `json:"yellowcards"`
|
|
} `json:"stats"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
Round string `json:"round"`
|
|
} `json:"extra"`
|
|
Events []map[string]string `json:"events"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
type BasketballResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League LeagueResultResponse `json:"league"`
|
|
Home TeamResultResponse `json:"home"`
|
|
Away TeamResultResponse `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstQuarter ScoreResultResponse `json:"1"`
|
|
SecondQuarter ScoreResultResponse `json:"2"`
|
|
FirstHalf ScoreResultResponse `json:"3"`
|
|
ThirdQuarter ScoreResultResponse `json:"4"`
|
|
FourthQuarter ScoreResultResponse `json:"5"`
|
|
TotalScore ScoreResultResponse `json:"7"`
|
|
} `json:"scores"`
|
|
Stats struct {
|
|
TwoPoints []string `json:"2points"`
|
|
ThreePoints []string `json:"3points"`
|
|
BiggestLead []string `json:"biggest_lead"`
|
|
Fouls []string `json:"fouls"`
|
|
FreeThrows []string `json:"free_throws"`
|
|
FreeThrowRate []string `json:"free_throws_rate"`
|
|
LeadChanges []string `json:"lead_changes"`
|
|
MaxpointsInarow []string `json:"maxpoints_inarow"`
|
|
Possession []string `json:"possession"`
|
|
SuccessAttempts []string `json:"success_attempts"`
|
|
TimeSpendInLead []string `json:"timespent_inlead"`
|
|
TimeOuts []string `json:"time_outs"`
|
|
} `json:"stats"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
AwayManager map[string]string `json:"away_manager"`
|
|
HomeManager map[string]string `json:"home_manager"`
|
|
NumberOfPeriods string `json:"numberofperiods"`
|
|
PeriodLength string `json:"periodlength"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
Length int `json:"length"`
|
|
Round string `json:"round"`
|
|
} `json:"extra"`
|
|
Events []map[string]string `json:"events"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
type IceHockeyResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League LeagueResultResponse `json:"league"`
|
|
Home TeamResultResponse `json:"home"`
|
|
Away TeamResultResponse `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstPeriod ScoreResultResponse `json:"1"`
|
|
SecondPeriod ScoreResultResponse `json:"2"`
|
|
ThirdPeriod ScoreResultResponse `json:"3"`
|
|
TotalScore ScoreResultResponse `json:"5"`
|
|
} `json:"scores"`
|
|
|
|
Stats struct {
|
|
Shots []string `json:"shots"`
|
|
Penalties []string `json:"penalties"`
|
|
GoalsOnPowerPlay []string `json:"goals_on_power_play"`
|
|
SSeven []string `json:"s7"`
|
|
} `json:"stats"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
AwayManager map[string]string `json:"away_manager"`
|
|
HomeManager map[string]string `json:"home_manager"`
|
|
NumberOfPeriods string `json:"numberofperiods"`
|
|
PeriodLength string `json:"periodlength"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
Length int `json:"length"`
|
|
Round string `json:"round"`
|
|
} `json:"extra"`
|
|
Events []map[string]string `json:"events"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
type CricketResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
NumberOfPeriods string `json:"numberofperiods"`
|
|
PeriodLength string `json:"periodlength"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
} `json:"extra"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
type VolleyballResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstSet ScoreResultResponse `json:"1"`
|
|
SecondSet ScoreResultResponse `json:"2"`
|
|
ThirdSet ScoreResultResponse `json:"3"`
|
|
FourthSet ScoreResultResponse `json:"4"`
|
|
FivethSet ScoreResultResponse `json:"5"`
|
|
} `json:"scores"`
|
|
Stats struct {
|
|
PointsWonOnServe []string `json:"points_won_on_serve"`
|
|
LongestStreak []string `json:"longest_streak"`
|
|
} `json:"stats"`
|
|
InplayCreatedAt string `json:"inplay_created_at"`
|
|
InplayUpdatedAt string `json:"inplay_updated_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
type DartsResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
InplayCreatedAt string `json:"inplay_created_at"`
|
|
InplayUpdatedAt string `json:"inplay_updated_at"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
type FutsalResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstPeriod ScoreResultResponse `json:"1"`
|
|
SecondPeriod ScoreResultResponse `json:"2"`
|
|
ThirdPeriod ScoreResultResponse `json:"3"`
|
|
TotalScore ScoreResultResponse `json:"4"`
|
|
} `json:"scores"`
|
|
Events []map[string]string `json:"events"`
|
|
InplayCreatedAt string `json:"inplay_created_at"`
|
|
InplayUpdatedAt string `json:"inplay_updated_at"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
// NFLResultResponse represents the structure for NFL game results
|
|
type NFLResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstQuarter ScoreResultResponse `json:"1"`
|
|
SecondQuarter ScoreResultResponse `json:"2"`
|
|
ThirdQuarter ScoreResultResponse `json:"3"`
|
|
FourthQuarter ScoreResultResponse `json:"4"`
|
|
Overtime ScoreResultResponse `json:"5"`
|
|
TotalScore ScoreResultResponse `json:"7"`
|
|
} `json:"scores"`
|
|
Stats struct {
|
|
FirstDowns []string `json:"first_downs"`
|
|
TotalYards []string `json:"total_yards"`
|
|
PassingYards []string `json:"passing_yards"`
|
|
RushingYards []string `json:"rushing_yards"`
|
|
Turnovers []string `json:"turnovers"`
|
|
TimeOfPossession []string `json:"time_of_possession"`
|
|
ThirdDownEfficiency []string `json:"third_down_efficiency"`
|
|
FourthDownEfficiency []string `json:"fourth_down_efficiency"`
|
|
} `json:"stats"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
Round string `json:"round"`
|
|
} `json:"extra"`
|
|
Events []map[string]string `json:"events"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
// RugbyResultResponse represents the structure for Rugby game results
|
|
type RugbyResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstHalf ScoreResultResponse `json:"1"`
|
|
SecondHalf ScoreResultResponse `json:"2"`
|
|
TotalScore ScoreResultResponse `json:"7"`
|
|
} `json:"scores"`
|
|
Stats struct {
|
|
Tries []string `json:"tries"`
|
|
Conversions []string `json:"conversions"`
|
|
Penalties []string `json:"penalties"`
|
|
DropGoals []string `json:"drop_goals"`
|
|
Possession []string `json:"possession"`
|
|
Territory []string `json:"territory"`
|
|
Lineouts []string `json:"lineouts"`
|
|
Scrums []string `json:"scrums"`
|
|
PenaltiesConceded []string `json:"penalties_conceded"`
|
|
} `json:"stats"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
Round string `json:"round"`
|
|
} `json:"extra"`
|
|
Events []map[string]string `json:"events"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|
|
|
|
// BaseballResultResponse represents the structure for Baseball game results
|
|
type BaseballResultResponse struct {
|
|
ID string `json:"id"`
|
|
SportID string `json:"sport_id"`
|
|
Time string `json:"time"`
|
|
TimeStatus string `json:"time_status"`
|
|
League struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
} `json:"league"`
|
|
Home struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"home"`
|
|
Away struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID string `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
} `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstInning ScoreResultResponse `json:"1"`
|
|
SecondInning ScoreResultResponse `json:"2"`
|
|
ThirdInning ScoreResultResponse `json:"3"`
|
|
FourthInning ScoreResultResponse `json:"4"`
|
|
FifthInning ScoreResultResponse `json:"5"`
|
|
SixthInning ScoreResultResponse `json:"6"`
|
|
SeventhInning ScoreResultResponse `json:"7"`
|
|
EighthInning ScoreResultResponse `json:"8"`
|
|
NinthInning ScoreResultResponse `json:"9"`
|
|
ExtraInnings ScoreResultResponse `json:"10"`
|
|
TotalScore ScoreResultResponse `json:"11"`
|
|
} `json:"scores"`
|
|
Stats struct {
|
|
Hits []string `json:"hits"`
|
|
Errors []string `json:"errors"`
|
|
LeftOnBase []string `json:"left_on_base"`
|
|
Strikeouts []string `json:"strikeouts"`
|
|
Walks []string `json:"walks"`
|
|
HomeRuns []string `json:"home_runs"`
|
|
TotalBases []string `json:"total_bases"`
|
|
BattingAverage []string `json:"batting_average"`
|
|
} `json:"stats"`
|
|
Extra struct {
|
|
HomePos string `json:"home_pos"`
|
|
AwayPos string `json:"away_pos"`
|
|
StadiumData map[string]string `json:"stadium_data"`
|
|
Round string `json:"round"`
|
|
} `json:"extra"`
|
|
Events []map[string]string `json:"events"`
|
|
HasLineup int `json:"has_lineup"`
|
|
ConfirmedAt string `json:"confirmed_at"`
|
|
Bet365ID string `json:"bet365_id"`
|
|
}
|