adding mutation to event and deleting extra info

This commit is contained in:
José Salazar
2025-11-14 18:34:53 -05:00
parent 0d12d3731a
commit d510c5bc85

View File

@@ -20,21 +20,43 @@ enum RecurrenceType {
type Event @table(name: "events") { type Event @table(name: "events") {
id: UUID! @col(name: "id", primaryKey: true) @default(expr: "uuid_generate_v4()") id: UUID! @col(name: "id", primaryKey: true) @default(expr: "uuidV4()")
eventName: String! @col(name: "event_name") eventName: String!
isRecurring: Boolean! @col(name: "is_recurring") isRecurring: Boolean!
recurrenceType: RecurrenceType @col(name: "recurrence_type") recurrenceType: RecurrenceType
businessId: UUID! @col(name: "business_id") businessId: UUID!
vendorId: UUID @col(name: "vendor_id") vendorId: UUID
status: EventStatus! @col(name: "status") status: EventStatus!
date: Timestamp @col(name: "date") date: Timestamp!
shifts: JSON @col(name: "shifts", dataType: "jsonb") shifts: JSON @col(dataType: "jsonb")
total: Float @col(name: "total") total: Float
requested: Int @col(name: "requested") requested: Int
assignedStaff: JSON @col(name: "assigned_staff", dataType: "jsonb") assignedStaff: JSON @col(dataType: "jsonb")
createdDate: Timestamp @col(name: "created_date") @default(expr: "now()") createdDate: Timestamp @default(expr: "now()")
updatedDate: Timestamp @col(name: "updated_date") @default(expr: "now()") updatedDate: Timestamp @updateAt
createdBy: String @col(name: "created_by") createdBy: String
} }
input CreateEventInput {
eventName: String!
isRecurring: Boolean!
recurrenceType: RecurrenceType
businessId: UUID!
vendorId: UUID
status: EventStatus!
date: Timestamp!
shifts: JSON
total: Float
requested: Int
assignedStaff: JSON
}
type Mutation {
createEvent(input: CreateEventInput!): Event @auth
}
type Query {
listEvents: [Event!] @auth
}