dev add tariffinfo endpoints
Test Workflow / test (push) Successful in 4s

This commit is contained in:
vladp
2026-02-02 15:47:58 +07:00
parent 3ce8edd7e1
commit c38b86e1b9
5 changed files with 382 additions and 2 deletions
@@ -38,7 +38,8 @@ public enum MessageCode {
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");
COMPANY_ALREADY_EXISTS(2, "Company already exists"),
ERROR_TARIFF_INFO(2, "Erorr with tariff info");
private final Integer code;
@@ -0,0 +1,35 @@
package ru.soune.nocopy.dto.tarriff;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TariffInfoRequest {
private String id;
@NotNull(message = "Action is required")
@JsonProperty("action")
private String action;
@JsonProperty("status")
private String status;
@JsonProperty("start_tariff")
private LocalDateTime startTariff;
@JsonProperty("end_tariff")
private LocalDateTime endTariff;
@JsonProperty("tariff_id")
private Long tariffId;
@JsonProperty("tariff_type")
private String tariffType;
}
@@ -0,0 +1,33 @@
package ru.soune.nocopy.dto.tarriff;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class TariffInfoResponse {
@JsonProperty("id")
private String id;
@JsonProperty("status")
private String status;
@JsonProperty("start_tariff")
private LocalDateTime startTariff;
@JsonProperty("end_tariff")
private LocalDateTime endTariff;
@JsonProperty("tariff_id")
private Long tariffId;
@JsonProperty("tariff_name")
private String tariffName;
}