feat: create ViewField model (#961)
* feat: create ViewField model - Created ViewField prisma model - Added ViewField server resolvers for findMany/updateOne - Added getViewFields/updateViewField graphql queries Closes #849 * chore: update node version in .nvmrc files
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "viewFields" (
|
||||
"id" TEXT NOT NULL,
|
||||
"fieldName" TEXT NOT NULL,
|
||||
"index" INTEGER NOT NULL,
|
||||
"isVisible" BOOLEAN NOT NULL,
|
||||
"objectName" TEXT NOT NULL,
|
||||
"sizeInPx" INTEGER NOT NULL,
|
||||
"workspaceId" TEXT NOT NULL,
|
||||
|
||||
CONSTRAINT "viewFields_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "viewFields" ADD CONSTRAINT "viewFields_workspaceId_fkey" FOREIGN KEY ("workspaceId") REFERENCES "workspaces"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@ -169,6 +169,7 @@ model Workspace {
|
||||
pipelines Pipeline[]
|
||||
pipelineStages PipelineStage[]
|
||||
pipelineProgresses PipelineProgress[]
|
||||
viewFields ViewField[]
|
||||
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
deletedAt DateTime?
|
||||
@ -532,3 +533,22 @@ model Attachment {
|
||||
|
||||
@@map("attachments")
|
||||
}
|
||||
|
||||
model ViewField {
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
id String @id @default(uuid())
|
||||
|
||||
fieldName String
|
||||
index Int
|
||||
isVisible Boolean
|
||||
objectName String
|
||||
sizeInPx Int
|
||||
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id])
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspaceId String
|
||||
|
||||
@@map("viewFields")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user