43 lines
846 B
GraphQL
43 lines
846 B
GraphQL
enum ApplicationStatus {
|
|
PENDING
|
|
REJECTED
|
|
CONFIRMED
|
|
CHECKED_IN
|
|
CHECKED_OUT
|
|
LATE
|
|
NO_SHOW
|
|
COMPLETED
|
|
}
|
|
|
|
enum ApplicationOrigin {
|
|
STAFF
|
|
EMPLOYER #like vendor
|
|
}
|
|
|
|
#position
|
|
type Application @table(name: "applications") {
|
|
id: UUID! @default(expr: "uuidV4()")
|
|
|
|
shiftId: UUID!
|
|
shift: Shift! @ref(fields: "shiftId", references: "id")
|
|
|
|
staffId: UUID!
|
|
staff: Staff! @ref(fields: "staffId", references: "id")
|
|
|
|
roleId: UUID!
|
|
shiftRole: ShiftRole! @ref(
|
|
fields: ["shiftId", "roleId"],
|
|
references: ["shiftId", "roleId"]
|
|
)
|
|
|
|
status: ApplicationStatus!
|
|
appliedAt: Timestamp @default(expr: "request.time")
|
|
checkInTime: Timestamp
|
|
checkOutTime: Timestamp
|
|
origin: ApplicationOrigin!
|
|
|
|
createdAt: Timestamp @default(expr: "request.time")
|
|
updatedAt: Timestamp @default(expr: "request.time")
|
|
createdBy: String
|
|
}
|