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")
}
