NCBACK-9 add Validator,Add new enums with codes
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2025-12-10 02:37:31 +07:00
parent 92d0cbbf3b
commit c2ffe08e7d
11 changed files with 327 additions and 27 deletions
@@ -0,0 +1,37 @@
package ru.soune.no_copy.dto;
public enum MessageCode {
SUCCESS(0, "Operation successful"),
REG_EMAIL_EXISTS(2001, "Email already registered"),
INVALID_FIELD(2002, "Invalid field"),
MSG_ID_NOT_FOUND(2004, "Message id not found"),
REGISTER_SUCCESS(10002, "Register success"),
BAD_REQUEST(400, "Bad request"),
UNAUTHORIZED(403, "Unauthorized"),
FORBIDDEN(402, "Forbidden"),
NOT_FOUND(404, "Not found"),
INTERNAL_ERROR(500, "Internal server error"),
AUTH_INVALID_CREDENTIALS(101, "Invalid credentials"),
AUTH_EMAIL_NOT_CONFIRMED(103, "Email not confirmed");
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;
}
}