package com.zksy.base.warning.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@TableName("early_warning")
@Api(value = "预警信息")
@Data
public class EarlyWarning implements Serializable {

    @TableId(value = "warning_id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty("预警ID")
    private String warningId;

    @TableField("warning_no")
    @ApiModelProperty("预警编号")
    private String warningNo;

    @TableField("warning_name")
    @ApiModelProperty("预警名称")
    private String warningName;

    @TableField("warning_type")
    @ApiModelProperty("预警类型")
    private String warningType;

    @TableField("warning_level")
    @ApiModelProperty("预警级别")
    private String warningLevel;

    @TableField("warning_special")
    @ApiModelProperty("预警专项")
    private String warningSpecial;

    @TableField("location")
    @ApiModelProperty("预警位置")
    private String location;

    @TableField("longitude")
    @ApiModelProperty("经度")
    private BigDecimal longitude;

    @TableField("latitude")
    @ApiModelProperty("纬度")
    private BigDecimal latitude;

    @TableField("ownership_unit")
    @ApiModelProperty("权属单位")
    private String ownershipUnit;

    @TableField("publisher")
    @ApiModelProperty("发布人")
    private String publisher;

    @TableField("publish_time")
    @ApiModelProperty("发布时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime publishTime;

    @TableField("handler")
    @ApiModelProperty("处置人")
    private String handler;

    @TableField("status")
    @ApiModelProperty("状态")
    private String status;

    @TableField("warning_content")
    @ApiModelProperty("预警内容描述")
    private String warningContent;

    @TableField("process_instance_id")
    @ApiModelProperty("工作流实例ID")
    private String processInstanceId;

    @TableField("create_by")
    @ApiModelProperty("创建人")
    private String createBy;

    @TableField("create_time")
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @TableField("update_by")
    @ApiModelProperty("更新人")
    private String updateBy;

    @TableField("update_time")
    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;

    @TableField("remark")
    @ApiModelProperty("备注")
    private String remark;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
