--- * OddsGameHomeTeam/OddsGameHomeTeamXml
-
--- | The XML representation of a \<HomeTeam\>, as found in \<Game\>s.
---
-data OddsGameHomeTeamXml =
- OddsGameHomeTeamXml {
- xml_home_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_home_rotation_number :: Int,
- xml_home_abbr :: String,
- xml_home_team_name :: String,
- xml_home_casinos :: [OddsGameCasinoXml] }
- deriving (Eq, Show)
-
-instance ToDb OddsGameHomeTeamXml where
- -- | The database representation of an 'OddsGameHomeTeamXml' is an
- -- 'OddsGameTeam'.
- --
- type Db OddsGameHomeTeamXml = OddsGameTeam
-
-instance FromXml OddsGameHomeTeamXml 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 OddsGameHomeTeamXml{..} =
- OddsGameTeam {
- db_team_id = xml_home_team_id,
- db_abbr = xml_home_abbr,
- db_team_name = xml_home_team_name }
-
--- | This allows us to insert the XML representation
--- 'OddsGameHomeTeamXml' directly.
---
-instance XmlImport OddsGameHomeTeamXml where
-
-
--- * OddsGameAwayTeam/OddsGameAwayTeamXml
-
--- | 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] }
+-- | The XML representation of a \<HomeTeam\> or \<AwayTeam\>, as
+-- found in \<Game\>s. We can't use the 'Team' representation
+-- directly because there are some other fields we need to parse.
+--
+data OddsGameTeamXml =
+ OddsGameTeamXml {
+ xml_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_team_rotation_number :: Maybe Int,
+ xml_team_abbr :: String,
+ xml_team_name :: String,
+ xml_team_starter :: Maybe OddsGameTeamStarterXml,
+ xml_team_casinos :: [OddsGameCasinoXml] }