41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
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")
|
|
|
|
}
|
|
|