package cn.com.ctop.alarm.modules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * 指标字段记录表
 *
 * @author jeecg-boot
 * @version V1.0
 * @date 2020-10-29
 */
@Data
@TableName("ctop_alarm_metric_value")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ctop_alarm_metric_value对象", description = "指标字段记录表")
public class AlarmMetricValue {

    /**
     * 指标值编号
     */
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "指标值编号")
    private Integer metricValueId;
    /**
     * 父级编码
     */
    @Excel(name = "父级编码", width = 15)
    @ApiModelProperty(value = "父级编码")
    private Integer metricParentId;
    /**
     * 指标值名称
     */
    @Excel(name = "指标值名称", width = 15)
    @ApiModelProperty(value = "指标值名称")
    private String metricValueName;
    /**
     * 指标值编码
     */
    @Excel(name = "指标值编码", width = 15)
    @ApiModelProperty(value = "指标值编码")
    private String metricValueCode;
    //数据级别;1账户计划组可见，2账户计划可见，3账户可见
    private String metricValueLevel;

    private String msgValueType;

    private String msgValueUnit;

    private String msgTemplate;
    /**
     * createTime
     */
    @Excel(name = "createTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "createTime")
    private Date createTime;
    /**
     * updateTime
     */
    @Excel(name = "updateTime", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "updateTime")
    private Date updateTime;

    @TableField(exist = false)
    private List<AlarmMetricValue> childs;

}
