Skip to content

Commit

Permalink
[fix] VectorDB에 저장할 스케쥴 데이터에 카테고리 컬러 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
JeonHaeseung committed Jul 9, 2024
1 parent efc7111 commit 7e6225c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public GetScheduleListDto changeSchedule(Long memberId, PutScheduleDto putSchedu
.endTime(endTime)
.category(category.getName())
.category_id(category.getId())
.category_color(category.getColor())
.member_id(memberId)
.schedule_id(putScheduleDto.getId())
.build();
Expand Down Expand Up @@ -239,6 +240,7 @@ public GetScheduleListDto postNewUserSchedule(Long memberId, PostScheduleDto pos
postScheduleDto.getEndTime(),
category.getName(),
category.getId(),
category.getColor(),
newSchedule.getMember().getId(),
newSchedule.getId());

Expand All @@ -249,7 +251,7 @@ public GetScheduleListDto postNewUserSchedule(Long memberId, PostScheduleDto pos
/* 새로운 스케쥴을 VectorDB에 저장하는 API 호출 */
public void postNewAiSchedule(String info, String location, String person,
ZonedDateTime startTime, ZonedDateTime endTime,
String category, Long category_id, Long memberId, Long scheduleId){
String category, Long category_id, String category_color, Long memberId, Long scheduleId){

// null 값은 전달되서는 안됨
if(endTime == null){
Expand All @@ -265,6 +267,7 @@ public void postNewAiSchedule(String info, String location, String person,
.endTime(endTime.withZoneSameInstant(ZoneId.of("Asia/Seoul")))
.category(category)
.category_id(category_id)
.category_color(category_color)
.member_id(memberId)
.schedule_id(scheduleId)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,7 @@ public class PostFastApiScheduleDto {

@JsonProperty("category_id")
private Long category_id;

@JsonProperty("category_color")
private String category_color;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,7 @@ public class PutFastApiScheduleDto {

@JsonProperty("category_id")
private Long category_id;

@JsonProperty("category_color")
private String category_color;
}

0 comments on commit 7e6225c

Please sign in to comment.