diff --git a/src/main/java/com/ftm/server/entity/entities/BeautyProduct.java b/src/main/java/com/ftm/server/entity/entities/BeautyProduct.java index c69b96e..5669afb 100644 --- a/src/main/java/com/ftm/server/entity/entities/BeautyProduct.java +++ b/src/main/java/com/ftm/server/entity/entities/BeautyProduct.java @@ -6,6 +6,8 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; +import org.hibernate.type.SqlTypes; @Entity @Table(name = "beauty_product") @@ -21,7 +23,8 @@ public class BeautyProduct extends BaseEntity { private String productImageLink; @Enumerated(EnumType.STRING) - @Column(name = "beauty_product_category") + @JdbcTypeCode(SqlTypes.NAMED_ENUM) + @Column(name = "beauty_product_category", columnDefinition = "beauty_product_category") private BeautyProductCategory beautyProductCategory; private String brand; diff --git a/src/main/java/com/ftm/server/entity/entities/GroomingTestQuestion.java b/src/main/java/com/ftm/server/entity/entities/GroomingTestQuestion.java index feff372..61a2c1c 100644 --- a/src/main/java/com/ftm/server/entity/entities/GroomingTestQuestion.java +++ b/src/main/java/com/ftm/server/entity/entities/GroomingTestQuestion.java @@ -6,6 +6,8 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; +import org.hibernate.type.SqlTypes; @Entity @Table(name = "grooming_test_question") @@ -17,7 +19,8 @@ public class GroomingTestQuestion extends BaseEntity { private Long id; @Enumerated(EnumType.STRING) - @Column(nullable = false) + @JdbcTypeCode(SqlTypes.NAMED_ENUM) + @Column(nullable = false, name = "grooming_category", columnDefinition = "grooming_category") private GroomingCategory groomingCategory; @Column(nullable = false) diff --git a/src/main/java/com/ftm/server/entity/entities/GroomingTestResult.java b/src/main/java/com/ftm/server/entity/entities/GroomingTestResult.java index 619eb52..b9f71d6 100644 --- a/src/main/java/com/ftm/server/entity/entities/GroomingTestResult.java +++ b/src/main/java/com/ftm/server/entity/entities/GroomingTestResult.java @@ -21,11 +21,11 @@ public class GroomingTestResult extends BaseEntity { private User user; @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "grommig_test_answer_id") + @JoinColumn(name = "grooming_test_answer_id") private GroomingTestAnswer groomingTestAnswer; @ManyToOne(fetch = FetchType.LAZY) - @JoinColumn(name = "grommig_test_question_id") + @JoinColumn(name = "grooming_test_question_id") private GroomingTestQuestion groomingTestQuestion; @Builder(access = AccessLevel.PRIVATE) diff --git a/src/main/java/com/ftm/server/entity/entities/Post.java b/src/main/java/com/ftm/server/entity/entities/Post.java index 4dc1f3c..ed7e2fe 100644 --- a/src/main/java/com/ftm/server/entity/entities/Post.java +++ b/src/main/java/com/ftm/server/entity/entities/Post.java @@ -10,7 +10,9 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.Type; +import org.hibernate.type.SqlTypes; @Entity @Table(name = "post") @@ -33,6 +35,8 @@ public class Post extends BaseEntity { private String content; @Enumerated(EnumType.STRING) + @JdbcTypeCode(SqlTypes.NAMED_ENUM) + @Column(nullable = false, name = "grooming_category", columnDefinition = "grooming_category") private GroomingCategory groomingCategory; @Type( diff --git a/src/main/java/com/ftm/server/entity/entities/User.java b/src/main/java/com/ftm/server/entity/entities/User.java index 3684a4e..1c2838a 100644 --- a/src/main/java/com/ftm/server/entity/entities/User.java +++ b/src/main/java/com/ftm/server/entity/entities/User.java @@ -12,7 +12,9 @@ import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.JdbcTypeCode; import org.hibernate.annotations.Type; +import org.hibernate.type.SqlTypes; @Entity @Table(name = "users") @@ -31,10 +33,14 @@ public class User extends BaseEntity { @Column(nullable = false, unique = true) private String nickname; + @Column(name = "age_group", columnDefinition = "age_group") @Enumerated(EnumType.STRING) + @JdbcTypeCode(SqlTypes.NAMED_ENUM) private AgeGroup ageGroup; @Enumerated(EnumType.STRING) + @JdbcTypeCode(SqlTypes.NAMED_ENUM) + @Column(name = "social_provider", columnDefinition = "social_provider") private SocialProvider socialProvider; @Column(unique = true) @@ -48,6 +54,8 @@ public class User extends BaseEntity { private GroomingLevel groomingLevel; @Enumerated(EnumType.STRING) + @JdbcTypeCode(SqlTypes.NAMED_ENUM) + @Column(name = "role", columnDefinition = "role") private UserRole role; @Type(