+
+
+-- | Database representation of a
+-- 'InjuriesDetailListingPlayerListingXml'. We drop the team_id
+-- because it's redundant.
+--
+data InjuriesDetailListingPlayerListing =
+ InjuriesDetailListingPlayerListing {
+ db_injuries_detail_listings_id :: DefaultKey InjuriesDetailListing,
+ db_player_id :: Int,
+ db_date :: UTCTime,
+ db_pos :: String,
+ db_name :: String,
+ db_injury :: String,
+ db_status :: String,
+ db_fantasy :: Maybe String, -- ^ Nobody knows what this is.
+ db_injured :: Bool,
+ db_type :: String }
+
+
+instance ToDb InjuriesDetailListingPlayerListingXml where
+ -- | The DB analogue of a 'InjuriesDetailListingPlayerListingXml' is
+ -- 'InjuriesDetailListingPlayerListing'.
+ type Db InjuriesDetailListingPlayerListingXml =
+ InjuriesDetailListingPlayerListing
+
+instance FromXmlFk InjuriesDetailListingPlayerListingXml where
+ -- | Each 'InjuriesDetailListingPlayerListingXml' is contained in an
+ -- 'InjuriesDetailListing'.
+ --
+ type Parent InjuriesDetailListingPlayerListingXml = InjuriesDetailListing
+
+ -- | To construct a 'InjuriesDetailListingPlayerListing' from a
+ -- 'InjuriesDetailListingPlayerListingXml' we need to supply a
+ -- foreign key to an 'InjuriesDetailListing'.
+ --
+ from_xml_fk fk InjuriesDetailListingPlayerListingXml{..} =
+ InjuriesDetailListingPlayerListing {
+ db_injuries_detail_listings_id = fk,
+ db_player_id = xml_player_id,
+ db_date = xml_date,
+ db_pos = xml_pos,
+ db_name = xml_name,
+ db_injury = xml_injury,
+ db_status = xml_status,
+ db_fantasy = xml_fantasy,
+ db_injured = xml_injured,
+ db_type = xml_type }
+
+-- | This lets us insert the XML representation
+-- 'InjuriesDetailListingPlayerListingXml' directly.
+--
+instance XmlImportFk InjuriesDetailListingPlayerListingXml
+
+
+--
+-- Database stuff
+--
+