query getStaffCourseById($id: UUID!) @auth(level: USER) {
  staffCourse(id: $id) {
    id
    staffId
    courseId
    progressPercent
    completed
    completedAt
    startedAt
    lastAccessedAt
    createdAt
    updatedAt
  }
}

query listStaffCoursesByStaffId(
  $staffId: UUID!
  $offset: Int
  $limit: Int
) @auth(level: USER) {
  staffCourses(
    where: { staffId: { eq: $staffId } }
    offset: $offset
    limit: $limit
  ) {
    id
    staffId
    courseId
    progressPercent
    completed
    completedAt
    startedAt
    lastAccessedAt
    createdAt
    updatedAt
  }
}

query listStaffCoursesByCourseId(
  $courseId: UUID!
  $offset: Int
  $limit: Int
) @auth(level: USER) {
  staffCourses(
    where: { courseId: { eq: $courseId } }
    offset: $offset
    limit: $limit
  ) {
    id
    staffId
    courseId
    progressPercent
    completed
    completedAt
    startedAt
    lastAccessedAt
    createdAt
    updatedAt
  }
}

query getStaffCourseByStaffAndCourse(
  $staffId: UUID!
  $courseId: UUID!
) @auth(level: USER) {
  staffCourses(
    where: {
      staffId: { eq: $staffId }
      courseId: { eq: $courseId }
    }
    limit: 1
  ) {
    id
    staffId
    courseId
    progressPercent
    completed
    completedAt
    startedAt
    lastAccessedAt
    createdAt
    updatedAt
  }
}

