switch to mongo's id handling

This commit is contained in:
Joao Correia
2025-01-30 11:50:28 +00:00
parent 5d727fc528
commit c968044160
6 changed files with 29 additions and 32 deletions

View File

@@ -1,8 +1,9 @@
import { ObjectId } from "mongodb";
import { Module } from ".";
import { Type, User, userTypeLabels, userTypeLabelsShort } from "./user";
export interface ApprovalWorkflow {
id: string,
_id?: ObjectId,
name: string,
entityId: string,
requester: User["id"],
@@ -12,14 +13,8 @@ export interface ApprovalWorkflow {
steps: WorkflowStep[],
}
export interface EditableApprovalWorkflow {
export interface EditableApprovalWorkflow extends Omit<ApprovalWorkflow, "_id" | "steps"> {
id: string,
name: string,
entityId: string,
requester: User["id"],
startDate: number,
modules: Module[],
status: ApprovalWorkflowStatus,
steps: EditableWorkflowStep[],
}