-
--- | The database type for teams as they show up in the news.
---
-data NewsTeam =
- NewsTeam { team_name :: String }
- deriving (Eq, Show)
-
-
-instance ToDb NewsTeam where
- -- | The database representaion of a 'NewsTeam' is itself.
- type Db NewsTeam = NewsTeam
-
--- | This is needed to define the XmlImport instance for NewsTeam.
---
-instance FromXml NewsTeam where
- -- | How to we get a 'NewsTeam' from itself?
- from_xml = id
-
--- | Allow us to call 'insert_xml' on the XML representation of
--- NewsTeams.
---
-instance XmlImport NewsTeam
-
-
--- | Mapping between News records and NewsTeam records in the
--- database. We don't name the fields because we don't use the names
--- explicitly; that means we have to give them nice database names
--- via groundhog.
---
-data News_NewsTeam = News_NewsTeam
- (DefaultKey News)
- (DefaultKey NewsTeam)
-
-
--- | The database type for locations as they show up in the news.
---
-data NewsLocation =
- NewsLocation {
- city :: Maybe String,
- state :: Maybe String,
- country :: String }
- deriving (Eq, Show)
-
-instance ToDb NewsLocation where
- -- | The database representation of a 'NewsLocation' is itself.
- type Db NewsLocation = NewsLocation
-
--- | This is needed to define the XmlImport instance for NewsLocation.
---
-instance FromXml NewsLocation where
- -- | How to we get a 'NewsLocation' from itself?
- from_xml = id
-
--- | Allow us to call 'insert_xml' on the XML representation of
--- NewsLocations.