-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/#2-implement-login-using-oauth
- Loading branch information
Showing
13 changed files
with
185 additions
and
74 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
21 changes: 21 additions & 0 deletions
21
src/main/java/cotato/growingpain/log/domain/dto/ApplicationDetailDTO.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,21 @@ | ||
package cotato.growingpain.log.domain.dto; | ||
|
||
import cotato.growingpain.log.domain.entity.ApplicationDetail; | ||
import lombok.Builder; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Builder | ||
public record ApplicationDetailDTO( | ||
Long id, | ||
String title, | ||
String content | ||
) { | ||
public static ApplicationDetailDTO fromEntity(ApplicationDetail applicationDetail) { | ||
return ApplicationDetailDTO.builder() | ||
.id(applicationDetail.getId()) | ||
.title(applicationDetail.getTitle()) | ||
.content(applicationDetail.getContent()) | ||
.build(); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/cotato/growingpain/log/domain/dto/JobApplicationListRetrieveDTO.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,29 @@ | ||
package cotato.growingpain.log.domain.dto; | ||
|
||
import cotato.growingpain.log.domain.entity.JobApplication; | ||
import lombok.Builder; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Builder | ||
public record JobApplicationListRetrieveDTO( | ||
String applicationType, | ||
String status, | ||
String endDate | ||
) { | ||
public static JobApplicationListRetrieveDTO fromEntity(JobApplication jobApplication) { | ||
String status = jobApplication.getResult().toString(); | ||
|
||
if ("DOCUMENT".equals(jobApplication.getApplicationType().toString())) { | ||
status = jobApplication.getResult() != null ? jobApplication.getResult().toString() : null; | ||
} else if ("INTERVIEW".equals(jobApplication.getApplicationType().toString())) { | ||
status = jobApplication.getResult() != null ? jobApplication.getResult().toString() : null; | ||
} | ||
|
||
return JobApplicationListRetrieveDTO.builder() | ||
.applicationType(String.valueOf(jobApplication.getApplicationType())) | ||
.status(status) | ||
.endDate(jobApplication.getApplicationCloseDate()) | ||
.build(); | ||
} | ||
} |
35 changes: 23 additions & 12 deletions
35
src/main/java/cotato/growingpain/log/domain/dto/JobApplicationRetrieveDTO.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 |
---|---|---|
@@ -1,29 +1,40 @@ | ||
package cotato.growingpain.log.domain.dto; | ||
|
||
import cotato.growingpain.log.domain.entity.JobApplication; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Builder | ||
public record JobApplicationRetrieveDTO( | ||
Long id, | ||
String applicationType, | ||
String status, | ||
String endDate | ||
String place, | ||
String result, | ||
String submissionStatus, | ||
String resultStatus, | ||
String applicationStartDate, | ||
String applicationCloseDate, | ||
Long memberId, | ||
Long jobPostId, | ||
List<ApplicationDetailDTO> applicationDetails | ||
) { | ||
public static JobApplicationRetrieveDTO fromEntity(JobApplication jobApplication) { | ||
String status = jobApplication.getResult().toString(); | ||
|
||
if ("DOCUMENT".equals(jobApplication.getApplicationType().toString())) { | ||
status = jobApplication.getResult() != null ? jobApplication.getResult().toString() : null; | ||
} else if ("INTERVIEW".equals(jobApplication.getApplicationType().toString())) { | ||
status = jobApplication.getResult() != null ? jobApplication.getResult().toString() : null; | ||
} | ||
List<ApplicationDetailDTO> applicationDetailList = jobApplication.getApplicationDetails().stream() | ||
.map(ApplicationDetailDTO::fromEntity) | ||
.toList(); | ||
|
||
return JobApplicationRetrieveDTO.builder() | ||
.applicationType(String.valueOf(jobApplication.getApplicationType())) | ||
.status(status) | ||
.endDate(jobApplication.getApplicationCloseDate()) | ||
.id(jobApplication.getId()) | ||
.applicationType(jobApplication.getApplicationType().getDescription()) | ||
.place(jobApplication.getPlace()) | ||
.result(jobApplication.getResult().getDescription()) | ||
.submissionStatus(String.valueOf(jobApplication.isSubmissionStatus())) | ||
.resultStatus(String.valueOf(jobApplication.isResultStatus())) | ||
.applicationStartDate(jobApplication.getApplicationStartDate()) | ||
.applicationCloseDate(jobApplication.getApplicationCloseDate()) | ||
.applicationDetails(applicationDetailList) | ||
.build(); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/cotato/growingpain/log/domain/dto/JobPostListRetrieveDTO.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,26 @@ | ||
package cotato.growingpain.log.domain.dto; | ||
|
||
import cotato.growingpain.log.domain.entity.JobPost; | ||
import java.util.List; | ||
import lombok.Builder; | ||
import lombok.extern.slf4j.Slf4j; | ||
|
||
@Slf4j | ||
@Builder | ||
public record JobPostListRetrieveDTO( | ||
String companyName, | ||
String jobPart, | ||
List<JobApplicationListRetrieveDTO> jobApplications | ||
) { | ||
public static JobPostListRetrieveDTO fromEntity(JobPost jobPost) { | ||
List<JobApplicationListRetrieveDTO> jobApplicationList = jobPost.getJobApplications().stream() | ||
.map(JobApplicationListRetrieveDTO::fromEntity) | ||
.toList(); | ||
|
||
return JobPostListRetrieveDTO.builder() | ||
.companyName(jobPost.getCompanyName()) | ||
.jobPart(jobPost.getJobPart()) | ||
.jobApplications(jobApplicationList) | ||
.build(); | ||
} | ||
} |
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
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 |
---|---|---|
|
@@ -109,4 +109,5 @@ public void update(JobPostRequestDTO jobPostRequestDTO, JobApplicationRepository | |
} | ||
} | ||
} | ||
|
||
} |
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
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
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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
spring: | ||
profiles: | ||
active: local # dev: 개발 서버, local: 로컬 개발 | ||
active: dev # dev: 개발 서버, local: 로컬 개발 | ||
|
||
output: | ||
ansi: | ||
|
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 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<configuration> | ||
<!--Discord Log--> | ||
<springProperty name="DISCORD_WEBHOOK_URI" source="logging.discord.webhook-uri"/> | ||
<appender name="DISCORD" class="com.github.napstr.logback.DiscordAppender"> | ||
<webhookUri> | ||
${DISCORD_WEBHOOK_URI} | ||
</webhookUri> | ||
<layout class="ch.qos.logback.classic.PatternLayout"> | ||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %msg %n</pattern> | ||
</layout> | ||
<username>에러났댜ㅑㅑㅑㅑㅑㅑ</username> | ||
<avatarUrl> | ||
https://img.freepik.com/premium-photo/server-logs-analysis-closeup-developing-programming-and-coding-technologies-developer-working-on-web-sites-codes-in-office_372999-779.jpg | ||
</avatarUrl> | ||
<tts>false</tts> | ||
</appender> | ||
|
||
<!--Consol appender 설정--> | ||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<Pattern>%d %-5level %logger{35} - %msg%n</Pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="ASYNC_DISCORD" class="ch.qos.logback.classic.AsyncAppender"> | ||
<appender-ref ref="DISCORD"/> | ||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> | ||
<level>ERROR</level> | ||
</filter> | ||
</appender> | ||
|
||
<!--로그 레벨 지정--> | ||
<root level="INFO"> | ||
<appender-ref ref="Console"/> | ||
<appender-ref ref="ASYNC_DISCORD"/> | ||
</root> | ||
</configuration> |
Oops, something went wrong.