/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.dispatch.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;


/**
 * 危险源
 *
 * @author qf
 * @date Thu Apr 21 00:00:00 CST 2022
 */
@Data
@ApiModel
public class HazardDTO {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @ApiModelProperty(value = "ID")
    @NotNull(groups = update.class, message = "ID不能为空")
    @Min(value = 1, message = "ID错误")
    private Long id;
    /**
     * 危险源类型
     */
    @ApiModelProperty(value = "危险源类型,关联字典码表里面的id值")

    private String hazardType;
    /**
     * 危险源名称
     */
    @ApiModelProperty(value = "危险源名称")
    @NotEmpty(message = "危险源名称不能为空")
    @Size(max = 20, message = "危险源名称只能在1-20个字符")
    private String hazardName;
    /**
     * 经度
     */
    @ApiModelProperty(value = "经度")
    private Double longitude;
    /**
     * 纬度
     */
    @ApiModelProperty(value = "纬度")
    private Double latitude;
    /**
     * 危险源位置
     */
    @ApiModelProperty(value = "危险源位置")
    @NotEmpty(message = "危险源位置不能为空")
    @Size(max = 200, message = "危险源位置只能在1-200个字符")
    private String addre;
    /**
     * 危险源等级
     */
    @ApiModelProperty(value = "危险源等级")
    private String hazardLevel;
    /**
     * 原因说明
     */
    @ApiModelProperty(value = "原因说明")
    @Size(max = 200, message = "原因说明只能在1-200个字符")
    private String reason;
    /**
     * 是否处置0:为处置;1:已处置
     */
    @ApiModelProperty(value = "是否处置0:为处置;1:已处置")
    private Short isHandle;
    /**
     * 负责人
     */
    @ApiModelProperty(value = "负责人")
    private Long personLiable;
    /**
     * 附件id用逗号分隔
     */
    @ApiModelProperty(value = "附件id用逗号分隔")
    private String annex;
    /**
     * 是否有效1有效；0无效
     */
    @ApiModelProperty(value = "是否有效1有效；0无效")
    private Short isValid;
    /**
     * 是否删除1删除；0未删除
     */
    @ApiModelProperty(value = "是否删除1删除；0未删除")
    private Short isDel;
    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @TableField(jdbcType = JdbcType.VARCHAR,updateStrategy = FieldStrategy.IGNORED)
   private String remark;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private Long createUser;
    @ApiModelProperty(hidden = true)
    private String createUserName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;
    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
    @ApiModelProperty(hidden = true)
    private String updateUserName;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    public interface update {
    }
}
