Skip to content

Commit b45b2e7

Browse files
garusitellHwuanPage
authored andcommitted
feat : ParticipantError 입니다.
1 parent 008272a commit b45b2e7

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package sevenstar.marineleisure.meeting.error;
2+
3+
import org.springframework.http.HttpStatus;
4+
5+
import sevenstar.marineleisure.global.exception.enums.ErrorCode;
6+
7+
public enum ParticipantError implements ErrorCode {
8+
PARTICIPANT_NOT_FOUND(2404, HttpStatus.NOT_FOUND, "Participant not found"),
9+
PARTICIPANT_NOT_EXIST(2404, HttpStatus.NOT_FOUND, "Participant not exist"),
10+
PARTICIPANT_ERROR_COUNT(2409,HttpStatus.CONFLICT, "Participant error count"),
11+
ALREADY_PARTICIPATING(2409,HttpStatus.CONFLICT, "Alrealdy participating"),;
12+
13+
private final int code;
14+
private final HttpStatus httpStatus;
15+
private final String message;
16+
17+
ParticipantError(int code , HttpStatus httpStatus, String meesage){
18+
this.code = code;
19+
this.httpStatus = httpStatus;
20+
this.message = meesage;
21+
}
22+
23+
@Override
24+
public int getCode() {
25+
return code;
26+
}
27+
28+
@Override
29+
public HttpStatus getHttpStatus() {
30+
return httpStatus;
31+
}
32+
33+
@Override
34+
public String getMessage() {
35+
return message;
36+
}
37+
}

0 commit comments

Comments
 (0)