package com.reyun.saas.mob.user.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value="WarningDataInfo",description="预警数据信息")
public class WarningDataInfo {

    @ApiModelProperty(value="主键ID")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty(value="日期")
    private String ds;

    @ApiModelProperty(value="预警配置的id")
    @Column(name = "config_id")
    private Long configId;

    @ApiModelProperty(value="触发预警时段")
    @Column(name = "time_frame")
    private String timeFrame;

    @ApiModelProperty(value="总量")
    @Column(name = "volume_dose")
    private Integer volumeDose;

    @ApiModelProperty(value="作弊总数(异常+潜在风险(风险只有Android有))")
    @Column(name = "volume_dose_exception_risk")
    private Integer volumeDoseExceptionRisk;

    @ApiModelProperty(value="作弊总数占比")
    @Column(name = "rate_volume_dose_exception_risk")
    private Double rateVolumeDoseExceptionRisk;

    @ApiModelProperty(value="潜在风险总数")
    @Column(name = "volume_dose_potential_risk")
    private Integer volumeDosePotentialRisk;

    @ApiModelProperty(value="正常总数")
    @Column(name = "volume_dose_normal")
    private Integer volumeDoseNormal;

    @ApiModelProperty(value="异常总数")
    @Column(name = "volume_dose_exception")
    private Integer volumeDoseException;

    @ApiModelProperty(value="异常总数占比")
    @Column(name = "rate_volume_dose_exception")
    private Double rateVolumeDoseException;

    @ApiModelProperty(value="新增总数")
    private Integer added;

    @ApiModelProperty(value="异常新增")
    @Column(name = "added_exception")
    private Integer addedException;

    @ApiModelProperty(value="异常新增占比")
    @Column(name = "rate_added_exception")
    private Double rateAddedException;

    @ApiModelProperty(value="活跃总数")
    private Integer dau;

    @ApiModelProperty(value="异常活跃")
    @Column(name = "dau_exception")
    private Integer dauException;

    @ApiModelProperty(value="异常活跃占比")
    @Column(name = "rate_dau_exception")
    private Double rateDauException;

    @ApiModelProperty(value="更新总数")
    private Integer updates;

    @ApiModelProperty(value="异常更新")
    @Column(name = "update_exception")
    private Integer updateException;

    @ApiModelProperty(value="异常更新占比")
    @Column(name = "rate_update_exception")
    private Double rateUpdateException;

    @ApiModelProperty(value="插入时间")
    @Column(name = "create_time")
    private String createTime;

    @ApiModelProperty(value="1已通知,0未通知")
    private Integer informed;

    @ApiModelProperty(value="执行时的当前hour")
    private Integer hour;

    @ApiModelProperty(value="预警阈值")
    @Transient
    private Integer warningLimit;
}
