+-- | The casinos should have their own table, but the lines don't
+-- belong in that table. (There should be another table joining the
+-- casinos and the thing the lines are for together.)
+data OddsCasino =
+ OddsCasino {
+ db_casino_client_id :: Int,
+ db_casino_name :: String }
+ deriving (Eq, Show)
+
+instance ToFromXml OddsCasino where
+ type Xml OddsCasino = OddsCasinoXml
+ type Container OddsCasino = () -- It has one, but we don't use it.
+
+ -- Use a record wildcard here so GHC doesn't complain that we never
+ -- used our named fields.
+ to_xml (OddsCasino {..}) =
+ OddsCasinoXml
+ db_casino_client_id
+ db_casino_name
+ def
+
+ -- We don't need the key argument (from_xml_fk) since the XML type
+ -- contains more information in this case.
+ from_xml OddsCasinoXml{..} =
+ OddsCasino
+ xml_casino_client_id
+ xml_casino_name
+