优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.baiyue.iam.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
@@ -18,6 +19,7 @@ public final class MemberDtos {
|
||||
@NotBlank @Size(min = 8, max = 64)
|
||||
@Pattern(regexp = "^(?=.*[A-Za-z])(?=.*\\d).+$", message = "密码必须同时包含字母和数字") String password,
|
||||
@NotBlank @Size(max = 64) String displayName,
|
||||
@Schema(description = "成员登录手机号;同步 Auth 且与公司联系电话独立")
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$") String phone,
|
||||
@Email @Size(max = 128) String email,
|
||||
@NotBlank String memberType,
|
||||
@@ -30,6 +32,7 @@ public final class MemberDtos {
|
||||
|
||||
public record UpdateMemberRequest(
|
||||
@NotBlank @Size(max = 64) String displayName,
|
||||
@Schema(description = "成员登录手机号;变更时同步 Auth、撤销该账号全部会话并审计")
|
||||
@Pattern(regexp = "^1[3-9]\\d{9}$") String phone,
|
||||
@Email @Size(max = 128) String email,
|
||||
@NotBlank String memberType,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.baiyue.iam.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
@@ -16,6 +17,7 @@ public final class PlatformUserManagementDtos {
|
||||
public record CreateUserRequest(
|
||||
@NotBlank @Pattern(regexp = "^[A-Za-z][A-Za-z0-9_.@-]{3,63}$") String username,
|
||||
@NotBlank @Size(max = 64) String displayName,
|
||||
@Schema(description = "平台账号登录手机号;与企业联系电话独立")
|
||||
@NotBlank @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") String phone,
|
||||
@Email @Size(max = 128) String email,
|
||||
@NotNull Long tenantId,
|
||||
@@ -32,6 +34,7 @@ public final class PlatformUserManagementDtos {
|
||||
|
||||
public record UpdateUserRequest(
|
||||
@NotBlank @Size(max = 64) String displayName,
|
||||
@Schema(description = "平台账号登录手机号;变更时同步 Auth、撤销该账号全部会话并审计")
|
||||
@NotBlank @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确") String phone,
|
||||
@Email @Size(max = 128) String email,
|
||||
@NotNull Long tenantId,
|
||||
|
||||
Reference in New Issue
Block a user