Skip to content

Commit

Permalink
Merge pull request #25 from Soongsil-CoffeeChat/fix/#24
Browse files Browse the repository at this point in the history
fix: 멘토링 신청 시간 엔티티변경
  • Loading branch information
KimKyoHwee authored Apr 6, 2024
2 parents 541f729 + 653d90e commit 581cbb8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
4 changes: 4 additions & 0 deletions src/main/java/com/soongsil/CoffeeChat/entity/Mentee.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ public class Mentee {
@Column(name = "mentee_id")
private Long id;

@Column
private String picture;
//TODO: aws파지면 사진처리 해줘야됨

@Column(name = "phone_num")
private String phoneNum;

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/soongsil/CoffeeChat/entity/Mentor.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ public class Mentor{
@Column(name = "mentor_id")
private Long id;

@Column
private String picture;
//TODO: aws파지면 사진처리 해줘야됨

@Column(name = "phone_num")
private String phoneNum;

Expand Down
17 changes: 13 additions & 4 deletions src/main/java/com/soongsil/CoffeeChat/entity/PossibleDate.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package com.soongsil.CoffeeChat.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

@Entity
@Getter
Expand All @@ -17,11 +23,14 @@ public class PossibleDate {
@JoinColumn(name = "mentor_id")
private Mentor mentor;

@Column
private String date;
@JsonFormat(pattern = "yyyy-MM-dd")
LocalDate date;

@Column
private String time;
@JsonFormat(pattern = "HH:mm") //datetimeformat은 ss까지 전부 다 받아야 오류안남
LocalTime startTime;

@JsonFormat(pattern = "HH:mm")
LocalTime endTime;

@Column
private boolean apply;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/soongsil/CoffeeChat/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public class User {
@Column
private String role;

@Column
private String picture;
// @Column
// private String picture;

@OneToOne(cascade = CascadeType.ALL)
@JoinColumn(name="user_mentor", referencedColumnName = "mentor_id")
Expand Down

0 comments on commit 581cbb8

Please sign in to comment.