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;

    @JsonProperty("user_token")
    private String userToken;

    @JsonProperty("tariff_term")
    private String tariffTerm;
}