diff --git a/src/main/java/com/backend/soullive_a/entity/Age.java b/src/main/java/com/backend/soullive_a/entity/Age.java index dea99d9..357d407 100644 --- a/src/main/java/com/backend/soullive_a/entity/Age.java +++ b/src/main/java/com/backend/soullive_a/entity/Age.java @@ -9,12 +9,10 @@ import lombok.extern.slf4j.Slf4j; import org.hibernate.annotations.DynamicInsert; -@Slf4j @Entity @Table(name = "AGE") @Builder @Getter -@DynamicInsert @AllArgsConstructor @NoArgsConstructor public class Age { diff --git a/src/main/java/com/backend/soullive_a/entity/BrandImage.java b/src/main/java/com/backend/soullive_a/entity/BrandImage.java index cd3aae9..afb5ddc 100644 --- a/src/main/java/com/backend/soullive_a/entity/BrandImage.java +++ b/src/main/java/com/backend/soullive_a/entity/BrandImage.java @@ -8,12 +8,10 @@ import lombok.extern.slf4j.Slf4j; import org.hibernate.annotations.DynamicInsert; -@Slf4j @Entity @Table(name = "BRAND_IMAGE") @Builder @Getter -@DynamicInsert @AllArgsConstructor @NoArgsConstructor public class BrandImage { diff --git a/src/main/java/com/backend/soullive_a/entity/Gender.java b/src/main/java/com/backend/soullive_a/entity/Gender.java index 1c4b297..2a14c16 100644 --- a/src/main/java/com/backend/soullive_a/entity/Gender.java +++ b/src/main/java/com/backend/soullive_a/entity/Gender.java @@ -9,12 +9,10 @@ import lombok.extern.slf4j.Slf4j; import org.hibernate.annotations.DynamicInsert; -@Slf4j @Entity @Table(name = "GENDER") @Builder @Getter -@DynamicInsert @AllArgsConstructor @NoArgsConstructor public class Gender { diff --git a/src/main/java/com/backend/soullive_a/entity/Product.java b/src/main/java/com/backend/soullive_a/entity/Product.java index 3dab20e..3bcf429 100644 --- a/src/main/java/com/backend/soullive_a/entity/Product.java +++ b/src/main/java/com/backend/soullive_a/entity/Product.java @@ -11,29 +11,27 @@ import java.util.ArrayList; import java.util.List; -@Slf4j @Entity @Table(name = "PRODUCT") @Builder @Getter -@DynamicInsert @AllArgsConstructor @NoArgsConstructor public class Product { @Id @GeneratedValue - @Column(name = "PRODUCT_ID") + @Column(name = "PRODUCT_ID", nullable = false) private Long id; - @Column(name = "COMPANY", length = 100) + @Column(name = "COMPANY", nullable = false) private String company; - @Column(name = "BRAND", length = 100) + @Column(name = "BRAND", nullable = true) private String brand; - @Column(name = "PRODUCT", length = 100) + @Column(name = "PRODUCT", nullable = false) private String product; - @Column(name = "CHARACTERISTIC") + @Column(name = "CHARACTERISTIC", nullable = false) private String characteristic; } diff --git a/src/main/java/com/backend/soullive_a/entity/ProductImage.java b/src/main/java/com/backend/soullive_a/entity/ProductImage.java index 132e5a4..3efd9f5 100644 --- a/src/main/java/com/backend/soullive_a/entity/ProductImage.java +++ b/src/main/java/com/backend/soullive_a/entity/ProductImage.java @@ -8,24 +8,22 @@ import lombok.extern.slf4j.Slf4j; import org.hibernate.annotations.DynamicInsert; -@Slf4j @Entity @Table(name = "PRODUCT_IMAGE") @Builder @Getter -@DynamicInsert @AllArgsConstructor @NoArgsConstructor public class ProductImage { @Id @GeneratedValue - @Column(name = "PRODUCT_IMAGE_ID") + @Column(name = "PRODUCT_IMAGE_ID", nullable = false) private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "PRODUCT_ID", nullable = false) private Product product; - @Column(name = "PRODUCT_IMAGE") + @Column(name = "PRODUCT_IMAGE", nullable = false) private String productImage; } \ No newline at end of file diff --git a/src/main/java/com/backend/soullive_a/entity/Range.java b/src/main/java/com/backend/soullive_a/entity/Range.java index 4abd1a9..208f9d5 100644 --- a/src/main/java/com/backend/soullive_a/entity/Range.java +++ b/src/main/java/com/backend/soullive_a/entity/Range.java @@ -8,23 +8,21 @@ import lombok.extern.slf4j.Slf4j; import org.hibernate.annotations.DynamicInsert; -@Slf4j @Entity(name = "RANGE") @Builder @Getter -@DynamicInsert @AllArgsConstructor @NoArgsConstructor public class Range { @Id @GeneratedValue - @Column(name = "RANGE_ID") + @Column(name = "RANGE_ID", nullable = false) private Long id; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "PRODUCT_ID", nullable = false) private Product product; - @Column(name = "RANGE") + @Column(name = "RANGE", nullable = false) private String rangeType; }