SYYTe/maku-boot-system/src/main/java/net/maku/system/vo/SysUserVO.java

81 lines
2.3 KiB
Java
Raw Normal View History

2022-05-05 13:58:45 +08:00
package net.maku.system.vo;
2022-04-22 15:26:39 +08:00
2022-05-05 13:58:45 +08:00
import com.fasterxml.jackson.annotation.JsonFormat;
2022-04-22 15:26:39 +08:00
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
2022-05-05 13:58:45 +08:00
import net.maku.framework.common.utils.DateUtils;
2022-04-22 15:26:39 +08:00
import org.hibernate.validator.constraints.Range;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
2022-05-05 13:58:45 +08:00
import java.util.Date;
2022-04-22 15:26:39 +08:00
import java.util.List;
/**
2022-05-05 13:58:45 +08:00
* 用户
2022-04-22 15:26:39 +08:00
*
* @author 阿沐 babamu@126.com
*/
@Data
2022-05-05 13:58:45 +08:00
@Schema(description = "用户")
public class SysUserVO implements Serializable {
2022-04-22 15:26:39 +08:00
private static final long serialVersionUID = 1L;
2022-05-05 13:58:45 +08:00
@Schema(description = "id")
private Long id;
2022-04-23 23:01:54 +08:00
@Schema(description = "用户名", required = true)
2022-04-22 15:26:39 +08:00
@NotBlank(message = "用户名不能为空")
private String username;
2022-04-23 23:01:54 +08:00
@Schema(description = "密码")
2022-04-22 15:26:39 +08:00
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private String password;
2022-04-23 23:01:54 +08:00
@Schema(description = "姓名", required = true)
2022-04-22 15:26:39 +08:00
@NotBlank(message = "姓名不能为空")
private String realName;
2022-04-23 23:01:54 +08:00
@Schema(description = "头像")
2022-04-22 15:26:39 +08:00
private String avatar;
2022-04-29 22:51:40 +08:00
@Schema(description = "性别 0男 1女 2未知", required = true)
@Range(min = 0, max = 2, message = "性别不正确")
2022-04-22 15:26:39 +08:00
private Integer gender;
2022-04-23 23:01:54 +08:00
@Schema(description = "邮箱")
2022-04-22 15:26:39 +08:00
@Email(message = "邮箱格式不正确")
private String email;
2022-04-23 23:01:54 +08:00
@Schema(description = "手机号", required = true)
2022-04-22 15:26:39 +08:00
@NotBlank(message = "手机号不能为空")
private String mobile;
2022-04-23 23:01:54 +08:00
@Schema(description = "机构ID", required = true)
2022-04-22 15:26:39 +08:00
@NotNull(message = "机构ID不能为空")
private Long orgId;
2022-04-23 23:01:54 +08:00
@Schema(description = "状态 0停用 1正常", required = true)
2022-04-22 15:26:39 +08:00
@Range(min = 0, max = 1, message = "用户状态不正确")
private Integer status;
2022-04-23 23:01:54 +08:00
@Schema(description = "角色ID列表")
2022-04-22 15:26:39 +08:00
private List<Long> roleIdList;
2022-04-23 23:01:54 +08:00
@Schema(description = "岗位ID列表")
2022-04-22 15:26:39 +08:00
private List<Long> postIdList;
2022-05-05 13:58:45 +08:00
@Schema(description = "超级管理员 0否 1")
private Integer superAdmin;
@Schema(description = "机构名称")
private String orgName;
@Schema(description = "创建时间")
@JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
private Date createTime;
2022-04-22 15:26:39 +08:00
}