Skip to content

Commit

Permalink
Merge branch 'backend/feature/15-gpt-api' into dev_backend
Browse files Browse the repository at this point in the history
  • Loading branch information
yo0oni committed Mar 5, 2024
2 parents dbb666d + 372c01e commit 2bfef61
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ public class Country {

@Id
@Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "nation")
private String nation;

@Column(name = "city")
private String city;

@Column(name = "imageUrl")
private String imageUrl;

@OneToMany(mappedBy = "country")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ public class ChatGptConfig {
public static final Boolean STREAM = false;
public static final String ROLE = "user";
public static final Double TEMPERATURE = 0.6;
//public static final Double TOP_P = 1.0;
public static final String MEDIA_TYPE = "application/json; charset=UTF-8";
//completions : 질답
public static final String CHAT_URL = "https://api.openai.com/v1/chat/completions";
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,21 @@
public class Member extends BaseEntity {

@Id
@Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "uid", nullable = false)
@Column(nullable = false)
private String uid;

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

@Column(name = "birth")
private String birth;

@Column(name = "phone_number")
private String phoneNumber;

@Column(name = "login_type")
private String loginType;

@Builder.Default
@Column(name = "activated", nullable = false)
@Column(nullable = false)
private boolean activated = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@
public class Schedule extends BaseEntity {

@Id
@Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "schedule_name", nullable = false)
@Column(nullable = false)
private String scheduleName;

@ManyToOne(fetch = FetchType.LAZY)
Expand All @@ -41,20 +40,16 @@ public class Schedule extends BaseEntity {
private List<ScheduleDetail> scheduleDetails = new ArrayList<>();

// FK 연결 필요
@Column(name = "booking_id")
private String bookingId;

@Column(name = "start_date")
private String startDate;

@Column(name = "end_date")
private String endDate;

@Column(name = "total_price")
private double totalPrice;

@Builder.Default
@Column(name = "activated", nullable = false)
@Column(nullable = false)
private boolean activated = true;

// // setScheduleDetails 메서드 추가
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
public class SharedSchedule extends BaseEntity {

@Id
@Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,34 +14,26 @@
public class ScheduleDetail {

@Id
@Column(name = "id", unique = true, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@Column(name = "todo") // 할 일
private String todo;

@Column(name = "date")
private String date;

@Column(name = "place") // 장소
private String place;

@Column(name = "num") // 일정 순서
private int num;

@Column(name = "budget") // 예산
private double budget;

@Column(name = "latitude") // 위도
private double latitude;

@Column(name = "longitude") // 경도
private double longitude;

// Schedules 엔티티의 필드를 참조하도록 수정
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "schedules_id", nullable = false)
@JoinColumn(nullable = false)
private Schedule schedule;

}

0 comments on commit 2bfef61

Please sign in to comment.