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.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 事件事后评估表（挂靠统一事件主表，一个事件一条评估记录）
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dis_event_assess", schema = "app_user")
public class DisEventAssess {

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

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

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

    @ApiModelProperty("应急组织体系评分（0-5，允许0.5步进）")
    private BigDecimal orgScore;

    @ApiModelProperty("应急组织体系评语")
    private String orgComment;

    @ApiModelProperty("应急能力评分（0-5，允许0.5步进）")
    private BigDecimal capScore;

    @ApiModelProperty("应急能力评语")
    private String capComment;

    @ApiModelProperty("处置效果评分（0-5，允许0.5步进）")
    private BigDecimal effectScore;

    @ApiModelProperty("处置效果评语")
    private String effectComment;

    @ApiModelProperty("灾害损失评分（0-5，允许0.5步进）")
    private BigDecimal lossScore;

    @ApiModelProperty("灾害损失评语")
    private String lossComment;

    @ApiModelProperty("综合评分（四维平均，保留1位小数）")
    private BigDecimal totalScore;

    @ApiModelProperty("评价等级：优秀/良好/一般/较差")
    private String grade;

    @ApiModelProperty("是否录入案例库：0=否 1=是")
    private String caseFlag;

    @ApiModelProperty("评估人")
    private String assessor;

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

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

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

    @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;
}
