package com.zcloud.accident.dto;

import com.alibaba.cola.dto.Command;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

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

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

