package com.lutao.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.lutao.annotate.Validation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@ApiModel(value = "阀状态监测信息表")
@EqualsAndHashCode(callSuper = true)
@TableName("valve_status_monitor")
public class ValveStatusMonitor extends Model<ValveStatusMonitor> {
    private static final long serialVersionUID = 5647913129893249136L;

    @ApiModelProperty(value = "ID")
    @TableId
    private Integer id;

    @ApiModelProperty(value = "原始ID")
    @Validation(message = "valve_status_monitor表{id}不能为空")
    private String originId;

    @ApiModelProperty(value = "应用ID")
    private String appId;

    @ApiModelProperty(value = "平台编码")
    @Validation(message = "valve_status_monitor表{platform_code}不能为空")
    private String platformCode;

    @ApiModelProperty(value = "设施名称")
    private String facilityName;

    @ApiModelProperty(value = "设施编码")
    private String facilityCode;

    @ApiModelProperty(value = "设备名称")
    private String equipName;

    @ApiModelProperty(value = "设备编码")
    private String equipCode;

    @ApiModelProperty(value = "阀状态: 0关断，1开启")
    @Validation(message = "valve_status_monitor表{valve_state}不能为空")
    private String valveState;

    @ApiModelProperty(value = "收集时间")
    @Validation(message = "valve_status_monitor表{collect_time}不能为空")
    private LocalDateTime collectTime;

    @ApiModelProperty(value = "创建日期")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "更新日期")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "更新人")
    private String updateBy;


    @ApiModelProperty(value = "数据收集时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
