Skip to content

Commit

Permalink
Merge pull request #26 from depromeet/feature/#24
Browse files Browse the repository at this point in the history
Feature/#24 2차 MVP 인터페이스 설계
  • Loading branch information
JeongSangByuk authored Jul 30, 2024
2 parents 4e9991b + c6359f5 commit 4152997
Show file tree
Hide file tree
Showing 13 changed files with 703 additions and 43 deletions.
15 changes: 15 additions & 0 deletions src/main/java/com/server/bbo_gak/domain/card/entity/Card.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
package com.server.bbo_gak.domain.card.entity;

import com.server.bbo_gak.domain.recruit.entity.Recruit;
import com.server.bbo_gak.global.common.BaseEntity;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
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.OneToMany;
import jakarta.persistence.OneToOne;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -40,6 +45,8 @@ public class Card extends BaseEntity {

private Long userId;

private boolean copyFlag = false;

@Enumerated(EnumType.STRING)
private CardType cardType;

Expand All @@ -49,6 +56,14 @@ public class Card extends BaseEntity {
@OneToMany(mappedBy = "card", cascade = CascadeType.REMOVE, orphanRemoval = true)
private List<CardImage> cardImageList = new ArrayList<>();

@OneToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "copy_info_id")
private CopyInfo copyInfo;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "recruit_id")
private Recruit recruit;

@Builder
public Card(String title, String content, LocalDateTime accessTime, CardType cardType, Long userId) {
this.title = title;
Expand Down
36 changes: 36 additions & 0 deletions src/main/java/com/server/bbo_gak/domain/card/entity/CardMemo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.server.bbo_gak.domain.card.entity;

import com.server.bbo_gak.global.common.BaseEntity;
import jakarta.persistence.Column;
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 lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class CardMemo extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "card_memo_id")
private Long id;

private String content;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "card_id")
private Card card;

public CardMemo(String content, Card card) {
this.content = content;
this.card = card;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ public enum CardType {

EXPERIENCE("경험_정리"),
PERSONAL_STATEMENT("자기소개서"),
INTERVIEW_QUESTION("면접_질문");
INTERVIEW_QUESTION("면접_질문"),
DOCUMENT_PREPARING("서류_준비"),
ASSIGNMENT_PREPARING("과제_준비"),
INTERVIEW_PREPARING("인터뷰_준비");

private final String value;

Expand Down
28 changes: 28 additions & 0 deletions src/main/java/com/server/bbo_gak/domain/card/entity/CopyInfo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package com.server.bbo_gak.domain.card.entity;

import com.server.bbo_gak.global.common.BaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class CopyInfo extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "copy_info_id")
private Long id;

private Long parentCardId;

public CopyInfo(Long parentCardId) {
this.parentCardId = parentCardId;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.server.bbo_gak.domain.card.service;

import com.server.bbo_gak.domain.user.entity.User;

public interface CardMemoService {

void createCardMemo();

void updateCardMemo();

void deleteCardMemo();

void getCardMemoList(User user, Long cardId);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package com.server.bbo_gak.domain.recruit.entity;

import com.server.bbo_gak.domain.card.entity.Card;
import com.server.bbo_gak.global.common.BaseEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.OneToMany;
import java.util.ArrayList;
import java.util.List;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Recruit extends BaseEntity {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "recruit_id")
private Long id;

private String title;

private String season;

private String siteUrl;

@Enumerated(EnumType.STRING)
private RecruitStatus recruitStatus;

@OneToMany(mappedBy = "recruit")
private List<Card> cardList = new ArrayList<>();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package com.server.bbo_gak.domain.recruit.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
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 java.time.LocalDate;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class RecruitSchedule {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "recruit_schedule_id")
private Long id;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "recruit_id")
private Recruit recruit;

@Enumerated(EnumType.STRING)
private RecruitStage recruitStage;

private LocalDate deadLine;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.server.bbo_gak.domain.recruit.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RecruitStage {

FIRST_INTERVIEW("1차 면접"),
SECOND_INTERVIEW("2차 면접"),
THIRD_INTERVIEW("3차 면접"),
FINAL_INTERVIEW("최종 면접");

private final String Value;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.server.bbo_gak.domain.recruit.entity;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RecruitStatus {

PREPARATION_IN_PROGRESS("지원 준비 중"),
APPLICATION_COMPLETED("지원 완료"),
DOCUMENT_PASSED("서류 통과"),
INTERVIEW_PASSED("면접 통과"),
FINAL_ACCEPTANCE("최종 합격"),
REJECTED("불합격");


private final String value;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.server.bbo_gak.domain.recruit.service;

public interface RecruitScheduleService {

void createRecruitSchedule();

void getRecruitScheduleList();

void updateRecruitSchedule();

void deleteRecruitSchedule();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.server.bbo_gak.domain.recruit.service;

import com.server.bbo_gak.domain.card.entity.CardType;
import com.server.bbo_gak.domain.user.entity.User;

public interface RecruitService {

void getTotalRecruitList(); //생성순 정렬

void getProgressRecruitList();

void createRecruit();

void deleteRecruit();

void updateRecruit();

void getRecruitDetail();

void getCardListInRecruit(User user, Long recruitId, CardType type);

void getCardTypeCountsInRecruit(User user, Long recruitId);

void copyMyInfoCardToRecruit(User user, Long CardId, Long recruitId);
}
Loading

0 comments on commit 4152997

Please sign in to comment.