package com.cyksj.model.request;

import lombok.Data;

import javax.validation.constraints.*;

/**
 * 时间倍率配置请求参数
 */
@Data
public class TimeRateConfigReq {

    @NotBlank(message = "配置名称不能为空")
    @Size(min = 1, max = 100, message = "配置名称长度必须在1-100字符之间")
    private String name;

    @NotNull(message = "开始小时不能为空")
    @Min(value = 0, message = "开始小时必须在0-23之间")
    @Max(value = 23, message = "开始小时必须在0-23之间")
    private Integer startHour;

    @NotNull(message = "结束小时不能为空")
    @Min(value = 0, message = "结束小时必须在0-23之间")
    @Max(value = 23, message = "结束小时必须在0-23之间")
    private Integer endHour;

    @NotNull(message = "倍率系数不能为空")
    @DecimalMin(value = "0.001", message = "倍率系数必须在0.001-10.000之间")
    @DecimalMax(value = "10.000", message = "倍率系数必须在0.001-10.000之间")
    private Double multiplier;

    @Size(max = 200, message = "配置描述最多200个字符")
    private String description;

    private Boolean isActive = true;

    @Min(value = 0, message = "优先级必须大于等于0")
    private Integer priority = 0;
}