package com.zcxk.charge.api.vo;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zcxk.core.utils.jsonSerializer.BigDecimalJsonSerializer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @description
 * @author  wangli
 * @data 2021/1/5 14:42
 */
@Data
@Api("水质合格率")
public class SceneNormalRateVo implements Serializable {
    private static final long serialVersionUID = 5157922585449879952L;

    @ApiModelProperty("异常数量")
    private Integer abnormal;
    @ApiModelProperty("正常数量")
    private Integer normal;
    @ApiModelProperty("合格率")
    @JsonSerialize(using = BigDecimalJsonSerializer.class)
    private BigDecimal normalRate;
    @ApiModelProperty("名称")
    private String typeName;

    public SceneNormalRateVo(){
        this.abnormal = 0;
        this.normal = 0;
        this.normalRate = BigDecimal.ZERO;
    }

    public SceneNormalRateVo(String typeName){
        this.abnormal = 0;
        this.normal = 0;
        this.normalRate = BigDecimal.ZERO;
        this.typeName = typeName;
    }

}
