diff options
Diffstat (limited to 'server/src/Thermoprint/Server')
-rw-r--r-- | server/src/Thermoprint/Server/Database.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/server/src/Thermoprint/Server/Database.hs b/server/src/Thermoprint/Server/Database.hs new file mode 100644 index 0000000..61179e6 --- /dev/null +++ b/server/src/Thermoprint/Server/Database.hs | |||
@@ -0,0 +1,24 @@ | |||
1 | {-# LANGUAGE TemplateHaskell #-} | ||
2 | {-# LANGUAGE QuasiQuotes #-} | ||
3 | {-# LANGUAGE MultiParamTypeClasses #-} | ||
4 | {-# LANGUAGE TypeFamilies #-} | ||
5 | {-# LANGUAGE ExistentialQuantification #-} | ||
6 | {-# LANGUAGE GeneralizedNewtypeDeriving #-} | ||
7 | |||
8 | module Thermoprint.Server.Database | ||
9 | ( Job(..), JobId | ||
10 | , Draft(..), DraftId | ||
11 | , migrateAll | ||
12 | ) where | ||
13 | |||
14 | import Thermoprint.API (Printout, DraftTitle) | ||
15 | |||
16 | import Database.Persist.TH | ||
17 | |||
18 | share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase| | ||
19 | Job | ||
20 | content Printout | ||
21 | Draft | ||
22 | title DraftTitle Maybe | ||
23 | content Printout | ||
24 | |] | ||