new assigment entity

This commit is contained in:
José Salazar
2025-11-26 16:03:38 -05:00
parent 40a7beabb3
commit 9c7a4b8244
3 changed files with 130 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
enum AssignmentStatus {
PENDING
CONFIRMED
CHECKED_IN
IN_PROGRESS
COMPLETED
CANCELLED
NO_SHOW
}
type Assignment @table(name: "assignments") {
id: UUID! @default(expr: "uuidV4()")
assignmentNumber: String
orderId: UUID! # order_id (FK lógica a Order.id)
workforceId: UUID! # workforce_id (FK lógica a Workforce.id)
vendorId: UUID! # vendor_id (FK lógica a Vendor.id)
role: String!
assignmentStatus: AssignmentStatus!
scheduledStart: Timestamp!
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid")
}