{-# LANGUAGE DeriveAnyClass #-} module Hercules.API.Projects.Project where import Hercules.API.Accounts.Account (Account) import Hercules.API.Prelude import Hercules.API.Repos.Repo (Repo) import Hercules.API.SourceHostingSite.SourceHostingSite ( SourceHostingSite, ) data Project = Project { id :: Id Project, ownerId :: Id Account, repoId :: Id Repo, enabled :: Bool, siteSlug :: Name SourceHostingSite, ownerSlug :: Name Account, slug :: Name Project, displayName :: Text, imageURL :: Maybe Text, -- | True if no authorization is required for retrieving basic -- information about a project, such as its existence, name, -- job statuses etc. isPublic :: Bool } deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)