+-- | 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.
+--
+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 }
+
+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 fk InjuriesListingXml{..} =
+ InjuriesListing {
+ db_injuries_id = fk,
+ db_team = xml_team,
+ db_teamno = xml_teamno,
+ db_injuries = xml_injuries,
+ db_updated = xml_updated }
+
+-- | This allows us to insert the XML representation
+-- 'InjuriesListingXml' directly.
+--
+instance XmlImportFk InjuriesListingXml
+
+
+-- * Injuries/Message
+
+-- | XML representation of an injuriesxml \<message\>.
+--