package com.zksy.dispatch.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 跟踪解除表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dis_event_track", schema = "app_user")
public class DisEventTrack {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("关联统一事件主表ID（dis_event.id）")
    private Long relEventId;

    @ApiModelProperty("事件编号")
    private String eventNo;

    @ApiModelProperty("事件类别")
    private String category;

    @ApiModelProperty("事件级别")
    @TableField("\"level\"")
    private String level;

    @ApiModelProperty("地点")
    private String location;

    @ApiModelProperty("描述")
    private String description;

    @ApiModelProperty("处理人")
    private String handler;

    @ApiModelProperty("状态（处理中/已解除/已关闭）")
    private String status;

    @ApiModelProperty("最近回访时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime lastVisitTime;

    @ApiModelProperty("下次回访时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime nextVisitTime;

    @TableField(exist = false)
    @ApiModelProperty("态势评估（跟踪入参：趋于平稳/仍在发展/明显恶化，不落库）")
    private String assessment;

    @TableField(exist = false)
    @ApiModelProperty("是否需要升级（跟踪入参：是/否，不落库）")
    private String needUpgrade;

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

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

    @TableLogic(value = "0", delval = "2")
    @ApiModelProperty("删除标志（0=正常 2=删除）")
    private String delFlag;
}
