2026-07-09 d41fe2e95f3f64c6e3a7229acd9e74e673513a0a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package cn.iocoder.yudao.module.system.api.user.dto;
 
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
 
import java.util.Set;
 
/**
 * Admin 用户创建 Request DTO
 */
@Schema(description = "管理后台 - 用户创建 Request DTO")
@Data
public class AdminUserCreateReqDTO {
 
    @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "zhangsan")
    @NotEmpty(message = "用户账号不能为空")
    private String username;
 
    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三")
    @NotEmpty(message = "用户昵称不能为空")
    private String nickname;
 
    @Schema(description = "部门编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "部门编号不能为空")
    private Long deptId;
 
    @Schema(description = "岗位编号数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1]")
    @NotNull(message = "岗位编号不能为空")
    private Set<Long> postIds;
 
    @Schema(description = "角色编号数组", example = "[1, 2]")
    private Set<Long> roleIds;
 
    @Schema(description = "手机号码", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601691300")
    @NotEmpty(message = "手机号码不能为空")
    private String mobile;
 
    @Schema(description = "密码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123456")
    @NotEmpty(message = "密码不能为空")
    private String password;
 
    @Schema(description = "用户性别", example = "1")
    private Integer sex;
 
    @Schema(description = "用户邮箱", example = "zhangsan@example.com")
    private String email;
 
    @Schema(description = "用户头像", example = "https://www.iocoder.cn/xxx.png")
    private String avatar;
 
    @Schema(description = "备注", example = "备注信息")
    private String remark;
 
}