Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MODDCB-119 Change the datatype of calendar startDate and endDate #99

Merged
merged 11 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ private void createCalendarIfNotExists() {
log.info("createCalendarIfNotExists:: calendar with name {} doesn't exists, so creating new calendar", DCB_CALENDAR_NAME);
Calendar newCalendar = Calendar.builder()
.name(DCB_CALENDAR_NAME)
.startDate(LocalDate.now())
.endDate(LocalDate.now().plusYears(10))
.startDate(LocalDate.now().toString())
.endDate(LocalDate.now().plusYears(10).toString())
.normalHours(List.of(NormalHours.builder()
.startDay(DayOfWeek.SUNDAY.name())
.startTime(LocalTime.of(0, 0).toString())
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/swagger.api/schemas/Calendar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ Calendar:
type: string
startDate:
type: string
format: date
description: The first effective date (inclusive, YYYY-MM-DD) of this calendar
endDate:
type: string
format: date
description: The first effective date (inclusive, YYYY-MM-DD) of this calendar
assignments:
description: A list of all service points that this calendar is assigned to
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/folio/dcb/utils/EntityUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ public static TransactionAuditEntity createTransactionAuditEntity(){
public static CalendarCollection getCalendarCollection(String calendarName) {
var calendar = Calendar.builder()
.name(calendarName)
.startDate(LocalDate.now())
.endDate(LocalDate.now().plusYears(10))
.startDate(LocalDate.now().toString())
.endDate(LocalDate.now().plusYears(10).toString())
.assignments(new ArrayList<>())
.build();
var calendarCollection = new CalendarCollection();
Expand Down
Loading