Skip to content

Commit

Permalink
Feat: 상담 시간 저장 필드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
noeyoes authored Jul 12, 2024
2 parents c1220a0 + a5f90e9 commit 7968d9d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class ConsultContentInfo extends BaseTimeEntity {
@Column
private String takingDrug;

@Column
private String consultedAt;

@OneToMany(mappedBy = "consultId", cascade = CascadeType.REMOVE)
private List<ProvidedDrugInfo> providedDrugInfos = new ArrayList<>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public class ConsultRequestDto {
private String providerName;
private String takingDrug;
private String consultContent;
private String consultedAt;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ public class ConsultResponseDto {
private Long consultId;
private String providerName;
private String takingDrug;
private String consultDate;
private String consultedAt;

public ConsultResponseDto(ConsultContentInfo consultContentInfo) {
this.consultId = consultContentInfo.getConsultId();
this.providerName = consultContentInfo.getProviderName();
this.takingDrug = consultContentInfo.getTakingDrug();
this.consultDate = consultContentInfo.getCreatedAt();
this.consultedAt = consultContentInfo.getConsultedAt();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public Long save(ConsultRequestDto consultReq) {
.providerName(consultReq.getProviderName())
.takingDrug(consultReq.getTakingDrug())
.consultContent(consultReq.getConsultContent())
.consultedAt(consultReq.getConsultedAt())
.build();

ConsultContentInfo savedConsult = consultRepository.save(consultContentInfo);
Expand Down

0 comments on commit 7968d9d

Please sign in to comment.