diff options
| author | adambrangenberg <adabran06@gmail.com> | 2026-01-19 02:07:40 +0100 |
|---|---|---|
| committer | adambrangenberg <adabran06@gmail.com> | 2026-01-19 02:07:40 +0100 |
| commit | 92390201fb4170f3373005c48bb23f6e8ddb1a64 (patch) | |
| tree | 3c13512962e5bba80f1d29e6e99cdb27fe4159e3 /src/Data/Device.hs | |
| parent | 8fd49c4673e20b79d57a4410657a84c61ee5a6a8 (diff) | |
Database stuff
Diffstat (limited to 'src/Data/Device.hs')
| -rw-r--r-- | src/Data/Device.hs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/Data/Device.hs b/src/Data/Device.hs new file mode 100644 index 0000000..73dbe6d --- /dev/null +++ b/src/Data/Device.hs @@ -0,0 +1,31 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE FlexibleInstances #-} +{-# LANGUAGE DerivingStrategies #-} +{-# LANGUAGE StandaloneDeriving #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE EmptyDataDecls #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE GADTs #-} +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE QuasiQuotes #-} +{-# LANGUAGE TemplateHaskell #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE DeriveGeneric #-} +{-# LANGUAGE TypeOperators #-} + + +module Data.Device where + +import Database.Persist.TH +import Data.Text + +---------------------------------------------------------------------------------------------------- +share [mkPersist sqlSettings, mkMigrate "migrateAll"] [persistUpperCase| +Device + ident Text -- figure out primary keys + name Text Maybe + Primary ident + deriving Show +|] |