diff --git a/backend/src/main/java/woowacourse/touroot/travelogue/domain/Travelogue.java b/backend/src/main/java/woowacourse/touroot/travelogue/domain/Travelogue.java index 1899e848..bc6d0d8e 100644 --- a/backend/src/main/java/woowacourse/touroot/travelogue/domain/Travelogue.java +++ b/backend/src/main/java/woowacourse/touroot/travelogue/domain/Travelogue.java @@ -25,5 +25,5 @@ public class Travelogue { private String thumbnail; @OneToMany(mappedBy = "travelogue") - private List days; + private List travelogueDays; } diff --git a/backend/src/main/java/woowacourse/touroot/travelogueday/domain/TravelogueDay.java b/backend/src/main/java/woowacourse/touroot/travelogueday/domain/TravelogueDay.java index 2123b5b9..c39aad00 100644 --- a/backend/src/main/java/woowacourse/touroot/travelogueday/domain/TravelogueDay.java +++ b/backend/src/main/java/woowacourse/touroot/travelogueday/domain/TravelogueDay.java @@ -22,7 +22,7 @@ public class TravelogueDay { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @Column(nullable = false) + @Column(name = "DAY_ORDER", nullable = false) private Integer order; @JoinColumn(nullable = false) @@ -30,5 +30,5 @@ public class TravelogueDay { private Travelogue travelogue; @OneToMany(mappedBy = "travelogueDay") - private List places; + private List traveloguePlaces; } diff --git a/backend/src/main/java/woowacourse/touroot/traveloguephoto/domain/TraveloguePhoto.java b/backend/src/main/java/woowacourse/touroot/traveloguephoto/domain/TraveloguePhoto.java index 9bb79e4e..0ee66819 100644 --- a/backend/src/main/java/woowacourse/touroot/traveloguephoto/domain/TraveloguePhoto.java +++ b/backend/src/main/java/woowacourse/touroot/traveloguephoto/domain/TraveloguePhoto.java @@ -19,13 +19,13 @@ public class TraveloguePhoto { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @Column(nullable = false) + @Column(name = "PHOTO_KEY", nullable = false) private String key; - @Column(nullable = false) + @Column(name = "PHOTO_ORDER", nullable = false) private Integer order; @JoinColumn(nullable = false) @ManyToOne(fetch = FetchType.LAZY) - private TraveloguePlace place; + private TraveloguePlace traveloguePlace; } diff --git a/backend/src/main/java/woowacourse/touroot/travelogueplace/domain/TraveloguePlace.java b/backend/src/main/java/woowacourse/touroot/travelogueplace/domain/TraveloguePlace.java index 4b932fa2..9b17717c 100644 --- a/backend/src/main/java/woowacourse/touroot/travelogueplace/domain/TraveloguePlace.java +++ b/backend/src/main/java/woowacourse/touroot/travelogueplace/domain/TraveloguePlace.java @@ -23,7 +23,7 @@ public class TraveloguePlace { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; - @Column(nullable = false) + @Column(name = "PLACE_ORDER", nullable = false) private Integer order; private String description; @@ -34,8 +34,8 @@ public class TraveloguePlace { @JoinColumn(nullable = false) @ManyToOne(fetch = FetchType.LAZY) - private TravelogueDay day; + private TravelogueDay travelogueDay; @OneToMany(mappedBy = "traveloguePlace") - private List photos; + private List traveloguePhotos; } diff --git a/backend/src/main/resources/application.yml b/backend/src/main/resources/application.yml index 17164e13..aad6713f 100644 --- a/backend/src/main/resources/application.yml +++ b/backend/src/main/resources/application.yml @@ -1,4 +1,7 @@ spring: + h2: + console: + enabled: true datasource: driver-class-name: org.h2.Driver url: jdbc:h2:mem:test