# Mutations for StaffCourse

mutation createStaffCourse(
  $staffId: UUID!
  $courseId: UUID!
  $progressPercent: Int
  $completed: Boolean
  $completedAt: Timestamp
  $startedAt: Timestamp
  $lastAccessedAt: Timestamp
) @auth(level: USER) {
  staffCourse_insert(
    data: {
      staffId: $staffId
      courseId: $courseId
      progressPercent: $progressPercent
      completed: $completed
      completedAt: $completedAt
      startedAt: $startedAt
      lastAccessedAt: $lastAccessedAt
    }
  ) 
}

mutation updateStaffCourse(
  $id: UUID!
  $progressPercent: Int
  $completed: Boolean
  $completedAt: Timestamp
  $startedAt: Timestamp
  $lastAccessedAt: Timestamp
) @auth(level: USER) {
  staffCourse_update(
    id: $id
    data: {
      progressPercent: $progressPercent
      completed: $completed
      completedAt: $completedAt
      startedAt: $startedAt
      lastAccessedAt: $lastAccessedAt
    }
  ) 
}

mutation deleteStaffCourse($id: UUID!) @auth(level: USER) {
  staffCourse_delete(id: $id) 
}
