module U.Codebase.Sqlite.RemoteProjectBranch
  ( RemoteProjectBranch (..),
  )
where

import Network.URI (URI)
import Network.URI.Orphans.Sqlite ()
import U.Codebase.Sqlite.DbId (RemoteProjectBranchId, RemoteProjectId)
import Unison.Core.Orphans.Sqlite ()
import Unison.Core.Project (ProjectBranchName)
import Unison.Prelude
import Unison.Sqlite (FromRow, ToRow)

data RemoteProjectBranch = RemoteProjectBranch
  { RemoteProjectBranch -> RemoteProjectId
projectId :: RemoteProjectId,
    RemoteProjectBranch -> RemoteProjectBranchId
branchId :: RemoteProjectBranchId,
    RemoteProjectBranch -> URI
host :: URI,
    RemoteProjectBranch -> ProjectBranchName
name :: ProjectBranchName
  }
  deriving stock ((forall x. RemoteProjectBranch -> Rep RemoteProjectBranch x)
-> (forall x. Rep RemoteProjectBranch x -> RemoteProjectBranch)
-> Generic RemoteProjectBranch
forall x. Rep RemoteProjectBranch x -> RemoteProjectBranch
forall x. RemoteProjectBranch -> Rep RemoteProjectBranch x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cfrom :: forall x. RemoteProjectBranch -> Rep RemoteProjectBranch x
from :: forall x. RemoteProjectBranch -> Rep RemoteProjectBranch x
$cto :: forall x. Rep RemoteProjectBranch x -> RemoteProjectBranch
to :: forall x. Rep RemoteProjectBranch x -> RemoteProjectBranch
Generic, Int -> RemoteProjectBranch -> ShowS
[RemoteProjectBranch] -> ShowS
RemoteProjectBranch -> String
(Int -> RemoteProjectBranch -> ShowS)
-> (RemoteProjectBranch -> String)
-> ([RemoteProjectBranch] -> ShowS)
-> Show RemoteProjectBranch
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
$cshowsPrec :: Int -> RemoteProjectBranch -> ShowS
showsPrec :: Int -> RemoteProjectBranch -> ShowS
$cshow :: RemoteProjectBranch -> String
show :: RemoteProjectBranch -> String
$cshowList :: [RemoteProjectBranch] -> ShowS
showList :: [RemoteProjectBranch] -> ShowS
Show)
  deriving anyclass (RemoteProjectBranch -> [SQLData]
(RemoteProjectBranch -> [SQLData]) -> ToRow RemoteProjectBranch
forall a. (a -> [SQLData]) -> ToRow a
$ctoRow :: RemoteProjectBranch -> [SQLData]
toRow :: RemoteProjectBranch -> [SQLData]
ToRow, RowParser RemoteProjectBranch
RowParser RemoteProjectBranch -> FromRow RemoteProjectBranch
forall a. RowParser a -> FromRow a
$cfromRow :: RowParser RemoteProjectBranch
fromRow :: RowParser RemoteProjectBranch
FromRow)