new event schema with full crud

This commit is contained in:
José Salazar
2025-11-25 11:58:03 -05:00
parent f9ef467195
commit 2c130a413a
3 changed files with 299 additions and 5 deletions

View File

@@ -15,19 +15,49 @@ enum RecurrenceType {
SCATTER
}
#enums cant start by a number, reason of _1099
enum ContractType {
W2
_1099
TEMP
CONTRACT
}
type Event @table(name: "events") {
id: UUID! @default(expr: "uuidV4()")
eventName: String!
isRecurring: Boolean!
isRapid: Boolean @default(expr: "false")
isRecurring: Boolean @default(expr: "false")
isMultiDay: Boolean @default(expr: "false")
recurrenceType: RecurrenceType
recurrenceStartDate: Timestamp
recurrenceEndDate: Timestamp
scatterDates: String
multiDayStartDate: Timestamp
multiDayEndDate: Timestamp
bufferTimeBefore: Float @default(expr: "0")
bufferTimeAfter: Float @default(expr: "0")
conflictDetectionEnabled: Boolean @default(expr: "true")
detectedConflicts: String
businessId: UUID!
businessName: String
vendorId: UUID
vendorName: Stringhub: String
eventLocation: String
contractType: ContractType
poReference: String
status: EventStatus!
date: Timestamp!
shifts: String
addons: String
total: Float
requested: Int
clientName: String
clientEmail: String
clientPhone: String
invoiceId: UUID
notes: String
requested: Int @default(expr: "0")
assignedStaff: String
createdDate: Timestamp @default(expr: "request.time")
updatedDate: Timestamp @default(expr: "request.time")