-
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.
[feat] 모델, 모델소개, 및 하위 3개 테이블 엔티티 작성 (#15)
* feat : #11 Model 도메인 생성 * feat : #11-모델소개 테이블 및 하위 테이블 3개 엔티티 생성 * feat :#11-model 테이블 컬럼 추가 * fix : manyToOne 지연로딩 설정, 기본키 컬럼명 id로 통일 * feat : #11 - model 테이블 ai점수 컬럼 추가 * feat : #11 nullable 속성 일괄 적용 * fix #11 : Column -> joinColumn 매핑 오류 수정
- Loading branch information
Showing
5 changed files
with
136 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,36 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Model { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "MODEL_ID", nullable = false) | ||
private Long id; | ||
|
||
@Column(name = "MODEL_NAME", nullable = false) | ||
private String modelName; | ||
|
||
@Column(name = "BIRTH", nullable = false) | ||
private LocalDateTime birth; | ||
|
||
@Column(name = "JOB", nullable = false) | ||
private String job; | ||
|
||
@Column(name = "INFO", nullable = false) | ||
private String info; | ||
|
||
@Column(name = "AGENCY", nullable = false) | ||
private String agency; | ||
|
||
@Column(name = "AI_RATE", nullable = false) | ||
private Float aiRate; | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/com/backend/soullive_a/entity/ModelImageKeyword.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,25 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
|
||
public class ModelImageKeyword { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "MODEL_IMAGE_KEYWORD_ID", nullable = false) | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "MODEL_ID", nullable = false) | ||
private Model model; | ||
|
||
@Column(name = "KEYWORD", nullable = false) | ||
private String keyword; | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/backend/soullive_a/entity/ModelIntroduction.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,17 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class ModelIntroduction { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@OneToOne | ||
@JoinColumn(name = "MODEL_ID", nullable = false) //식별 관계 | ||
private Model model; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/com/backend/soullive_a/entity/ModelRecentAdvertisement.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,20 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class ModelRecentAdvertisement { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "MODEL_RECENT_ADVERTISEMENT_ID", nullable = false) | ||
private Long id; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "MODEL_ID", nullable = false) | ||
private Model model; | ||
} |
38 changes: 38 additions & 0 deletions
38
src/main/java/com/backend/soullive_a/entity/ModelRecentWork.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,38 @@ | ||
package com.backend.soullive_a.entity; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Entity | ||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class ModelRecentWork { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "MODEL_RECENT_WORK_ID", nullable = false) | ||
private Long id; | ||
|
||
@Column(name = "YEAR", nullable = false) | ||
private Integer year; | ||
|
||
@Column(name = "CATEGORY", nullable = false) | ||
private String category; | ||
|
||
@Column(name = "TITLE", nullable = false) | ||
private String title; | ||
|
||
@Column(name = "GENRE", nullable = false) | ||
private String genre; | ||
|
||
@Column(name = "ROLE", nullable = false) | ||
private String role; | ||
|
||
@Column(name = "IS_MAIN_ACTOR", nullable = false) | ||
private Boolean isMainActor; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "MODEL_ID", nullable = false) | ||
private Model model; | ||
} |