@@ -48,6 +48,7 @@ public enum MessageCode {
|
||||
TARIFF_IS_NOT_FOUND(0, "Tariff is not found"),
|
||||
VALIDATION_ERROR(2, "Validation error"),
|
||||
RESOURCE_NOT_FOUND(4, "Resource not found"),
|
||||
OPERATION_NOT_FOUND(4, "Operation not found"),
|
||||
INTERNAL_ERROR(4, "Internal server error"),
|
||||
COMPANY_NOT_FOUND(4, "Company not found"),
|
||||
PAYMENT_NOT_FOUND(4, "Payment not found"),
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package ru.soune.nocopy.dto.tokenoperation;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import ru.soune.nocopy.entity.tokenoperation.TokenOperation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class TokenOperationPageDto {
|
||||
|
||||
@JsonProperty("content")
|
||||
private List<TokenOperation> content;
|
||||
|
||||
@JsonProperty("page_number")
|
||||
private int pageNumber;
|
||||
|
||||
@JsonProperty("page_size")
|
||||
private int pageSize;
|
||||
|
||||
@JsonProperty("total_elements")
|
||||
private long totalElements;
|
||||
|
||||
@JsonProperty("total_pages")
|
||||
private int totalPages;
|
||||
|
||||
@JsonProperty("is_last")
|
||||
private boolean last;
|
||||
|
||||
@JsonProperty("is_first")
|
||||
private boolean first;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package ru.soune.nocopy.dto.tokenoperation;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import ru.soune.nocopy.entity.tokenoperation.OperationType;
|
||||
|
||||
@Data
|
||||
public class TokenOperationRequest {
|
||||
|
||||
@JsonProperty("action")
|
||||
private String action;
|
||||
|
||||
@JsonProperty("token")
|
||||
private String token;
|
||||
|
||||
@JsonProperty("operation_id")
|
||||
private Long operationId;
|
||||
|
||||
@JsonProperty("operation_type")
|
||||
private OperationType operationType;
|
||||
|
||||
@JsonProperty("spent")
|
||||
private Long spent;
|
||||
|
||||
@JsonProperty("page")
|
||||
private Integer page = 0;
|
||||
|
||||
@JsonProperty("size")
|
||||
private Integer size = 20;
|
||||
|
||||
@JsonProperty("sort_by")
|
||||
private String sortBy = "createdAt";
|
||||
|
||||
@JsonProperty("sort_direction")
|
||||
private String sortDirection = "desc";
|
||||
|
||||
@JsonProperty("min_spent")
|
||||
private Long minSpent;
|
||||
|
||||
@JsonProperty("max_spent")
|
||||
private Long maxSpent;
|
||||
|
||||
@JsonProperty("updates")
|
||||
private Object updates;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package ru.soune.nocopy.dto.tokenoperation;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
public class TokenOperationResponse {
|
||||
|
||||
@JsonProperty("success")
|
||||
private Boolean success;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
|
||||
@JsonProperty("data")
|
||||
private Object data;
|
||||
|
||||
@JsonProperty("total_elements")
|
||||
private Long totalElements;
|
||||
|
||||
@JsonProperty("total_pages")
|
||||
private Integer totalPages;
|
||||
|
||||
@JsonProperty("current_page")
|
||||
private Integer currentPage;
|
||||
|
||||
@JsonProperty("page_size")
|
||||
private Integer pageSize;
|
||||
|
||||
@JsonProperty("statistics")
|
||||
private Map<String, Object> statistics;
|
||||
}
|
||||
Reference in New Issue
Block a user