diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-23 11:09:04 +0000 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-23 11:09:04 +0000 |
| commit | 08a6ee538ced1afb059491c7fd25f233999f5ca4 (patch) | |
| tree | 656c8b2051c9bf7f9ba8200dfab5b9db6f109139 /server/src/Thermoprint/Server | |
| parent | 6648020d5ce7a41833da9f136affc569a601fcf3 (diff) | |
| download | thermoprint-08a6ee538ced1afb059491c7fd25f233999f5ca4.tar thermoprint-08a6ee538ced1afb059491c7fd25f233999f5ca4.tar.gz thermoprint-08a6ee538ced1afb059491c7fd25f233999f5ca4.tar.bz2 thermoprint-08a6ee538ced1afb059491c7fd25f233999f5ca4.tar.xz thermoprint-08a6ee538ced1afb059491c7fd25f233999f5ca4.zip | |
Split out database defs & minor cleanup
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 | |] | ||
