Files
no-copy/src/main/java/ru/soune/nocopy/dto/MessageCode.java
T

37 lines
1.1 KiB
Java
Raw Normal View History

2025-12-10 19:12:54 +07:00
package ru.soune.nocopy.dto;
public enum MessageCode {
SUCCESS(0, "Operation successful"),
2025-12-10 19:12:54 +07:00
REG_EMAIL_EXISTS(1, "Email already registered"),
2025-12-16 16:43:20 +07:00
REG_EMAIL_OR_PHONE_EXISTS(1, "Email or phone already registered"),
2025-12-10 19:12:54 +07:00
INVALID_FIELD(2, "Invalid field"),
2025-12-17 22:31:30 +07:00
INVALID_TOKEN(2, "Invalid token"),
INVALID_ACTION(2, "Invalid action"),
FILE_UPLOAD_ERROR(2, "File upload error"),
2025-12-10 19:25:45 +07:00
INVALID_JSON_BODY(2, "Invalid fields in JSON object"),
2025-12-17 22:31:30 +07:00
INCOMPLETE_UPLOAD(2, "Not load all chunks"),
2025-12-10 19:12:54 +07:00
MSG_ID_NOT_FOUND(4, "Message id not found"),
2025-12-18 01:13:19 +07:00
FILE_ENTITY_ERROR(2, "File entity error"),
ACCESS_DENIED(2, "Access denied"),
2025-12-10 19:12:54 +07:00
AUTH_EMAIL_NOT_FOUND(4, "Email not found"),
2025-12-17 22:31:30 +07:00
FILE_NOT_FOUND(4, "File not found"),
2025-12-10 19:12:54 +07:00
AUTH_PASSWORD_NOT_MATCHES(2, "Password does not match");
private final Integer code;
private final String description;
MessageCode(Integer code, String description) {
this.code = code;
this.description = description;
}
public Integer getCode() {
return code;
}
public String getDescription() {
return description;
}
}