-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
202 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.backend.soullive_a.constant; | ||
|
||
public enum AgeType { | ||
TEN,TWENTY,THIRTEEN, FOURTEEN, FIFTEEN, SIXTEEN | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/com/backend/soullive_a/constant/GenderType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.backend.soullive_a.constant; | ||
|
||
public enum GenderType { | ||
Male, Female | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import com.backend.soullive_a.constant.AgeType; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.hibernate.annotations.DynamicInsert; | ||
|
||
@Slf4j | ||
@Entity | ||
@Table(name = "AGE") | ||
@Builder | ||
@Getter | ||
@DynamicInsert | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Age { | ||
@Id | ||
@GeneratedValue | ||
@Column(name = "AGE_ID") | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "AGE_TYPE") | ||
private AgeType ageType; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/backend/soullive_a/entity/BrandImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.hibernate.annotations.DynamicInsert; | ||
|
||
@Slf4j | ||
@Entity | ||
@Table(name = "BRAND_IMAGE") | ||
@Builder | ||
@Getter | ||
@DynamicInsert | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class BrandImage { | ||
@Id | ||
@GeneratedValue | ||
@Column(name = "BRAND_IMAGE_ID") | ||
private Long id; | ||
|
||
@Column(name = "BRAND_IMAGE") | ||
private String brandImage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import com.backend.soullive_a.constant.GenderType; | ||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.hibernate.annotations.DynamicInsert; | ||
|
||
@Slf4j | ||
@Entity | ||
@Table(name = "GENDER") | ||
@Builder | ||
@Getter | ||
@DynamicInsert | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class Gender { | ||
@Id | ||
@GeneratedValue | ||
@Column(name = "GENDER_ID") | ||
private Long id; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(name = "GENDER") | ||
private GenderType gender; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.hibernate.annotations.DynamicInsert; | ||
|
||
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") | ||
private Long id; | ||
|
||
@Column(name = "COMPANY", length = 100) | ||
private String company; | ||
|
||
@Column(name = "BRAND", length = 100) | ||
private String brand; | ||
|
||
@OneToMany(mappedBy = "PRODUCT") | ||
private List<BrandImage> brandImages = new ArrayList<>(); | ||
|
||
@Column(name = "PRODUCT", length = 100) | ||
private String product; | ||
|
||
@Column(name = "CHARACTERISTIC") | ||
private String characteristic; | ||
|
||
@OneToMany(mappedBy = "PRODUCT_IMAGE") | ||
private List<ProductImage> productImages = new ArrayList<>(); | ||
|
||
@OneToMany(mappedBy = "GENDER") | ||
private List<Gender> genders = new ArrayList<>(); | ||
|
||
@OneToMany(mappedBy = "AGE") | ||
private List<Age> ages = new ArrayList<>(); | ||
|
||
@OneToMany(mappedBy = "range") | ||
private List<Range> ranges = new ArrayList<>(); | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/com/backend/soullive_a/entity/ProductImage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
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_ID") | ||
private Long id; | ||
|
||
@Column(name = "PRODUCT_IMAGE") | ||
private String productImage; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
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") | ||
private Long id; | ||
|
||
@Column(name = "RANGE") | ||
private String rangeType; | ||
} |