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

/**
 * 应急事件数据记录（数据查询与统计）
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "dis_event_record", schema = "app_user")
public class DisEventRecord {

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

    @ApiModelProperty("事件名称")
    private String eventName;

    @ApiModelProperty("事件类型（自然灾害/事故灾难/公共卫生/社会安全/管网泄漏/管道堵塞）")
    private String eventType;

    @ApiModelProperty("发生时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate eventTime;

    @ApiModelProperty("事件等级（一般/较大/重大/特别重大）")
    private String eventLevel;

    @ApiModelProperty("地域（太常/城东/城南/城北片区）")
    private String region;

    @ApiModelProperty("责任部门（应急管理局/消防救援局/市政管理局/水务局）")
    private String department;

    @ApiModelProperty("直接经济损失（万元）")
    private BigDecimal lossAmount;

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

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