aboutsummaryrefslogtreecommitdiff
path: root/server/src/Thermoprint/Server/Database.hs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/Thermoprint/Server/Database.hs')
-rw-r--r--server/src/Thermoprint/Server/Database.hs24
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
8module Thermoprint.Server.Database
9 ( Job(..), JobId
10 , Draft(..), DraftId
11 , migrateAll
12 ) where
13
14import Thermoprint.API (Printout, DraftTitle)
15
16import Database.Persist.TH
17
18share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
19Job
20 content Printout
21Draft
22 title DraftTitle Maybe
23 content Printout
24|]