diff --git a/backend/app/src/main/java/com/ugent/pidgeon/model/json/CourseWithRelationJson.java b/backend/app/src/main/java/com/ugent/pidgeon/model/json/CourseWithRelationJson.java index 4882e9e5..9f52dca6 100644 --- a/backend/app/src/main/java/com/ugent/pidgeon/model/json/CourseWithRelationJson.java +++ b/backend/app/src/main/java/com/ugent/pidgeon/model/json/CourseWithRelationJson.java @@ -4,5 +4,5 @@ import java.time.OffsetDateTime; public record CourseWithRelationJson (String url, CourseRelation relation, String name, Long courseId, - OffsetDateTime archivedAt, Integer memberCount, OffsetDateTime createdAt) { } + OffsetDateTime archivedAt, Integer memberCount, OffsetDateTime createdAt, Integer year) { } diff --git a/backend/app/src/main/java/com/ugent/pidgeon/postgre/models/CourseEntity.java b/backend/app/src/main/java/com/ugent/pidgeon/postgre/models/CourseEntity.java index 93a246e9..042f9d6d 100644 --- a/backend/app/src/main/java/com/ugent/pidgeon/postgre/models/CourseEntity.java +++ b/backend/app/src/main/java/com/ugent/pidgeon/postgre/models/CourseEntity.java @@ -19,7 +19,7 @@ public class CourseEntity { private String description; @Column(name = "course_year", nullable = true) - private int courseYear; + private Integer courseYear; @Column(name = "created_at") diff --git a/backend/app/src/main/java/com/ugent/pidgeon/util/EntityToJsonConverter.java b/backend/app/src/main/java/com/ugent/pidgeon/util/EntityToJsonConverter.java index 8111abd2..9056821a 100644 --- a/backend/app/src/main/java/com/ugent/pidgeon/util/EntityToJsonConverter.java +++ b/backend/app/src/main/java/com/ugent/pidgeon/util/EntityToJsonConverter.java @@ -110,7 +110,8 @@ public CourseWithRelationJson courseEntityToCourseWithRelation(CourseEntity cour course.getId(), course.getArchivedAt(), memberCount, - course.getCreatedAt() + course.getCreatedAt(), + course.getCourseYear() ); }