package com.tofly.scada.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author haiqiu
 */
@Data
@TableName(value = "SCADA_HISTORY_SYN",resultMap = "scadaHisSynMap")
public class ScadaHistorySyn extends Model<ScadaHistorySyn> {
    @TableId(value = "ID", type = IdType.ASSIGN_UUID)
    @ApiModelProperty(value = "ID")
    private String id;

    @ApiModelProperty(value = "指标编码")
    private String code;

    @ApiModelProperty(value = "指标值")
    private String value;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "指标采集时间")
    private Date scadaTime;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "指标更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "状态0，未同步，1已同步，2同步失败")
    private Integer status=0;
}
