package cn.iocoder.yudao.module.hrm.controller.admin.employee.vo;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
import jakarta.validation.Valid;
|
import jakarta.validation.constraints.Email;
|
import jakarta.validation.constraints.NotEmpty;
|
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.Pattern;
|
import lombok.Data;
|
|
import java.math.BigDecimal;
|
import java.time.LocalDate;
|
import java.util.List;
|
|
@Schema(description = "管理后台 - 员工新增/修改 Request VO")
|
@Data
|
public class HrmEmployeeSaveReqVO {
|
|
@Schema(description = "员工ID", example = "1")
|
private Long id;
|
|
@Schema(description = "部门ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "部门不能为空")
|
private Long deptId;
|
|
@Schema(description = "岗位ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "岗位不能为空")
|
private Long postId;
|
|
@Schema(description = "员工姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
|
@NotEmpty(message = "员工姓名不能为空")
|
private String name;
|
|
@Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "性别不能为空")
|
private Integer gender;
|
|
@Schema(description = "出生日期", example = "1990-01-15")
|
private LocalDate birthday;
|
|
@Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "13800138000")
|
@NotEmpty(message = "手机号码不能为空")
|
@Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
|
private String phone;
|
|
@Schema(description = "邮箱", example = "zhangsan@example.com")
|
@Email(message = "邮箱格式不正确")
|
private String email;
|
|
@Schema(description = "身份证号", example = "320102199001150011")
|
@Pattern(regexp = "^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\dXx]$",
|
message = "身份证号格式不正确")
|
private String idCard;
|
|
@Schema(description = "入职日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2020-03-01")
|
@NotNull(message = "入职日期不能为空")
|
private LocalDate hireDate;
|
|
@Schema(description = "转正日期", example = "2020-06-01")
|
private LocalDate regularDate;
|
|
@Schema(description = "员工状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@NotNull(message = "员工状态不能为空")
|
private Integer employeeStatus;
|
|
@Schema(description = "年假余额(天)", example = "5")
|
private BigDecimal annualLeaveBalance;
|
|
@Schema(description = "病假余额(天)", example = "10")
|
private BigDecimal sickLeaveBalance;
|
|
@Schema(description = "薪酬结构ID", example = "1")
|
private Long salaryStructureId;
|
|
@Schema(description = "基本工资", example = "10000.00")
|
private BigDecimal baseSalary;
|
|
@Schema(description = "角色ID列表", example = "[1, 2]")
|
private List<Long> roleIds;
|
|
@Schema(description = "开户银行", example = "中国工商银行")
|
private String bankName;
|
|
@Schema(description = "银行账号", example = "6222021234567890123")
|
private String bankAccount;
|
|
@Schema(description = "居住地址", example = "江苏省南京市")
|
private String address;
|
|
@Schema(description = "备注", example = "备注信息")
|
private String remark;
|
|
// ========== 子表数据 ==========
|
|
@Schema(description = "教育经历列表")
|
@Valid
|
private List<HrmEmployeeEducationSaveReqVO> educationList;
|
|
@Schema(description = "工作经历列表")
|
@Valid
|
private List<HrmEmployeeWorkHistorySaveReqVO> workHistoryList;
|
|
@Schema(description = "紧急联系人列表")
|
@Valid
|
private List<HrmEmployeeEmergencyContactSaveReqVO> emergencyContactList;
|
|
}
|