From d680d6fed0bdc470fee206a52d21bfd19b6d4e1b Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 16:24:01 +0900 Subject: [PATCH 01/10] =?UTF-8?q?#1=20chore:=20BaseResponseStatus=EC=97=90?= =?UTF-8?q?=20=EB=8F=84=EB=A9=94=EC=9D=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../puremarket/common/BaseResponseStatus.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kkobugi/puremarket/common/BaseResponseStatus.java b/src/main/java/com/kkobugi/puremarket/common/BaseResponseStatus.java index 3eddbde..1cbeeba 100644 --- a/src/main/java/com/kkobugi/puremarket/common/BaseResponseStatus.java +++ b/src/main/java/com/kkobugi/puremarket/common/BaseResponseStatus.java @@ -12,13 +12,30 @@ public enum BaseResponseStatus { /** * 2000: Request 오류 */ - // user(2000~2099) + // users(2000-2099) INVALID_USER_IDX(false, 2000, "잘못된 user Idx 입니다."), + // produce(2100-2199) + + // recipe(2200-2299) + + // ingredient(2300-2399) + + // giveaway(2400-2499) + + /** * 3000: Response 오류 */ - // user(3000~3099) + // users(3000~3099) + + // produce(3100-3199) + + // recipe(3200-3299) + + // ingredient(3300-3399) + + // giveaway(3400-3499) /** From f1d4c81d83cb0dcb1a5e209c1b49c00d51f71c41 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:06:50 +0900 Subject: [PATCH 02/10] =?UTF-8?q?#1=20feat:=20User=20Entity=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kkobugi/puremarket/user/entity/User.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/java/com/kkobugi/puremarket/user/entity/User.java diff --git a/src/main/java/com/kkobugi/puremarket/user/entity/User.java b/src/main/java/com/kkobugi/puremarket/user/entity/User.java new file mode 100644 index 0000000..f9f6112 --- /dev/null +++ b/src/main/java/com/kkobugi/puremarket/user/entity/User.java @@ -0,0 +1,29 @@ +package com.kkobugi.puremarket.user.entity; + +import com.kkobugi.puremarket.common.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.hibernate.annotations.DynamicInsert; + +@Entity +@Getter +@NoArgsConstructor +@DynamicInsert +public class User extends BaseEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long userIdx; + + @Column(length = 30) + private String nickname; + + @Column + private String loginId; + + @Column + private String password; + + @Column + private String contact; +} From a65585a8c6fb6c89f6b0b5d62a00d536bab4b8e2 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:12:48 +0900 Subject: [PATCH 03/10] =?UTF-8?q?#1=20feat:=20User=20Entity=20nullable=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/kkobugi/puremarket/user/entity/User.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/kkobugi/puremarket/user/entity/User.java b/src/main/java/com/kkobugi/puremarket/user/entity/User.java index f9f6112..2b928ba 100644 --- a/src/main/java/com/kkobugi/puremarket/user/entity/User.java +++ b/src/main/java/com/kkobugi/puremarket/user/entity/User.java @@ -18,12 +18,10 @@ public class User extends BaseEntity { @Column(length = 30) private String nickname; - @Column + @Column(nullable = false) private String loginId; - @Column + @Column(nullable = false) private String password; - - @Column private String contact; } From 1f4ad15fe25ac100d6a456892448dca608534d9f Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:15:17 +0900 Subject: [PATCH 04/10] =?UTF-8?q?#1=20feat:=20Recipe=20Entity=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../puremarket/recipe/entity/Recipe.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java diff --git a/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java b/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java new file mode 100644 index 0000000..8ccb02b --- /dev/null +++ b/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java @@ -0,0 +1,24 @@ +package com.kkobugi.puremarket.recipe.entity; + +import com.kkobugi.puremarket.common.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.hibernate.annotations.DynamicInsert; + +@Entity +@Getter +@NoArgsConstructor +@DynamicInsert +public class Recipe extends BaseEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long recipeIdx; + + @Column(nullable = false, length = 100) + private String title; + + @Column(nullable = false) + private String content; + private String recipeImage; +} From 2c07c5ac243be634620ce55b6fa1413142154e60 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:19:02 +0900 Subject: [PATCH 05/10] =?UTF-8?q?#1=20feat:=20Produce=20Entity=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../puremarket/produce/entity/Produce.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java diff --git a/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java b/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java new file mode 100644 index 0000000..fd4d8dc --- /dev/null +++ b/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java @@ -0,0 +1,27 @@ +package com.kkobugi.puremarket.produce.entity; + +import com.kkobugi.puremarket.common.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.hibernate.annotations.DynamicInsert; + +@Entity +@Getter +@NoArgsConstructor +@DynamicInsert +public class Produce extends BaseEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long produceIdx; + + @Column(nullable = false, length = 100) + private String title; + + @Column(nullable = false) + private String content; + + @Column(nullable = false) + private Integer price; + private String produceImage; +} From 2ccf0795ac83c521415500d082076660395685f5 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:22:15 +0900 Subject: [PATCH 06/10] =?UTF-8?q?#1=20feat:=20Ingredient=20Entity=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ingredient/entity/Ingredient.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/main/java/com/kkobugi/puremarket/ingredient/entity/Ingredient.java diff --git a/src/main/java/com/kkobugi/puremarket/ingredient/entity/Ingredient.java b/src/main/java/com/kkobugi/puremarket/ingredient/entity/Ingredient.java new file mode 100644 index 0000000..c55b716 --- /dev/null +++ b/src/main/java/com/kkobugi/puremarket/ingredient/entity/Ingredient.java @@ -0,0 +1,28 @@ +package com.kkobugi.puremarket.ingredient.entity; + +import com.kkobugi.puremarket.common.BaseEntity; +import com.kkobugi.puremarket.recipe.entity.Recipe; +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.hibernate.annotations.DynamicInsert; + +@Entity +@Getter +@NoArgsConstructor +@DynamicInsert +public class Ingredient extends BaseEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long ingredientIdx; + + @ManyToOne + @JoinColumn(nullable = false, name = "recipeIdx") + private Recipe recipe; + + @Column(nullable = false) + private String name; + + @Column(nullable = false) + private String quantity; +} From b3d2d5297ae817c5037766cd6b0671f1a155fb92 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:24:35 +0900 Subject: [PATCH 07/10] =?UTF-8?q?#1=20feat:=20Giveaway=20Entity=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../puremarket/giveaway/entity/Giveaway.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java diff --git a/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java b/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java new file mode 100644 index 0000000..9f86da7 --- /dev/null +++ b/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java @@ -0,0 +1,24 @@ +package com.kkobugi.puremarket.giveaway.entity; + +import com.kkobugi.puremarket.common.BaseEntity; +import jakarta.persistence.*; +import lombok.Getter; +import lombok.NoArgsConstructor; +import org.hibernate.annotations.DynamicInsert; + +@Entity +@Getter +@NoArgsConstructor +@DynamicInsert +public class Giveaway extends BaseEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Long GiveawayIdx; + + @Column(nullable = false) + private String title; + + @Column(nullable = false) + private String content; + private String giveawayImage; +} From 7ef646db248457013e910840fe5951a2749c671a Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:25:40 +0900 Subject: [PATCH 08/10] =?UTF-8?q?#1=20fix:=20User=EC=99=80=EC=9D=98=20?= =?UTF-8?q?=EC=97=B0=EA=B4=80=EA=B4=80=EA=B3=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kkobugi/puremarket/giveaway/entity/Giveaway.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java b/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java index 9f86da7..ffeae2b 100644 --- a/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java +++ b/src/main/java/com/kkobugi/puremarket/giveaway/entity/Giveaway.java @@ -1,6 +1,7 @@ package com.kkobugi.puremarket.giveaway.entity; import com.kkobugi.puremarket.common.BaseEntity; +import com.kkobugi.puremarket.user.entity.User; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; @@ -15,6 +16,10 @@ public class Giveaway extends BaseEntity { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long GiveawayIdx; + @ManyToOne + @JoinColumn(nullable = false, name = "userIdx") + private User user; + @Column(nullable = false) private String title; From 04d060dd59b66ed4da14d0cbc1be5f87ae50eca9 Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:27:03 +0900 Subject: [PATCH 09/10] =?UTF-8?q?#1=20fix:=20Recipe=20Entity=EC=97=90=20Us?= =?UTF-8?q?er=EC=99=80=EC=9D=98=20=EC=97=B0=EA=B4=80=EA=B4=80=EA=B3=84=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 --- .../java/com/kkobugi/puremarket/recipe/entity/Recipe.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java b/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java index 8ccb02b..8e41e87 100644 --- a/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java +++ b/src/main/java/com/kkobugi/puremarket/recipe/entity/Recipe.java @@ -1,6 +1,7 @@ package com.kkobugi.puremarket.recipe.entity; import com.kkobugi.puremarket.common.BaseEntity; +import com.kkobugi.puremarket.user.entity.User; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; @@ -15,6 +16,10 @@ public class Recipe extends BaseEntity { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long recipeIdx; + @ManyToOne + @JoinColumn(nullable = false, name = "userIdx") + private User user; + @Column(nullable = false, length = 100) private String title; From 00b4c18bc2637b441427490c6fcd809453931f7a Mon Sep 17 00:00:00 2001 From: joonghyun Date: Wed, 17 Jan 2024 17:27:24 +0900 Subject: [PATCH 10/10] =?UTF-8?q?#1=20fix:=20Produce=20Entity=EC=97=90=20U?= =?UTF-8?q?ser=EC=99=80=EC=9D=98=20=EC=97=B0=EA=B4=80=EA=B4=80=EA=B3=84=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 --- .../java/com/kkobugi/puremarket/produce/entity/Produce.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java b/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java index fd4d8dc..5f7573c 100644 --- a/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java +++ b/src/main/java/com/kkobugi/puremarket/produce/entity/Produce.java @@ -1,6 +1,7 @@ package com.kkobugi.puremarket.produce.entity; import com.kkobugi.puremarket.common.BaseEntity; +import com.kkobugi.puremarket.user.entity.User; import jakarta.persistence.*; import lombok.Getter; import lombok.NoArgsConstructor; @@ -15,6 +16,10 @@ public class Produce extends BaseEntity { @GeneratedValue(strategy = GenerationType.IDENTITY) private Long produceIdx; + @ManyToOne + @JoinColumn(nullable = false, name = "userIdx") + private User user; + @Column(nullable = false, length = 100) private String title;