package com.nantian.cloud.dbcapp.carbon.domain.ent;

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 java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 计量器具信息
 * </p>
 *
 * @author wujing
 * @since 2022-09-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("instrument_info")
@ApiModel(value = "InstrumentInfo对象", description = "计量器具信息")
public class InstrumentInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "ID",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "计量器具编号")
    @TableField("CODE")
    private String code;

    @ApiModelProperty(value = "名称")
    @TableField("NAME")
    private String name;

    @ApiModelProperty(value = "型号")
    @TableField("MODEL")
    private String model;

    @ApiModelProperty(value = "准确度等级")
    @TableField("GRADE")
    private String grade;

    @ApiModelProperty(value = "测量范围")
    @TableField("RANGE")
    private String range;

    @ApiModelProperty(value = "生产厂家")
    @TableField("MANUFACTURER")
    private String manufacturer;

    @ApiModelProperty(value = "安装使用地点")
    @TableField("ADDRESS")
    private String address;

    @ApiModelProperty(value = "检定单位")
    @TableField("VERIFY_UNIT")
    private String verifyUnit;

    @ApiModelProperty(value = "检定日期")
    @TableField("VERIFY_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date verifyDate;

    @ApiModelProperty(value = "有效期至")
    @TableField("VALIDATE_DATE")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date validateDate;

    @ApiModelProperty(value = "计量器具层级")
    @TableField("LEVEL")
    private Long level;

    @TableField(exist = false)
    private String levelName;


    @ApiModelProperty(value = "计量器具类别")
    @TableField("CATEGORY")
    private Long category;

    @TableField(exist = false)
    private String categoryName;

//    @ApiModelProperty(value = "创建时间")
//    @TableField("CREATE_DATE")
//    private Date createDate;
//
//    @ApiModelProperty(value = "更新时间")
//    @TableField("UPDATE_DATE")
//    private Date updateDate;

    @TableField("ENT_ID")
    private String entId;

    @ApiModelProperty(value = "测量频次")
    @TableField("FRE_MESSURE")
    private String freMessure;

    @ApiModelProperty(value = "记录频次")
    @TableField("FRE_RECORD")
    private String freRecord;

    @ApiModelProperty(value = "规定设备校准频次")
    @TableField("FRE_TARGET")
    private String freTarget;

    @ApiModelProperty(value = "状态：0停用1启用")
    @TableField("STATUS")
    private Integer status;

    @TableField(exist = false)
    private String statusName;

    @ApiModelProperty(value = "备注")
    @TableField("REMARK")
    private String remark;

    @ApiModelProperty(value = "检定周期")
    @TableField("CHECKDAY")
    private Integer checkDay;


    @ApiModelProperty(value = "企业信用代码")
    @TableField(exist = false)
    private String entCode;



    public static final String ID = "ID";

    public static final String CODE = "CODE";

    public static final String NAME = "NAME";

    public static final String MODEL = "MODEL";

    public static final String GRADE = "GRADE";

    public static final String RANGE = "RANGE";

    public static final String MANUFACTURER = "MANUFACTURER";

    public static final String ADDRESS = "ADDRESS";

    public static final String VERIFY_UNIT = "VERIFY_UNIT";

    public static final String VERIFY_DATE = "VERIFY_DATE";

    public static final String VALIDATE_DATE = "VALIDATE_DATE";

    public static final String CREATE_DATE = "CREATE_DATE";

    public static final String UPDATE_DATE = "UPDATE_DATE";

    public static final String LEVEL = "level";

    public static final String CATEGORY = "category";

    public static final String CHECKDAY = "CHECKDAY";

}
