From fbf173c6d35a1f9baa7aefc13cfd0e10975b6f4f Mon Sep 17 00:00:00 2001 From: Sim Date: Tue, 5 Dec 2023 11:28:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=20#93=20=EA=B0=9D=EC=8B=A4,=20=EC=88=99?= =?UTF-8?q?=EC=86=8C=20comment=20=EC=96=B4=EB=85=B8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fc/shimpyo_be/domain/product/entity/Product.java | 8 ++++++++ .../shimpyo_be/domain/product/entity/ProductImage.java | 4 ++++ .../com/fc/shimpyo_be/domain/room/entity/Room.java | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java b/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java index 05b00d2b..f1c66abd 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java +++ b/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java @@ -18,6 +18,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.Comment; @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @@ -26,19 +27,26 @@ public class Product { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) + @Comment("숙소 아이디") private Long id; @Column(nullable = false) + @Comment("숙소 이름") private String name; @Column(nullable = false) + @Comment("숙소 위치") private String address; @Column(nullable = false) @Convert(converter = CategoryConverter.class) + @Comment("숙소 카테고리") private Category category; @Column(columnDefinition = "TEXT", nullable = false) + @Comment("숙소 설명") private String description; @ColumnDefault("0") + @Comment("숙소 평점") private float starAvg; @Column(columnDefinition = "TEXT", nullable = false) + @Comment("숙소 대표 이미지") private String thumbnail; @OneToMany(mappedBy = "product", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) private List photoUrls = new ArrayList<>(); diff --git a/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java b/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java index 3370f9e4..961d31e8 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java +++ b/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java @@ -12,6 +12,7 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.Comment; @Getter @@ -21,11 +22,14 @@ public class ProductImage { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) + @Comment("숙소 이미지 아이디") private Long id; @Column(nullable = false, columnDefinition = "TEXT") + @Comment("숙소 관련 이미지") private String photoUrl; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(nullable = false, name = "product_id") + @Comment("숙소 아이디") private Product product; @Builder diff --git a/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java b/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java index 0f79a02c..ea97c2ed 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java +++ b/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java @@ -14,6 +14,7 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.Comment; @Getter @NoArgsConstructor(access = AccessLevel.PROTECTED) @@ -22,23 +23,32 @@ public class Room { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) + @Comment("객실 아이디") private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "product_id") + @Comment("숙소 아이디") private Product product; @Column(length = 30) + @Comment("객실 이름") private String name; @Column(nullable = false) + @Comment("객실 설명") private String description; @Column(columnDefinition = "TINYINT") + @Comment("객실 기준인원") private int standard; @Column(columnDefinition = "TINYINT") + @Comment("객실 최대인원") private int capacity; @Column(columnDefinition = "TIME") + @Comment("객실 체크인 시간") private LocalTime checkIn; @Column(columnDefinition = "TIME") + @Comment("객실 체크아웃 시간") private LocalTime checkOut; @Column(nullable = false) + @Comment("객실 가격") private int price; @Builder From 413cab23adb67164e4bfd1cb5756cec6905b2404 Mon Sep 17 00:00:00 2001 From: jae cheol sim Date: Tue, 5 Dec 2023 12:00:45 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=20#93=20=EC=88=99=EC=86=8C,=20=EB=B0=A9,?= =?UTF-8?q?=20=EC=88=99=EC=86=8C=EC=9D=B4=EB=AF=B8=EC=A7=80comment=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fc/shimpyo_be/domain/product/entity/Product.java | 4 ++-- .../fc/shimpyo_be/domain/product/entity/ProductImage.java | 6 +++--- .../java/com/fc/shimpyo_be/domain/room/entity/Room.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java b/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java index f1c66abd..d97401bd 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java +++ b/src/main/java/com/fc/shimpyo_be/domain/product/entity/Product.java @@ -27,7 +27,7 @@ public class Product { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Comment("숙소 아이디") + @Comment("숙소 식별자") private Long id; @Column(nullable = false) @Comment("숙소 이름") @@ -46,7 +46,7 @@ public class Product { @Comment("숙소 평점") private float starAvg; @Column(columnDefinition = "TEXT", nullable = false) - @Comment("숙소 대표 이미지") + @Comment("숙소 대표 이미지 URL") private String thumbnail; @OneToMany(mappedBy = "product", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true) private List photoUrls = new ArrayList<>(); diff --git a/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java b/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java index 961d31e8..e888d6b8 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java +++ b/src/main/java/com/fc/shimpyo_be/domain/product/entity/ProductImage.java @@ -22,14 +22,14 @@ public class ProductImage { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Comment("숙소 이미지 아이디") + @Comment("숙소 이미지 식별자") private Long id; @Column(nullable = false, columnDefinition = "TEXT") - @Comment("숙소 관련 이미지") + @Comment("숙소 사진 URL") private String photoUrl; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(nullable = false, name = "product_id") - @Comment("숙소 아이디") + @Comment("숙소 식별자") private Product product; @Builder diff --git a/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java b/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java index ea97c2ed..e50e8013 100644 --- a/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java +++ b/src/main/java/com/fc/shimpyo_be/domain/room/entity/Room.java @@ -23,11 +23,11 @@ public class Room { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Comment("객실 아이디") + @Comment("객실 식별자") private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "product_id") - @Comment("숙소 아이디") + @Comment("숙소 식별자") private Product product; @Column(length = 30) @Comment("객실 이름")