Implement scoping on be (#144)
This commit is contained in:
@ -8,6 +8,11 @@ datasource db {
|
||||
url = env("SERVER_DATABASE_URL")
|
||||
}
|
||||
|
||||
generator nestgraphql {
|
||||
provider = "node node_modules/prisma-nestjs-graphql"
|
||||
output = "../../src/api/@generated"
|
||||
}
|
||||
|
||||
model User {
|
||||
id String @id
|
||||
createdAt DateTime @default(now())
|
||||
@ -69,7 +74,10 @@ model Company {
|
||||
accountOwnerId String?
|
||||
accountOwner User? @relation(fields: [accountOwnerId], references: [id])
|
||||
people Person[]
|
||||
|
||||
/// @TypeGraphQL.omit(input: true)
|
||||
workspaceId String
|
||||
/// @TypeGraphQL.omit(input: true)
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id])
|
||||
|
||||
@@map("companies")
|
||||
@ -87,7 +95,10 @@ model Person {
|
||||
city String
|
||||
companyId String?
|
||||
company Company? @relation(fields: [companyId], references: [id])
|
||||
|
||||
/// @TypeGraphQL.omit(input: true)
|
||||
workspaceId String
|
||||
/// @TypeGraphQL.omit(input: true)
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id])
|
||||
|
||||
@@map("people")
|
||||
|
||||
Reference in New Issue
Block a user