fix: Update Invoice schema, queries, mutations and remove ShiftDayCompletion related files
This commit is contained in:
@@ -31,6 +31,9 @@ type Invoice @table(name: "invoices") {
|
||||
orderId: UUID!
|
||||
order: Order! @ref(fields: "orderId", references: "id")
|
||||
|
||||
shiftId: UUID
|
||||
shift: Shift @ref(fields: "shiftId", references: "id")
|
||||
|
||||
#web
|
||||
paymentTerms: InovicePaymentTerms
|
||||
invoiceNumber: String!
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user