Skip to content

Commit

Permalink
MODIFY : 리뷰 내용 수정 반영
Browse files Browse the repository at this point in the history
- 놓친 `@Enumerated` & Enum 값 작성 추가
- 도메인 속성에 따른 수정
- `java.time.LocalDate` <-> `java.sql.Date` Converter 제거
  • Loading branch information
yummygyudon committed May 23, 2024
1 parent dcc144d commit 8f484d9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 35 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
package org.sopt.makers.operation.user.domain;

public enum Part {

PLAN,
DESIGN,
WEB,
ANDROID,
IOS,
SERVER

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@

public enum Team {
OPERATION,
MEDIA,
MAKERS
MEDIA
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import jakarta.persistence.Column;
import jakarta.persistence.Enumerated;
import jakarta.persistence.EnumType;
import jakarta.persistence.Convert;

import java.time.LocalDate;

Expand All @@ -19,7 +18,6 @@
import lombok.AccessLevel;

import org.sopt.makers.operation.common.domain.BaseEntity;
import org.sopt.makers.operation.user.util.LocalDateConverter;

@Entity @Getter
@Table(name = "users")
Expand All @@ -45,7 +43,6 @@ public class User extends BaseEntity {
private String name;

@Column(name = "birthday")
@Convert(converter = LocalDateConverter.class)
private LocalDate birthday;

@Builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class UserGenerationHistory {
private Long userId;

@Column(name = "generation", nullable = false)
private Integer integer;
private int generation;

@Column(name = "part")
@Enumerated(value = EnumType.STRING)
Expand All @@ -44,9 +44,9 @@ public class UserGenerationHistory {
private Position position;

@Builder
public UserGenerationHistory(Long userId, Integer integer, Part part, Team team, Position position) {
public UserGenerationHistory(Long userId, int generation, Part part, Team team, Position position) {
this.userId = userId;
this.integer = integer;
this.generation = generation;
this.part = part;
this.team = team;
this.position = position;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import jakarta.persistence.Entity;
import jakarta.persistence.Table;
import jakarta.persistence.Column;
import jakarta.persistence.Enumerated;
import jakarta.persistence.EnumType;

import lombok.Getter;
import lombok.Builder;
Expand All @@ -29,13 +31,14 @@ public class UserRegisterInfo {
@Column(name = "email")
private String email;

@Column(name = "generation")
private Integer generation;
@Column(name = "generation", nullable = false)
private int generation;

@Column(name = "phone")
private String phone;

@Column(name = "part")
@Enumerated(value = EnumType.STRING)
private Part part;

@Builder
Expand Down

This file was deleted.

0 comments on commit 8f484d9

Please sign in to comment.