feat: add workflow to service
This commit is contained in:
parent
a583e6a3ce
commit
a06be541a8
3 changed files with 12 additions and 0 deletions
|
|
@ -0,0 +1,5 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Service" ADD COLUMN "workflowTemplateId" TEXT;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE "Service" ADD CONSTRAINT "Service_workflowTemplateId_fkey" FOREIGN KEY ("workflowTemplateId") REFERENCES "WorkflowTemplate"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
@ -901,6 +901,8 @@ model WorkflowTemplate {
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
updatedBy User? @relation(name: "FlowUpdatedByUser", fields: [updatedByUserId], references: [id], onDelete: SetNull)
|
updatedBy User? @relation(name: "FlowUpdatedByUser", fields: [updatedByUserId], references: [id], onDelete: SetNull)
|
||||||
updatedByUserId String?
|
updatedByUserId String?
|
||||||
|
|
||||||
|
service Service[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model WorkflowTemplateStep {
|
model WorkflowTemplateStep {
|
||||||
|
|
@ -1006,6 +1008,9 @@ model Service {
|
||||||
status Status @default(CREATED)
|
status Status @default(CREATED)
|
||||||
statusOrder Int @default(0)
|
statusOrder Int @default(0)
|
||||||
|
|
||||||
|
workflowTemplateId String?
|
||||||
|
workflowTemplate WorkflowTemplate? @relation(fields: [workflowTemplateId], references: [id])
|
||||||
|
|
||||||
shared Boolean @default(false)
|
shared Boolean @default(false)
|
||||||
selectedImage String?
|
selectedImage String?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,7 @@ type ServiceCreate = {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
status?: Status;
|
status?: Status;
|
||||||
|
workflowId?: string;
|
||||||
work?: {
|
work?: {
|
||||||
name: string;
|
name: string;
|
||||||
productId: string[];
|
productId: string[];
|
||||||
|
|
@ -71,6 +72,7 @@ type ServiceUpdate = {
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
status?: "ACTIVE" | "INACTIVE";
|
status?: "ACTIVE" | "INACTIVE";
|
||||||
|
workflowId?: string;
|
||||||
work?: {
|
work?: {
|
||||||
name: string;
|
name: string;
|
||||||
productId: string[];
|
productId: string[];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue