// Path: src/main/java/edu/ksu/canvas/attendance/entity/AttendanceCourse.java
// @Entity
// @Table(name = "attendance_course")
// @Check(constraints = "default_minutes_per_session >= 0 and total_minutes >= 0")
// public class AttendanceCourse implements Serializable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     @Column(name = "course_id")
//     private Long courseId;
// 
//     @Column(name = "total_minutes")
//     private Integer totalMinutes;
// 
//     @Column(name = "default_minutes_per_session")
//     private Integer defaultMinutesPerSession;
// 
//     @Column(name = "attendance_type", nullable = false)
//     @Enumerated(EnumType.STRING)
//     private AttendanceType attendanceType;
// 
//     @Column(name = "canvas_course_id", nullable = false, unique = true)
//     private Long canvasCourseId;
// 
//     @Column(name = "show_notes")
//     private Boolean showNotesToStudents = false;
// 
// 
//     public AttendanceCourse() {
//         this.attendanceType = AttendanceType.SIMPLE;
//     }
// 
//     public AttendanceCourse(Long canvasCourseId, int totalClassMinutes, int defaultMinutesPerSession) {
//         this.canvasCourseId = canvasCourseId;
//         this.totalMinutes = totalClassMinutes;
//         this.defaultMinutesPerSession = defaultMinutesPerSession;
//         this.attendanceType = AttendanceType.SIMPLE;
//     }
// 
// 
//     public Long getCourseId() {
//         return courseId;
//     }
// 
//     public void setCourseId(long courseId) {
//         this.courseId = courseId;
//     }
// 
//     public Integer getTotalMinutes() {
//         return totalMinutes;
//     }
// 
//     public void setTotalMinutes(int totalMinutes) {
//         this.totalMinutes = totalMinutes;
//     }
// 
//     public Integer getDefaultMinutesPerSession() {
//         return defaultMinutesPerSession;
//     }
// 
//     public void setDefaultMinutesPerSession(int defaultMinutesPerSession) {
//         this.defaultMinutesPerSession = defaultMinutesPerSession;
//     }
// 
//     public Long getCanvasCourseId() {
//         return canvasCourseId;
//     }
// 
//     public void setCanvasCourseId(Long canvasCourseId) {
//         this.canvasCourseId = canvasCourseId;
//     }
// 
// 
//     @Override
//     public String toString() {
//         return "AttendanceCourse [courseId=" + courseId + ", totalMinutes=" + totalMinutes + ", defaultMinutesPerSession="
//                 + defaultMinutesPerSession + ", canvasCourseId=" + canvasCourseId + "]";
//     }
// 
//     public AttendanceType getAttendanceType() {
//         return attendanceType;
//     }
// 
//     public void setAttendanceType(AttendanceType attendanceType) {
//         this.attendanceType = attendanceType;
//     }
// 
//     public Boolean getShowNotesToStudents() {
//         return showNotesToStudents;
//     }
// 
//     public void setShowNotesToStudents(Boolean showNotesToStudents) {
//         this.showNotesToStudents = showNotesToStudents;
//     }
// }


import edu.ksu.canvas.attendance.entity.AttendanceCourse;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
package edu.ksu.canvas.attendance.repository;



@Repository
public interface AttendanceCourseRepository extends CrudRepository<AttendanceCourse, Long> {


    AttendanceCourse findByCourseId(Long courseId);

// Path: src/main/java/edu/ksu/canvas/attendance/entity/AttendanceCourse.java
// @Entity
// @Table(name = "attendance_course")
// @Check(constraints = "default_minutes_per_session >= 0 and total_minutes >= 0")
// public class AttendanceCourse implements Serializable {
// 
//     private static final long serialVersionUID = 1L;
// 
//     @Id
//     @GeneratedValue(strategy = GenerationType.AUTO)
//     @Column(name = "course_id")
//     private Long courseId;
// 
//     @Column(name = "total_minutes")
//     private Integer totalMinutes;
// 
//     @Column(name = "default_minutes_per_session")
//     private Integer defaultMinutesPerSession;
// 
//     @Column(name = "attendance_type", nullable = false)
//     @Enumerated(EnumType.STRING)
//     private AttendanceType attendanceType;
// 
//     @Column(name = "canvas_course_id", nullable = false, unique = true)
//     private Long canvasCourseId;
// 
//     @Column(name = "show_notes")
//     private Boolean showNotesToStudents = false;
// 
// 
//     public AttendanceCourse() {
//         this.attendanceType = AttendanceType.SIMPLE;
//     }
// 
//     public AttendanceCourse(Long canvasCourseId, int totalClassMinutes, int defaultMinutesPerSession) {
//         this.canvasCourseId = canvasCourseId;
//         this.totalMinutes = totalClassMinutes;
//         this.defaultMinutesPerSession = defaultMinutesPerSession;
//         this.attendanceType = AttendanceType.SIMPLE;
//     }
// 
// 
//     public Long getCourseId() {
//         return courseId;
//     }
// 
//     public void setCourseId(long courseId) {
//         this.courseId = courseId;
//     }
// 
//     public Integer getTotalMinutes() {
//         return totalMinutes;
//     }
// 
//     public void setTotalMinutes(int totalMinutes) {
//         this.totalMinutes = totalMinutes;
//     }
// 
//     public Integer getDefaultMinutesPerSession() {
//         return defaultMinutesPerSession;
//     }
// 
//     public void setDefaultMinutesPerSession(int defaultMinutesPerSession) {
//         this.defaultMinutesPerSession = defaultMinutesPerSession;
//     }
// 
//     public Long getCanvasCourseId() {
//         return canvasCourseId;
//     }
// 
//     public void setCanvasCourseId(Long canvasCourseId) {
//         this.canvasCourseId = canvasCourseId;
//     }
// 
// 
//     @Override
//     public String toString() {
//         return "AttendanceCourse [courseId=" + courseId + ", totalMinutes=" + totalMinutes + ", defaultMinutesPerSession="
//                 + defaultMinutesPerSession + ", canvasCourseId=" + canvasCourseId + "]";
//     }
// 
//     public AttendanceType getAttendanceType() {
//         return attendanceType;
//     }
// 
//     public void setAttendanceType(AttendanceType attendanceType) {
//         this.attendanceType = attendanceType;
//     }
// 
//     public Boolean getShowNotesToStudents() {
//         return showNotesToStudents;
//     }
// 
//     public void setShowNotesToStudents(Boolean showNotesToStudents) {
//         this.showNotesToStudents = showNotesToStudents;
//     }
// }


// Path: src/main/java/edu/ksu/canvas/attendance/repository/AttendanceCourseRepository.java
import edu.ksu.canvas.attendance.entity.AttendanceCourse;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

package edu.ksu.canvas.attendance.repository;



@Repository
public interface AttendanceCourseRepository extends CrudRepository<AttendanceCourse, Long> {


    AttendanceCourse findByCourseId(Long courseId);

    AttendanceCourse findByCanvasCourseId(Long canvasCourseId);