Skip to content

Commit

Permalink
[SL-12 CHORE] entity 기본값 수정 및 DB 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jinyoungpark00 committed Dec 24, 2023
1 parent d679d04 commit 41db44a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@ public class Answer {
private Application application;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String commonAnswer1;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String commonAnswer2;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String commonAnswer3;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String commonAnswer4;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String commonAnswer5;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String partAnswer1;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String partAnswer2;

@Column(length = 500)
@ColumnDefault("")
@ColumnDefault("''")
private String partAnswer3;

// 공동 답변 생성자
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,35 +37,35 @@ public class Application extends BaseTimeEntity {
private CommonQuestion generation; // generation이라고 매핑했지만 실제로는 CommonQuestion의 id를 가리킴

// application page 1 start
@ColumnDefault("")
@ColumnDefault("false")
private Boolean isAgreed;

@Column(length = 30)
@ColumnDefault("")
@ColumnDefault("''")
private String name;

@Column(length = 1)
@ColumnDefault("")
@ColumnDefault("''")
private String gender;

@ColumnDefault("0")
private Integer studentNum;

@Column(length = 30)
@ColumnDefault("")
@ColumnDefault("''")
private String major;

@Column(length = 30)
private String multiMajor;

@ColumnDefault("")
@ColumnDefault("''")
private String semester;

@ColumnDefault("")
@ColumnDefault("''")
private String phone;

@Column(length = 100)
@ColumnDefault("")
@ColumnDefault("''")
private String email;

@OneToMany(cascade = CascadeType.PERSIST, mappedBy = "applicationId") // application 저장 시, pathToKnows도 함께 저장
Expand All @@ -80,10 +80,10 @@ public class Application extends BaseTimeEntity {
// application page 1 end


@ColumnDefault("")
@ColumnDefault("''")
private String portfolio;

@ColumnDefault("")
@ColumnDefault("''")
private String interview;

@ColumnDefault("'N'")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,10 @@ public class Part {

@Column(length = 200)
private String typeOfTalent;

@Column(length = 500) // 이미지 URL 저장 필드 추가
private String imageUrl;

@Column(nullable = false)
private Long generation;
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public class PathToKnow {
private Application applicationId;

@Enumerated(EnumType.STRING)
@Column()
@ColumnDefault("")
@Column
private PathType pathType;

public enum PathType {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spring:

jpa:
hibernate:
ddl-auto: create
ddl-auto: update
properties:
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/log4jdbc.log4j2.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
log4jdbc.auto.load.popular.drivers=false
log4jdbc.drivers=com.mysql.cj.jdbc.Driver

0 comments on commit 41db44a

Please sign in to comment.