refactor: index ViewField by viewId and key (#1416)

* refactor: index ViewField by viewId and key

Closes #1413

* refactor: rename ViewField properties
This commit is contained in:
Thaïs
2023-09-04 10:55:03 +02:00
committed by GitHub
parent c3c5cb4d1f
commit ae072b6ce5
35 changed files with 463 additions and 447 deletions

View File

@ -657,24 +657,21 @@ model ViewSort {
}
model ViewField {
/// @Validator.IsString()
/// @Validator.IsOptional()
id String @id @default(uuid())
index Int
isVisible Boolean
key String
name String
objectId String
size Int
fieldName String
index Int
isVisible Boolean
objectName String
sizeInPx Int
view View? @relation(fields: [viewId], references: [id], onDelete: Cascade)
viewId String?
view View @relation(fields: [viewId], references: [id], onDelete: Cascade)
viewId String
/// @TypeGraphQL.omit(input: true, output: true)
workspace Workspace @relation(fields: [workspaceId], references: [id])
/// @TypeGraphQL.omit(input: true, output: true)
workspaceId String
@@unique([workspaceId, viewId, objectName, fieldName])
@@id([viewId, key])
@@map("viewFields")
}