package com.tofly.water.entity.dto;


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

import java.util.*;

import org.springframework.web.multipart.MultipartFile;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

import lombok.EqualsAndHashCode;

import javax.validation.constraints.*;

/**
 * 记录设备运行时长状态(ScadaStatusDuration)表实体类
 *
 * @author HaiQiu
 * @since 2022-12-26 16:37:24
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "ScadaStatusDuration对象", description = "记录设备运行时长状态")
public class ScadaStatusDurationDto implements Serializable {

    private static final long serialVersionUID = 611444275663113001L;

    /**
     * 主键ID
     */
    @Digits(integer = 2147483646, fraction = 2, message = "主键ID长度不能超过2147483646")
    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 指标编号
     */
    @Size(max = 166, message = "指标编号长度不能超过166")
    @NotBlank(message = "指标编号不能为空")
    @ApiModelProperty(value = "指标编号")
    private String code;

    /**
     * 采集值
     */
    @Size(max = 33, message = "采集值长度不能超过33")
    @ApiModelProperty(value = "采集值")
    private String value;

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

    /**
     * 入库时间
     */
    @ApiModelProperty(value = "入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 运行时长
     */
    @Size(max = 166, message = "运行时长长度不能超过166")
    @ApiModelProperty(value = "运行时长")
    private String runTime;

}

