/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.xrtygis.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.haiqiu.tools.excel.annotation.Excel;
import com.tofly.mybatisplus.config.ToflySqlCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 指标配置
 *
 * @author admin
 * @date Fri Mar 11 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_INDEX_ALLOCATION", resultMap = "tfIndexAllocationMap")
@KeySequence("TF_INDEX_ALLOCATION")
@ApiModel
public class TfIndexAllocation extends Model<TfIndexAllocation> {
    private static final long serialVersionUID = 1L;
    /**
     * $column.comments
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "ID", type = IdType.INPUT)
    @ApiModelProperty(value = "$column.comments")
    private Long id;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String describe;
    /**
     * $column.comments
     */
    @ApiModelProperty(value = "$创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String createUserName;
    /**
     * $column.comments
     */
    @ApiModelProperty(value = "$column.comments")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 所属设备ID
     */
    @ApiModelProperty(value = "所属设备ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deviceId;
    @ApiModelProperty(value = "所属设备名称")
    @TableField(exist = false)
    @Excel(name = "所属设备")
    private String deviceName;
    /**
     * 设备类型（1出口,2入口,3加药）
     */
    @ApiModelProperty(value = "设备类型（1出口,2入口,3加药）")
    private String model;
    /**
     * 设备类型转义（1出口,2入口,3加药）
     */
    @ApiModelProperty(value = "设备类型转义（1出口,2入口,3加药）")
    @TableField(exist = false)
    @Excel(name = "类型")
    private String modelName;
    /**
     * 变量编码
     */
    @ApiModelProperty(value = "变量编码")
    @TableField(condition=ToflySqlCondition.LIKE)
    @Excel(name = "指标编码")
    private String variableCode;
    /**
     * 变量名称
     */
    @ApiModelProperty(value = "变量名称")
    @TableField(condition = ToflySqlCondition.LIKE)
    @Excel(name = "变量名称")
    private String variableName;
    /**
     * 显示名称
     */
    @ApiModelProperty(value = "显示名称")
    @TableField(condition = ToflySqlCondition.LIKE)
    @Excel(name = "指标名称")
    private String displayName;
    /**
     * 单位
     */
    @ApiModelProperty(value = "单位")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String unit;
    /**
     * 报警上限
     */
    @ApiModelProperty(value = "报警上限")
    private Double alarmUpperLimit;
    /**
     * 报警下限
     */
    @ApiModelProperty(value = "报警下限")
    private Double alarmLowerLimit;
    /**
     * 是否报警（0未报警,1已报警）
     */
    @ApiModelProperty(value = "是否报警（0未报警,1已报警）")
    private String isAlarm;
    /**
     * 是否报警转义（0未报警,1已报警）
     */
    @ApiModelProperty(value = "是否报警转义（0未报警,1已报警）")
    @TableField(exist = false)
    @Excel(name = "是否报警")
    private String isAlarmName;
    /**
     * 排序号
     */
    @ApiModelProperty(value = "排序号")
    private Long sortNumber;
    /**
     * 精度
     */
    @ApiModelProperty(value = "精度")
    private Long accuracy;
    /**
     * 设备档案编号
     */
    @ApiModelProperty(value = "设备档案编号")
    private String archivesCode;


    /**
     * 指标归属(字典码表关联 例如:01 瞬时流量)
     */
    @ApiModelProperty(value = "指标归属(字典码表关联 例如:01 瞬时流量)")
    private String type;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @Excel(name = "指标类型")
    private String typeName;

    /**
     * 绑定报警类型ID(多个英文逗号,号隔开)
     */
    @ApiModelProperty(value = "绑定报警类型ID(多个英文逗号,号隔开)")
    private String reportId;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @Excel(name = "报警等级")
    private String reportLevel;

    /**
     * 是否展示（0否1是）
     */
    @ApiModelProperty(value = "是否展示（0否1是）")
    private Short isDisplay;
    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    @Excel(name = "是否显示")
    private String isDisplayName;

}
