mateamt/src/Types/Role.hs

46 lines
1.3 KiB
Haskell
Raw Normal View History

2020-05-10 06:35:32 +00:00
module Types.Role where
import qualified Data.Text as T
data Role = Role
{ roleID :: Int
, roleName :: T.Text
, roleCanRefillStock :: Bool
, roleCanAddProduct :: Bool
, roleCanViewJournal :: Bool
, roleCanPayInvoice :: Bool
, roleCanPayOut :: Bool
, roleCanManageProducts :: Bool
, roleCanManageJournal :: Bool
, roleCanManageUsers :: Bool
, roleCanManageRoles :: Bool
, roleCanManageSuppliers :: Bool
, roleCanManageSettings :: Bool
}
2020-07-19 06:27:15 +00:00
data RoleSubmit = RoleSubmit
{ roleSubmitName :: T.Text
, roleSubmitCanRefillStock :: Bool
, roleSubmitCanAddProduct :: Bool
, roleSubmitCanViewJournal :: Bool
, roleSubmitCanPayInvoice :: Bool
, roleSubmitCanPayOut :: Bool
, roleSubmitCanManageProducts :: Bool
, roleSubmitCanManageJournal :: Bool
, roleSubmitCanManageUsers :: Bool
, roleSubmitCanManageRoles :: Bool
, roleSubmitCanManageSuppliers :: Bool
, roleSubmitCanManageSettings :: Bool
}
data RoleAssociation = RoleAssociation
{ roleAssociationId :: Int
, roleAssociationUser :: Int
, roleAssociationRole :: Int
}
data RoleAssociationSubmit = RoleAssociationSubmit
{ roleAssociationSubmitUser :: Int
, roleAssociationSubmitRole :: Int
}