--- | The XML representation of a \<AwayTeam\>, as found in \<Game\>s.
---
-data OddsGameAwayTeamXml =
- OddsGameAwayTeamXml {
- xml_away_team_id :: String, -- ^ The home/away team IDs are
- -- three characters but Postgres
- -- imposes no performance penalty
- -- on lengthless text fields, so
- -- we ignore the probable upper
- -- bound of three characters
- xml_away_rotation_number :: Int,
- xml_away_abbr :: String,
- xml_away_team_name :: String,
- xml_away_casinos :: [OddsGameCasinoXml] }
- deriving (Eq, Show)
-
-instance ToDb OddsGameAwayTeamXml where
- -- | The database representation of an 'OddsGameAwayTeamXml' is an
- -- 'OddsGameTeam'.
- --
- type Db OddsGameAwayTeamXml = OddsGameTeam
-
-instance FromXml OddsGameAwayTeamXml where
- -- | We convert from XML to the database by dropping the lines and
- -- rotation number (which are specific to the games, not the teams
- -- themselves).
- --
- from_xml OddsGameAwayTeamXml{..} = OddsGameTeam
- xml_away_team_id
- xml_away_abbr
- xml_away_team_name
-
--- | This allows us to insert the XML representation
--- 'OddsGameAwayTeamXml' directly.
---
-instance XmlImport OddsGameAwayTeamXml where
-
-
--- * OddsGame_OddsGameTeam
-
--- | Database mapping between games and their home/away teams.
---
-data OddsGame_OddsGameTeam =
- OddsGame_OddsGameTeam {
- ogogt_odds_games_id :: DefaultKey OddsGame,
- ogogt_away_team_id :: DefaultKey OddsGameTeam,
- ogogt_home_team_id :: DefaultKey OddsGameTeam }