blob: 65bfc37c973e0cdc05e937cc27f6b73843fe2f87 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Thermoprint.Server.Database
( Job(..), JobId
, Draft(..), DraftId
, migrateAll
) where
import Thermoprint.API (Printout, DraftTitle, JobStatus)
import Database.Persist.TH
import Thermoprint.Server.Database.Instances
share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistLowerCase|
Job
content Printout
status JobStatus
Draft
title DraftTitle Maybe
content Printout
|]
|