event schema

This commit is contained in:
José Salazar
2025-11-14 17:52:00 -05:00
parent 07626dd340
commit 0d12d3731a

View File

@@ -0,0 +1,40 @@
scalar UUID
scalar Timestamp
scalar JSON
enum EventStatus {
DRAFT
ACTIVE
PENDING
ASSIGNED
CONFIRMED
COMPLETED
CANCELED
}
enum RecurrenceType {
SINGLE
DATE_RANGE
SCATTER
}
type Event @table(name: "events") {
id: UUID! @col(name: "id", primaryKey: true) @default(expr: "uuid_generate_v4()")
eventName: String! @col(name: "event_name")
isRecurring: Boolean! @col(name: "is_recurring")
recurrenceType: RecurrenceType @col(name: "recurrence_type")
businessId: UUID! @col(name: "business_id")
vendorId: UUID @col(name: "vendor_id")
status: EventStatus! @col(name: "status")
date: Timestamp @col(name: "date")
shifts: JSON @col(name: "shifts", dataType: "jsonb")
total: Float @col(name: "total")
requested: Int @col(name: "requested")
assignedStaff: JSON @col(name: "assigned_staff", dataType: "jsonb")
createdDate: Timestamp @col(name: "created_date") @default(expr: "now()")
updatedDate: Timestamp @col(name: "updated_date") @default(expr: "now()")
createdBy: String @col(name: "created_by")
}