package com.zcloud.accident.persistence.dataobject;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jjb.saas.framework.repository.basedo.BaseDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.sql.Date;
import java.time.LocalDateTime;

/**
 * web-infrastructure
 *
 * @Author fangjiakai
 * @Date 2025-10-29 14:28:38
 */
@Data
@TableName("accident")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class AccidentDO extends BaseDO {
    //业务主键id
    @ApiModelProperty(value = "业务主键id")
    private String accidentId;
    //事故案号
    @ApiModelProperty(value = "事故案号")
    private String incidentNumber;
    //事故名称
    @ApiModelProperty(value = "事故名称")
    private String incidentName;
    //事故类型
    @ApiModelProperty(value = "事故类型")
    private String incidentType;
    //事故类型
    @ApiModelProperty(value = "事故类型")
    private String incidentTypeName;
    //公司
    @ApiModelProperty(value = "公司id")
    private Long corpinfoId;
    @ApiModelProperty(value = "公司")
    private String corpinfoName;
    //事故级别
    @ApiModelProperty(value = "事故级别")
    private String incidentLevel;
    //事故级别
    @ApiModelProperty(value = "事故级别")
    private String incidentLevelName;
    //事故性质
    @ApiModelProperty(value = "事故性质")
    private String incidentNature;
    //事故发生地点
    @ApiModelProperty(value = "事故发生地点")
    private String location;
    //事故发生时间
    @ApiModelProperty(value = "事故发生时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime incidentDate;
    //直接经济损失（万元）
    @ApiModelProperty(value = "直接经济损失（万元）")
    private BigDecimal directLoss;
    //受伤人数
    @ApiModelProperty(value = "受伤人数")
    private Integer injured;
    //死亡人数
    @ApiModelProperty(value = "死亡人数")
    private Integer fatalities;
    //重伤人数
    @ApiModelProperty(value = "重伤人数")
    private Integer seriouslyInjured;
    //事故起因
    @ApiModelProperty(value = "事故起因")
    private String cause;
    //事故概述
    @ApiModelProperty(value = "事故概述")
    private String summary;
    //原因分析及责任认定
    @ApiModelProperty(value = "原因分析及责任认定")
    private String analysis;
    //考核建议
    @ApiModelProperty(value = "考核建议")
    private String suggestions;
    //整改措施
    @ApiModelProperty(value = "整改措施")
    private String measures;
    @ApiModelProperty(value = "填报人")
    private String reportUser;
    //报出日期
    @ApiModelProperty(value = "报出日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime reportDate;
    //1事件/2事故
    @ApiModelProperty(value = "1事件/2事故")
    private Integer type;
    @ApiModelProperty(value = "部门id")
    private Long departmentId;

    public AccidentDO(String accidentId) {
        this.accidentId = accidentId;
    }
}

