🚧 WIP 🚧
This commit is contained in:
parent
12d7fafb7d
commit
32bc497c9f
2 changed files with 6 additions and 3 deletions
|
@ -52,7 +52,7 @@ where
|
|||
|
||||
import Protolude
|
||||
|
||||
import Aggreact.Users (User, UserId (..), BUserId)
|
||||
import Aggreact.Users (User, UserId (..), BUserT, BUserId)
|
||||
|
||||
import qualified Control.Exception as Ex
|
||||
import Data.Aeson (FromJSON (..), ToJSON (..),
|
||||
|
@ -144,7 +144,7 @@ bCommentToComment bc =
|
|||
{ parent = _parent bc
|
||||
, slug = _slug bc
|
||||
, content = _content bc
|
||||
, userid = MUserId (_userid bc)
|
||||
, userid = _userid bc
|
||||
})
|
||||
(DefaultMetas
|
||||
{ updated = _updated bc
|
||||
|
@ -155,10 +155,10 @@ data BCommentT f =
|
|||
{ _parent :: Beam.Columnar f ParentId -- ^ UUID
|
||||
, _slug :: Beam.Columnar f Slug -- ^ Text (URL)
|
||||
, _content :: Beam.Columnar f Content -- ^ Text
|
||||
, _userid :: Beam.Columnar (Beam.Nullable f) BUserId -- ^ UUID
|
||||
, _created :: Beam.Columnar f UTCTime
|
||||
, _updated :: Beam.Columnar f (Maybe UTCTime)
|
||||
, _id :: Beam.Columnar f Id
|
||||
, _userid :: Beam.PrimaryKey BUserT (Beam.Nullable f) -- ^ UUID
|
||||
} deriving (Generic)
|
||||
type BComment = BCommentT Identity
|
||||
type BCommentId = Beam.PrimaryKey BCommentT Identity
|
||||
|
|
|
@ -92,10 +92,13 @@ data BUserT f =
|
|||
} deriving (Generic)
|
||||
type BUser = BUserT Identity
|
||||
type BUserId = Beam.PrimaryKey BUserT Identity
|
||||
type BMUserId = Beam.PrimaryKey BUserT (Beam.Nullable Identity)
|
||||
deriving instance Show BUser
|
||||
deriving instance Eq BUser
|
||||
deriving instance Show BUserId
|
||||
deriving instance Eq BUserId
|
||||
deriving instance Show BMUserId
|
||||
deriving instance Eq BMUserId
|
||||
instance Beam.Beamable BUserT
|
||||
instance Beam.Table BUserT where
|
||||
data PrimaryKey BUserT f =
|
||||
|
|
Loading…
Reference in a new issue