package com.zksy.dispatch.domain;

import com.baomidou.mybatisplus.annotation.IdType;
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_plan_match_record", schema = "app_user")
public class DisPlanMatchRecord {

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

    @ApiModelProperty("事件类型")
    private String eventType;

    @ApiModelProperty("事件级别")
    private String eventLevel;

    @ApiModelProperty("发生区域")
    private String eventRegion;

    @ApiModelProperty("责任单位")
    private String responsibleUnit;

    @ApiModelProperty("匹配类型（manual手动/topic专题/apply应用）")
    private String matchType;

    @ApiModelProperty("预案ID")
    private Long planId;

    @ApiModelProperty("预案名称")
    private String planName;

    @ApiModelProperty("匹配度（0-100）")
    private Integer matchScore;

    @ApiModelProperty("记录描述")
    private String recordDesc;

    @ApiModelProperty("操作人")
    private String createBy;

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

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