Migrate view field to new data model - Part 2 (#2270)
* Migrate view field to new data model * Migrate view fields to new model
This commit is contained in:
@ -174,10 +174,6 @@ model Workspace {
|
||||
pipelineStages PipelineStage[]
|
||||
pipelineProgresses PipelineProgress[]
|
||||
activityTargets ActivityTarget[]
|
||||
viewFields ViewField[]
|
||||
viewFilters ViewFilter[]
|
||||
views View[]
|
||||
viewSorts ViewSort[]
|
||||
apiKeys ApiKey[]
|
||||
webHooks WebHook[]
|
||||
|
||||
@ -657,19 +653,19 @@ model Pipeline {
|
||||
model PipelineStage {
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
id String @id @default(uuid())
|
||||
id String @id @default(uuid())
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
name String
|
||||
name String
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
type String
|
||||
type String
|
||||
/// @Validator.IsOptional()
|
||||
/// @Validator.IsString()
|
||||
color String
|
||||
color String
|
||||
/// @Validator.IsNumber()
|
||||
/// @Validator.IsOptional()
|
||||
index Int?
|
||||
position Int?
|
||||
|
||||
pipelineProgresses PipelineProgress[]
|
||||
///
|
||||
@ -799,97 +795,6 @@ enum ViewType {
|
||||
Pipeline
|
||||
}
|
||||
|
||||
model View {
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
id String @id @default(uuid())
|
||||
|
||||
fields ViewField[]
|
||||
filters ViewFilter[]
|
||||
name String
|
||||
objectId String
|
||||
sorts ViewSort[]
|
||||
type ViewType
|
||||
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id])
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspaceId String
|
||||
|
||||
@@map("views")
|
||||
}
|
||||
|
||||
enum ViewFilterOperand {
|
||||
Contains
|
||||
DoesNotContain
|
||||
GreaterThan
|
||||
LessThan
|
||||
Is
|
||||
IsNot
|
||||
IsNotNull
|
||||
}
|
||||
|
||||
model ViewFilter {
|
||||
displayValue String
|
||||
key String
|
||||
name String
|
||||
operand ViewFilterOperand
|
||||
value 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
|
||||
|
||||
@@id([viewId, key])
|
||||
@@map("viewFilters")
|
||||
}
|
||||
|
||||
enum ViewSortDirection {
|
||||
asc
|
||||
desc
|
||||
}
|
||||
|
||||
model ViewSort {
|
||||
direction ViewSortDirection
|
||||
key String
|
||||
name 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
|
||||
|
||||
@@id([viewId, key])
|
||||
@@map("viewSorts")
|
||||
}
|
||||
|
||||
model ViewField {
|
||||
index Float
|
||||
isVisible Boolean
|
||||
key String
|
||||
name String
|
||||
objectId String
|
||||
size Int?
|
||||
|
||||
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
|
||||
|
||||
@@id([viewId, key])
|
||||
@@map("viewFields")
|
||||
}
|
||||
|
||||
model ApiKey {
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
@ -913,17 +818,17 @@ model ApiKey {
|
||||
model WebHook {
|
||||
/// @Validator.IsString()
|
||||
/// @Validator.IsOptional()
|
||||
id String @id @default(uuid())
|
||||
id String @id @default(uuid())
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspace Workspace @relation(fields: [workspaceId], references: [id])
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
workspaceId String
|
||||
targetUrl String
|
||||
operation String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
targetUrl String
|
||||
operation String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
/// @TypeGraphQL.omit(input: true, output: true)
|
||||
deletedAt DateTime?
|
||||
deletedAt DateTime?
|
||||
|
||||
@@map("web_hooks")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user