package com.cmvr.evaluation.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
@ApiModel("新增指标DTO")
public class AeIndicatorCreateDTO {

    @ApiModelProperty(value = "父级指标ID，一级指标为0", required = true)
    @NotNull(message = "父级指标ID不能为空")
    private Long parentId;

    @ApiModelProperty(value = "指标层级 1-一级 2-二级 3-三级", required = true)
    @NotNull(message = "指标层级不能为空")
    private Integer level;

    @ApiModelProperty(value = "指标名称", required = true)
    @NotBlank(message = "指标名称不能为空")
    private String name;

    @ApiModelProperty("比较数值1")
    @DecimalMin(value = "0.0", inclusive = true, message = "比较数值1不能小于0")
    @Digits(integer = 10, fraction = 2, message = "比较数值1整数位最多10位，小数位最多2位")
    private BigDecimal compareNum1;

    @ApiModelProperty("比较符号（=、>、<、>=、<=等）")
    private String symbol;

    @ApiModelProperty("比较数值2")
    @DecimalMin(value = "0.0", inclusive = true, message = "比较数值2不能小于0")
    @Digits(integer = 10, fraction = 2, message = "比较数值2整数位最多10位，小数位最多2位")
    private BigDecimal compareNum2;

    @ApiModelProperty("指标分数/满分")
    private BigDecimal score;

    @ApiModelProperty("指标权重")
    private BigDecimal weight;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("同层级排序")
    private Integer sort;

    @ApiModelProperty(value = "类型 0-语音 1-触控", required = true)
    @NotNull(message = "类型不能为空")
    private Integer type;
}