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
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "工况状态监测信息表")
@TableName("work_status_monitor")
public class WorkStatusMonitor extends Model<WorkStatusMonitor> {
    private static final long serialVersionUID = -8137481545904418051L;
    @ApiModelProperty(value = "ID")
    @TableId
    private Integer id;

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

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

    @ApiModelProperty(value = "平台编码")
    @Validation(message = "work_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 = "work_status_monitor表{work_status}不能为空")
    private String workStatus;

    @ApiModelProperty(value = "收集时间")
    @Validation(message = "work_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;
}
