2025-12-10 19:12:54 +07:00
|
|
|
package ru.soune.nocopy.dto;
|
2025-12-10 02:37:31 +07:00
|
|
|
|
|
|
|
|
public enum MessageCode {
|
|
|
|
|
SUCCESS(0, "Operation successful"),
|
2026-03-27 17:31:06 +07:00
|
|
|
SUCCESS_MODERATION(0, "File moderated successfully"),
|
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"),
|
2026-02-06 21:22:47 +07:00
|
|
|
REFERRAL_LINK_IS_NOT_EXIST(1, "Refferal link is not exist"),
|
2026-03-25 15:55:16 +07:00
|
|
|
FILE_IS_BLOCKED(1, "File is blocked,deleted or removed"),
|
2025-12-10 19:12:54 +07:00
|
|
|
INVALID_FIELD(2, "Invalid field"),
|
2026-02-19 10:53:03 +07:00
|
|
|
MAIL_VERIFIED_NULL(2, "Mail verified null"),
|
2026-02-24 16:53:33 +07:00
|
|
|
INVALID_TOKEN(2, "Token not found or time expired"),
|
2026-01-20 15:12:24 +07:00
|
|
|
TOKEN_IS_ALIVE(2, "Token is alive"),
|
2025-12-17 22:31:30 +07:00
|
|
|
INVALID_ACTION(2, "Invalid action"),
|
|
|
|
|
FILE_UPLOAD_ERROR(2, "File upload error"),
|
2026-01-13 22:40:52 +07:00
|
|
|
DUPLICATE_FILE_UPLOAD(2, "Duplicate file upload"),
|
2025-12-26 12:22:40 +07:00
|
|
|
FILE_DOWNLOAD_ERROR(2, "File download error"),
|
2026-02-18 11:30:15 +07:00
|
|
|
FILE_NOT_EXIST(2, "File not exist on disk"),
|
|
|
|
|
FILE_DELETE(2, "File was deleted"),
|
2026-02-16 10:43:20 +07:00
|
|
|
USER_NOT_HAD_PERMISSION(2, "User not have permission for file"),
|
2026-01-20 15:12:24 +07:00
|
|
|
USER_NOT_VERIFIED(2, "User not verified"),
|
2026-04-06 14:51:00 +07:00
|
|
|
LAW_CASE_NOT_FOUND(4, "Law case not found"),
|
2026-02-04 14:56:19 +07:00
|
|
|
PERMISSION_NOT_FOUND(2, "Permission not found"),
|
2026-01-21 12:34:40 +07:00
|
|
|
USER_NOT_FOUND(2, "User not found"),
|
2025-12-30 02:19:07 +07:00
|
|
|
FILE_DOWNLOAD_ERROR_NOT_CORRECT_FIELD(2, "Not correct field"),
|
2026-02-16 10:43:20 +07:00
|
|
|
TOKEN_IS_NULL(2, "Token field is null"),
|
2025-12-22 14:07:44 +07:00
|
|
|
IMAGE_FOUND_ERROR(2, "Image found 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"),
|
2026-04-06 14:51:00 +07:00
|
|
|
USER_NOT_HAVE_TOKEN(2, "Not have tokens"),
|
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"),
|
2026-04-06 14:51:00 +07:00
|
|
|
NOT_VALID_FIELD(2, "Not valid field"),
|
2025-12-18 01:13:19 +07:00
|
|
|
ACCESS_DENIED(2, "Access denied"),
|
2026-04-27 12:21:26 +07:00
|
|
|
AUTH_EMAIL_NOT_FOUND(4, "Email not COMPLAINT_OR_LAW_CASE_IN_WORK"),
|
2025-12-11 13:00:01 +07:00
|
|
|
AUTH_EMAIL_OR_TOKEN_NOT_FOUND(4, "Email or Token not found "),
|
|
|
|
|
AUTH_TOKEN_MISMATCH(4, "Token mismatch"),
|
2026-01-05 16:26:46 +07:00
|
|
|
AUTH_TOKEN_NOT_FOUND(4, "Token not found"),
|
2025-12-17 22:31:30 +07:00
|
|
|
FILE_NOT_FOUND(4, "File not found"),
|
2026-01-23 16:09:51 +07:00
|
|
|
AUTH_PASSWORD_NOT_MATCHES(2, "Password does not match"),
|
2026-01-24 11:23:06 +07:00
|
|
|
SEND_EMAIL_EXCEPTION(2, "Send email exception"),
|
2026-01-28 21:18:42 +07:00
|
|
|
SIMILAR_FILES_FOUND(0, "Similar files found"),
|
|
|
|
|
FILE_IS_PROTECTED(0, "File is protected"),
|
2026-01-29 19:24:36 +07:00
|
|
|
FILE_IS_NOT_PROTECTED(0, "File is not protected"),
|
2026-02-02 15:00:18 +07:00
|
|
|
TARIFF_IS_ADD(0, "Tariff is added"),
|
|
|
|
|
TARIFF_IS_DELETED(0, "Tariff is deleted"),
|
|
|
|
|
TARIFF_IS_UPDATED(0, "Tariff is updated"),
|
|
|
|
|
TARIFF_IS_NOT_FOUND(0, "Tariff is not found"),
|
2026-01-29 19:24:36 +07:00
|
|
|
VALIDATION_ERROR(2, "Validation error"),
|
|
|
|
|
RESOURCE_NOT_FOUND(4, "Resource not found"),
|
2026-04-10 20:13:59 +07:00
|
|
|
OPERATION_NOT_FOUND(4, "Operation not found"),
|
2026-01-29 19:24:36 +07:00
|
|
|
INTERNAL_ERROR(4, "Internal server error"),
|
|
|
|
|
COMPANY_NOT_FOUND(4, "Company not found"),
|
2026-02-18 19:00:44 +07:00
|
|
|
PAYMENT_NOT_FOUND(4, "Payment not found"),
|
2026-02-02 15:47:58 +07:00
|
|
|
COMPANY_ALREADY_EXISTS(2, "Company already exists"),
|
2026-02-09 11:06:50 +07:00
|
|
|
USER_LIMIT_IS_OVER(2, "Over user limits"),
|
2026-03-05 12:11:09 +07:00
|
|
|
MONITORING_TYPE_NOT_FOUND(4, "Monitoring type not found"),
|
2026-02-17 20:17:34 +07:00
|
|
|
ERROR_TARIFF_INFO(2, "Erorr with tariff info"),
|
2026-03-03 11:38:22 +07:00
|
|
|
FILE_FOR_SEARCH_NOT_VALID(2, "File for search unsupported"),
|
2026-03-27 17:31:06 +07:00
|
|
|
ILLEGAL_STATE(2, "File is not in moderation state"),
|
2026-03-05 10:05:18 +07:00
|
|
|
NOT_VALID_FILE_TYPE_OR_COUNT_FILE(2, "Cost for file type not found, count is negative or files count" +
|
|
|
|
|
"more than max valid"),
|
2026-03-17 16:35:27 +07:00
|
|
|
USER_NOT_ACTIVE(2, "User not active"),
|
|
|
|
|
NOTION_NOT_FOUND(4, "Notion not found"),
|
2026-03-23 15:17:42 +07:00
|
|
|
NOT_FOUND(4, "Notion not found"),
|
2026-04-04 17:38:20 +07:00
|
|
|
MESSAGE_IS_REQUIRED_FOR_NOTION(4, "Message is required for notion"),
|
|
|
|
|
USER_VERIFICATIONS_NOT_FOUND(4, "Verifications not found"),
|
2026-04-27 12:21:26 +07:00
|
|
|
COMPLAINT_OR_LAW_CASE_IN_WORK(2, "Complaint or lawcase in work"),
|
2026-05-04 12:59:51 +07:00
|
|
|
NOT_VALID_STATUS(2, "Not valid status"),
|
2026-04-04 17:38:20 +07:00
|
|
|
ADMIN_USER_NOT_FOUND(4, "Verifications ,user or admin not found");
|
2025-12-10 02:37:31 +07:00
|
|
|
|
2026-04-27 12:21:26 +07:00
|
|
|
|
2025-12-10 02:37:31 +07:00
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|