Files
Krow-workspace/dataconnect/schema/event.gql
2025-12-04 17:05:27 -05:00

70 lines
1.5 KiB
GraphQL

enum EventStatus {
DRAFT
ACTIVE
PENDING
ASSIGNED
CONFIRMED
COMPLETED
CANCELED
}
enum RecurrenceType {
SINGLE
DATE_RANGE
SCATTER
}
#enums cant start by a number, reason of C1099
enum ContractType {
W2
C1099
TEMP
CONTRACT
}
type Event @table(name: "events") {
id: UUID! @default(expr: "uuidV4()")
eventName: String!
isRapid: Boolean @default(expr: "false")
isRecurring: Boolean @default(expr: "false")
isMultiDay: Boolean @default(expr: "false")
recurrenceType: RecurrenceType
recurrenceStartDate: Timestamp
recurrenceEndDate: Timestamp
scatterDates: Any
multiDayStartDate: Timestamp
multiDayEndDate: Timestamp
bufferTimeBefore: Float @default(expr: "0")
bufferTimeAfter: Float @default(expr: "0")
conflictDetectionEnabled: Boolean @default(expr: "true")
detectedConflicts: Any
businessId: UUID!
businessName: String
vendorId: String
vendorName: String
hub: String
eventLocation: String
contractType: ContractType
poReference: String
status: EventStatus!
date: Timestamp!
shifts: Any
addons: Any
total: Float
clientName: String
clientEmail: String
clientPhone: String
invoiceId: UUID
notes: String
requested: Int @default(expr: "0")
assignedStaff: Any
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")
createdBy: String @default(expr: "auth.uid")
}