46 lines
1.0 KiB
GraphQL
46 lines
1.0 KiB
GraphQL
enum ShiftDayCompletionStatus {
|
|
PENDING_REVIEW
|
|
APPROVED
|
|
DISPUTED
|
|
}
|
|
|
|
type ShiftDayCompletion @table(name: "shift_day_completions", key: ["id"]) {
|
|
id: UUID! @default(expr: "uuidV4()")
|
|
|
|
shiftId: UUID!
|
|
shift: Shift! @ref(fields: "shiftId", references: "id")
|
|
|
|
orderId: UUID!
|
|
order: Order! @ref(fields: "orderId", references: "id")
|
|
|
|
businessId: UUID!
|
|
business: Business! @ref(fields: "businessId", references: "id")
|
|
|
|
vendorId: UUID!
|
|
vendor: Vendor! @ref(fields: "vendorId", references: "id")
|
|
|
|
dayDate: Timestamp!
|
|
dayNumber: Int!
|
|
|
|
status: ShiftDayCompletionStatus! @default(expr: "'PENDING_REVIEW'")
|
|
|
|
hours: Float
|
|
cost: Float
|
|
|
|
staffSummary: Any @col(dataType: "jsonb")
|
|
|
|
disputeReason: String
|
|
disputeDetails: String
|
|
disputedItems: Any @col(dataType: "jsonb")
|
|
|
|
reviewedBy: String
|
|
reviewedAt: Timestamp
|
|
|
|
invoiceId: UUID
|
|
invoice: Invoice @ref(fields: "invoiceId", references: "id")
|
|
|
|
createdAt: Timestamp @default(expr: "request.time")
|
|
updatedAt: Timestamp @default(expr: "request.time")
|
|
createdBy: String
|
|
}
|