+-- * InjuriesListing/InjuriesListingXml
+
+-- | XML representation of the injury listings. The leading
+-- underscores prevent unused field warnings.
+--
+data InjuriesListingXml =
+ InjuriesListingXml {
+ _xml_team :: InjuriesTeam,
+ _xml_teamno :: Maybe String, -- ^ Can contain non-numerics, e.g. \"ZR2\"
+ _xml_injuries :: String,
+ _xml_updated :: Maybe Bool }
+ deriving (Eq, GHC.Generic, Show)
+
+
+-- | For 'H.convert'.
+--
+instance H.HVector InjuriesListingXml
+
+
+-- | Database representation of a 'InjuriesListing'. It possesses a
+-- foreign key to an 'Injuries' object so that we can easily delete
+-- 'InjuriesListing's based on the parent message's time_stamp.
+-- The leading underscores prevent unused field warnings.
+--
+data InjuriesListing =
+ InjuriesListing {
+ _db_injuries_id :: DefaultKey Injuries,
+ _db_team :: InjuriesTeam,
+ _db_teamno :: Maybe String, -- ^ Can contain non-numerics, e.g. \"ZR2\"
+ _db_injuries :: String,
+ _db_updated :: Maybe Bool }
+ deriving ( GHC.Generic )
+
+-- | For 'H.cons'.
+--
+instance H.HVector InjuriesListing
+
+instance ToDb InjuriesListingXml where
+ -- | The DB analogue of a 'InjuriesListingXml' is a 'InjuriesListing'
+ type Db InjuriesListingXml = InjuriesListing
+
+instance Child InjuriesListingXml where
+ -- | Our foreign key points to an 'Injuries'.
+ type Parent InjuriesListingXml = Injuries
+
+instance FromXmlFk InjuriesListingXml where
+ -- | To convert between a 'InjuriesListingXml' and a
+ -- 'InjuriesListing', we simply append the foreign key.
+ from_xml_fk = H.cons
+
+-- | This allows us to insert the XML representation
+-- 'InjuriesListingXml' directly.
+--
+instance XmlImportFk InjuriesListingXml
+
+
+-- * Injuries/Message
+
+-- | XML representation of an injuriesxml \<message\>.
+--