adding mutation to event and deleting extra info
This commit is contained in:
@@ -20,21 +20,43 @@ enum RecurrenceType {
|
||||
|
||||
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")
|
||||
id: UUID! @col(name: "id", primaryKey: true) @default(expr: "uuidV4()")
|
||||
eventName: String!
|
||||
isRecurring: Boolean!
|
||||
recurrenceType: RecurrenceType
|
||||
businessId: UUID!
|
||||
vendorId: UUID
|
||||
status: EventStatus!
|
||||
date: Timestamp!
|
||||
shifts: JSON @col(dataType: "jsonb")
|
||||
total: Float
|
||||
requested: Int
|
||||
assignedStaff: JSON @col(dataType: "jsonb")
|
||||
createdDate: Timestamp @default(expr: "now()")
|
||||
updatedDate: Timestamp @updateAt
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user