new shift entity

This commit is contained in:
José Salazar
2025-11-26 15:52:31 -05:00
parent 3ac7605965
commit 4c24e83622
3 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
mutation CreateShift(
$shiftName: String!,
$startDate: Timestamp!,
$endDate: Timestamp,
$assignedStaff: String
) @auth(level: USER) {
shift_insert(
data: {
shiftName: $shiftName
startDate: $startDate
endDate: $endDate
assignedStaff: $assignedStaff
}
)
}
mutation UpdateShift(
$id: UUID!,
$shiftName: String,
$startDate: Timestamp,
$endDate: Timestamp,
$assignedStaff: String
) @auth(level: USER) {
shift_update(
id: $id,
data: {
shiftName: $shiftName
startDate: $startDate
endDate: $endDate
assignedStaff: $assignedStaff
}
)
}
mutation DeleteShift(
$id: UUID!
) @auth(level: USER) {
shift_delete(id: $id)
}