-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
οΏ½π :: (#857) μλ¦Ό λ©μΈμ§ μ€μ
- Loading branch information
Showing
2 changed files
with
76 additions
and
6 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
71 changes: 71 additions & 0 deletions
71
...s-infrastructure/src/main/java/team/retum/jobis/event/application/ApplicationMessage.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,71 @@ | ||
package team.retum.jobis.event.application; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import team.retum.jobis.domain.application.event.ApplicationsStatusChangedEvent; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public class ApplicationMessage { | ||
private final String title; | ||
private final String content; | ||
|
||
public static ApplicationMessage of(ApplicationsStatusChangedEvent event, String companyName) { | ||
String title; | ||
String content; | ||
|
||
switch (event.getStatus()) { | ||
case REQUESTED: | ||
title = "μ§μμ μ μΆ μλ£"; | ||
content = "μ§μμκ° μ μΆλμμ΅λλ€. κ²ν κ° μ§νλ μμ μ λλ€. μ‘°κΈλ§ κΈ°λ€λ € μ£ΌμΈμ!"; | ||
break; | ||
|
||
case APPROVED: | ||
title = "μ§μμκ° μΉμΈλμμ΅λλ€!"; | ||
content = "μ§μμκ° μΉμΈλμμ΄μ. 곧 νμ¬μ μ μ‘λ κ±°μμ!"; | ||
break; | ||
|
||
case SEND: | ||
title = "μ§μμ μ μ‘ μλ£"; | ||
content = "'" + companyName + "'μ μ§μμκ° μ±κ³΅μ μΌλ‘ μ μ‘λμμ΅λλ€. μ’μ κ²°κ³Όλ₯Ό κΈ°μν©λλ€!"; | ||
break; | ||
|
||
case PROCESSING: | ||
title = "μ§μμκ° μ§νμ€μ λλ€"; | ||
content = "'" + companyName + "'μμ μ§μμλ₯Ό κ²ν μ€μ λλ€. μ§ν μν©μ κ³μ νμΈν΄ μ£ΌμΈμ."; | ||
break; | ||
|
||
case FAILED: | ||
title = companyName + "μ§μμ νλ½"; | ||
content = "μμ½κ²λ '" + companyName + "'μ μ§μμμ νλ½νμ ¨μ΅λλ€. λ€μ κΈ°νμ λ μ’μ κ²°κ³Όκ° μκΈΈ λ°λλλ€."; | ||
break; | ||
|
||
case PASS: | ||
title = "(μ·¨λ½) " + companyName + "μ ν©κ²©νμ ¨μ΅λλ€!! π₯³"; | ||
content = "ν©κ²©μ μ§μ¬μΌλ‘ μΆνλ립λλ€."; | ||
break; | ||
|
||
case FIELD_TRAIN: | ||
title = "νμ₯μ€μ΅μ΄ νμ λμμ΅λλ€!"; | ||
content = "'" + companyName + "'μμ νμ₯μ€μ΅μ΄ νμ λμμ΅λλ€. μλ‘μ΄ κ²½νμ ν΅ν΄ μ±μ₯νμκΈΈ λ°λλλ€!"; | ||
break; | ||
|
||
case ACCEPTANCE: | ||
title = "κ·Όλ‘κ³μ½μ΄ 체결λμμ΅λλ€!"; | ||
content = "'" + companyName + "'κ³Όμ κ·Όλ‘κ³μ½μ΄ 체결λμμ΅λλ€. μλ‘μ΄ μ¬μ μ μμν©λλ€!"; | ||
break; | ||
|
||
case REJECTED: | ||
title = "μ§μμκ° λ°λ €λμμ΅λλ€."; | ||
content = "μ§μμκ° '" + companyName + "'μ μν΄ λ°λ €λμμ΅λλ€. μ§μμ λ΄μ©μ λ€μ νμΈνκ³ μμ ν μ¬μ μΆν΄ μ£ΌμΈμ."; | ||
break; | ||
|
||
default: | ||
title = "μ§μμ μνκ° λ³κ²½λμμ΅λλ€"; | ||
content = "μ§μμ μνκ° " + event.getStatus().getName() + "μΌλ‘ λ³κ²½λμμ΅λλ€."; | ||
break; | ||
} | ||
|
||
return new ApplicationMessage(title, content); | ||
} | ||
} |