469 lines
15 KiB
Go
469 lines
15 KiB
Go
package domain
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type BaseResultResponse struct {
|
|
Success int `json:"success"`
|
|
Results []json.RawMessage `json:"results"`
|
|
}
|
|
|
|
type LeagueRes struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
CC string `json:"cc"`
|
|
}
|
|
|
|
type Team struct {
|
|
ID string `json:"id"`
|
|
Name string `json:"name"`
|
|
ImageID ValidInt64 `json:"image_id"`
|
|
CC string `json:"cc"`
|
|
}
|
|
|
|
type Score 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 LeagueRes `json:"league"`
|
|
Home Team `json:"home"`
|
|
Away Team `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 LeagueRes `json:"league"`
|
|
Home Team `json:"home"`
|
|
Away Team `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstHalf Score `json:"1"`
|
|
SecondHalf Score `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 LeagueRes `json:"league"`
|
|
Home Team `json:"home"`
|
|
Away Team `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstQuarter Score `json:"1"`
|
|
SecondQuarter Score `json:"2"`
|
|
FirstHalf Score `json:"3"`
|
|
ThirdQuarter Score `json:"4"`
|
|
FourthQuarter Score `json:"5"`
|
|
TotalScore Score `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 LeagueRes `json:"league"`
|
|
Home Team `json:"home"`
|
|
Away Team `json:"away"`
|
|
SS string `json:"ss"`
|
|
Scores struct {
|
|
FirstPeriod Score `json:"1"`
|
|
SecondPeriod Score `json:"2"`
|
|
ThirdPeriod Score `json:"3"`
|
|
TotalScore Score `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 Score `json:"1"`
|
|
SecondSet Score `json:"2"`
|
|
ThirdSet Score `json:"3"`
|
|
FourthSet Score `json:"4"`
|
|
FivethSet Score `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 Score `json:"1"`
|
|
SecondPeriod Score `json:"2"`
|
|
ThirdPeriod Score `json:"3"`
|
|
TotalScore Score `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 Score `json:"1"`
|
|
SecondQuarter Score `json:"2"`
|
|
ThirdQuarter Score `json:"3"`
|
|
FourthQuarter Score `json:"4"`
|
|
Overtime Score `json:"5"`
|
|
TotalScore Score `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 Score `json:"1"`
|
|
SecondHalf Score `json:"2"`
|
|
TotalScore Score `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 Score `json:"1"`
|
|
SecondInning Score `json:"2"`
|
|
ThirdInning Score `json:"3"`
|
|
FourthInning Score `json:"4"`
|
|
FifthInning Score `json:"5"`
|
|
SixthInning Score `json:"6"`
|
|
SeventhInning Score `json:"7"`
|
|
EighthInning Score `json:"8"`
|
|
NinthInning Score `json:"9"`
|
|
ExtraInnings Score `json:"10"`
|
|
TotalScore Score `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"`
|
|
}
|