package cn.iocoder.yudao.module.mes.controller.admin.safety.vo.train; import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.*; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.math.BigDecimal; import java.time.LocalDate; /** * 安全生产 - 培训记录新增/修改 Request VO * * @author 超级管理员 */ @Schema(description = "管理后台 - 培训记录新增/修改 Request VO") @Data public class SafetyTrainingSaveReqVO { private Long id; @Schema(description = "培训主题", requiredMode = Schema.RequiredMode.REQUIRED, example = "年度安全规程培训") @NotBlank(message = "培训主题不能为空") @Size(max = 200) private String title; @Schema(description = "培训类型", example = "SAFETY") @Pattern(regexp = "SAFETY|SKILL|LAW|EMERGENCY|INDUCTION|OTHER", message = "培训类型不合法") private String trainingType; @Schema(description = "培训日期", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "培训日期不能为空") @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) private LocalDate trainDate; @Schema(description = "培训学时", example = "2.0") @DecimalMin(value = "0", message = "培训学时不能为负数") private BigDecimal durationHours; @Schema(description = "讲师/组织人(员工编号,关联 hrm_employee)") private Long trainerId; @Schema(description = "培训地点") @Size(max = 200) private String location; @Schema(description = "参加人员姓名,逗号分隔") @Size(max = 2000) private String participants; @Schema(description = "参加人数") @Min(value = 0, message = "参加人数不能为负数") private Integer participantCount; @Schema(description = "培训内容") @Size(max = 2000) private String content; @Schema(description = "考核情况") @Size(max = 2000) private String examResult; @Schema(description = "签到表/课件/照片 URL,逗号分隔") @Size(max = 2000) private String attachment; @Schema(description = "备注") @Size(max = 500) private String remark; }