dev add rest for company, add link for users , update reg users
Test Workflow / test (push) Successful in 2s

This commit is contained in:
vladp
2026-01-29 19:24:36 +07:00
parent 96acf796b2
commit 6ee7ab4d04
19 changed files with 776 additions and 24 deletions
@@ -29,7 +29,12 @@ public enum MessageCode {
SEND_EMAIL_EXCEPTION(2, "Send email exception"),
SIMILAR_FILES_FOUND(0, "Similar files found"),
FILE_IS_PROTECTED(0, "File is protected"),
FILE_IS_NOT_PROTECTED(0, "File is not protected");
FILE_IS_NOT_PROTECTED(0, "File is not protected"),
VALIDATION_ERROR(2, "Validation error"),
RESOURCE_NOT_FOUND(4, "Resource not found"),
INTERNAL_ERROR(4, "Internal server error"),
COMPANY_NOT_FOUND(4, "Company not found"),
COMPANY_ALREADY_EXISTS(2, "Company already exists");
private final Integer code;
@@ -0,0 +1,23 @@
package ru.soune.nocopy.dto.company;
import lombok.Data;
import java.util.Map;
@Data
public class CompanyActionRequestDto {
private String action;
private String companyId;
private String companyName;
private Map<String, Object> companyData;
private Long userId;
private Map<String, Object> searchParams;
private PageableParams pageable;
@Data
public static class PageableParams {
private int page;
private int size;
private String sort;
private String direction;
}
}
@@ -0,0 +1,16 @@
package ru.soune.nocopy.dto.company;
import lombok.Data;
import java.time.LocalDateTime;
@Data
public class CompanyResponseDto {
private String id;
private String companyName;
private String phone;
private String address;
private String email;
private LocalDateTime registerDate;
private LocalDateTime updateDate;
private long userCount;
}
@@ -0,0 +1,5 @@
package ru.soune.nocopy.dto.register;
public enum AccountType {
B2B, B2C
}
@@ -13,6 +13,9 @@ public class RegRequest {
private String companyName;
@NotEmpty(message = "Need account type")
private String accountType;
@Size(min = 11, max = 14, message = "Phone must be 11-14 digits")
private String phone;