+-- | Database representation of a 'Message'.
+--
+data Injuries =
+ Injuries {
+ db_xml_file_id :: Int,
+ db_sport :: String,
+ db_time_stamp :: UTCTime }
+
+instance ToDb Message where
+ -- | The database analogue of a 'Message' is an 'Injuries'.
+ type Db Message = Injuries
+
+instance FromXml Message where
+ -- | To convert from XML to DB, we simply drop the fields we don't
+ -- care about.
+ --
+ from_xml Message{..} =
+ Injuries {
+ db_xml_file_id = xml_xml_file_id,
+ db_sport = xml_sport,
+ db_time_stamp = xml_time_stamp }
+
+-- | This allows us to insert the XML representation 'Message'
+-- directly.
+--
+instance XmlImport Message
+
+
+--
+-- Database code
+--
+