1 {-# LANGUAGE FlexibleInstances #-}
3 {-# LANGUAGE QuasiQuotes #-}
4 {-# LANGUAGE TemplateHaskell #-}
5 {-# LANGUAGE TypeFamilies #-}
7 -- | Two different XML types have a notion of teams: "TSN.XML.Odds"
8 -- and "TSN.XML.JFile". And in fact those two types agree on the
9 -- team id, abbreviation, and name -- at least for the database
12 -- This module contains a data type for the common database
17 -- * WARNING: these are private but exported to silence warnings
22 import Database.Groundhog () -- Required for some String instance
23 import Database.Groundhog.TH (
29 -- | The database representation of a team. The 'team_id' is a
30 -- 'String' field because some teams do in fact have ids like
35 team_id :: String, -- ^ Some of them contain characters
36 team_abbreviation :: String,
41 -- Generate the Groundhog code for 'Team'.
42 mkPersist defaultCodegenConfig [groundhog|
48 - name: unique_odds_games_team