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

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tofly.mybatisplus.config.ToflySqlCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.codehaus.jackson.map.ser.std.ToStringSerializer;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;


/**
 * 指标配置
 *
 * @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 = "$column.comments")
//    @TableField(value = "CREATE_USER",insertStrategy = FieldStrategy.IGNORED)
    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)
    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)
    private String modelName;
    /**
     * 变量编码
     */
    @ApiModelProperty(value = "变量编码")
    @TableField(condition=ToflySqlCondition.LIKE)
    private String variableCode;
    /**
     * 变量名称
     */
    @ApiModelProperty(value = "变量名称")
    @TableField(condition = ToflySqlCondition.LIKE)
    private String variableName;
    /**
     * 显示名称
     */
    @ApiModelProperty(value = "显示名称")
    @TableField(condition = ToflySqlCondition.LIKE)
    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)
    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)
    private String typeName;

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

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


    /**
     * 指标最大值
     */
    @ApiModelProperty(value = "指标最大值")
    private BigDecimal indexMax;

    /**
     * 水厂ID
     */
    @ApiModelProperty(value = "水厂ID")
    @TableField(exist = false)
    private Long waterId;
    @ApiModelProperty("厂站ID（多个）查询")
    @TableField(exist = false)
    private String stationIds;
    @ApiModelProperty("设备的水厂管网类型查询")
    @TableField(exist = false)
    private String pipeStationType;
}
