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.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@Builder
@Schema(title = "管理员创建")
@EqualsAndHashCode(callSuper = true)
public class OpenSafeCmd 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", type = "string", hidden = true)
	private Long userId;
}
