@@ -0,0 +1,49 @@
|
||||
package ru.soune.nocopy.dto.tarriff;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.validation.constraints.Min;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TariffRequest {
|
||||
private Long id;
|
||||
|
||||
@NotNull
|
||||
@NotBlank
|
||||
@JsonProperty("type")
|
||||
private String type;
|
||||
|
||||
@NotNull
|
||||
@NotBlank
|
||||
@JsonProperty("tariff_name")
|
||||
private String name;
|
||||
|
||||
@Min(value = 0, message = "Price cannot be negative")
|
||||
@JsonProperty("tariff_price")
|
||||
private double price;
|
||||
|
||||
@Min(value = 0, message = "Tokens must be at least 0")
|
||||
@JsonProperty("tariff_tokens")
|
||||
private int tokens;
|
||||
|
||||
@Min(value = 0, message = "Max files count must be at least 0")
|
||||
@JsonProperty("max_files")
|
||||
private int maxFilesCount;
|
||||
|
||||
@Min(value = 0, message = "Disk size must be at least 0")
|
||||
@JsonProperty("disk_size")
|
||||
private int diskSize;
|
||||
|
||||
@Min(value = 0, message = "Max users must be at least 0")
|
||||
@JsonProperty("max_users")
|
||||
private int maxUsers;
|
||||
|
||||
@JsonProperty("action")
|
||||
private String action;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package ru.soune.nocopy.dto.tarriff;
|
||||
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import ru.soune.nocopy.entity.tarif.Tariff;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class TariffResponse {
|
||||
private String tariffName;
|
||||
private String tariffType;
|
||||
}
|
||||
Reference in New Issue
Block a user