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

import com.alibaba.cola.dto.Command;
import com.xunhong.erp.turbo.base.annotation.Decrypt;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

	@Decrypt
	@Schema(title = "新密码", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	@Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]{8,}$", message = "密码必须至少8个字符，包含至少一个大写字母、一个小写字母、一个数字和一个特殊字符")
	private String password;

	@Schema(title = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, type = "string")
	private Long userId;
}
