package com.xunhong.erp.turbo.api.user.dto.cmd;

import com.alibaba.cola.dto.Command;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenyifei
 */
@Data
@Schema(title = "员工信息更新")
@EqualsAndHashCode(callSuper = true)
public class EmployeeUpdateCmd extends Command {

	@Schema(title = "员工信息ID", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private Long employeeId;

	@Schema(title = "姓名", requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "姓名不能为空")
	private String name;

	@Schema(title = "工号", requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "工号不能为空")
	private String number;

	@Schema(title = "性别", requiredMode = Schema.RequiredMode.REQUIRED)
	@NotNull(message = "请选择性别")
	private Integer gender;

	@Schema(title = "头像")
	private String avatar;

	@Schema(title = "手机号", requiredMode = Schema.RequiredMode.REQUIRED)
	@NotBlank(message = "手机号不能为空")
	@Pattern(regexp = "^(1[3-9])\\d{9}$", message = "手机号格式错误")
	private String phone;

	@Schema(title = "备注")
	@Size(max = 200, message = "最多200个字符")
	private String remark;
}
