Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: 과제 엔티티 필드 이름 수정 #416

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
import com.gdschongik.gdsc.domain.recruitment.domain.vo.Period;
import com.gdschongik.gdsc.domain.study.domain.vo.Assignment;
import com.gdschongik.gdsc.domain.study.domain.vo.Session;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down Expand Up @@ -43,5 +35,8 @@ public class StudyDetail extends BaseTimeEntity {
private Session session;

@Embedded
@AttributeOverride(name = "title", column = @Column(name = "assignment_title"))
@AttributeOverride(name = "isCancelled", column = @Column(name = "assignment_is_cancelled"))
@AttributeOverride(name = "difficulty", column = @Column(name = "assignment_difficulty"))
private Assignment assignment;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,25 @@
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Comment;

@Getter
@Embeddable
@EqualsAndHashCode
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Assignment {

// 과제 마감 시각
private LocalDateTime assignmentDueAt;
private String title;

private String assignmentTitle;
@Comment("과제 마감 시각")
private LocalDateTime deadline;

@Column(columnDefinition = "TEXT")
private String assignmentNotionLink;

// 과제 휴강 여부
private boolean isAssignmentCanceled;
private String descriptionLink;

@Enumerated(EnumType.STRING)
private Difficulty assignmentDifficulty;
private Difficulty difficulty;

@Comment("과제 휴강 여부")
private boolean isCancelled;
}