Files
Krow-workspace/backend/dataconnect/schema/shift.gql
2026-02-19 14:37:26 -05:00

52 lines
873 B
GraphQL

enum ShiftStatus {
DRAFT
FILLED
ASSIGNED
OPEN
IN_PROGRESS
COMPLETED
CANCELED
}
type Shift @table(name: "shifts", key: ["id"]) {
id: UUID! @default(expr: "uuidV4()")
title: String!
orderId: UUID!
order: Order! @ref(fields: "orderId", references: "id")
date: Timestamp
startTime: Timestamp
endTime: Timestamp
hours: Float
cost: Float
location: String
locationAddress: String
latitude: Float
longitude: Float
placeId: String
city: String
state: String
street: String
country: String
description: String
status: ShiftStatus
workersNeeded: Int
filled: Int
filledAt: Timestamp
# JSON list of managers (e.g. [{name, phone, avatar}, ...])
managers: [Any!]
durationDays: Int
createdAt: Timestamp @default(expr: "request.time")
updatedAt: Timestamp @default(expr: "request.time")
createdBy: String
}