SYYTe/maku-boot-system/src/main/java/net/maku/system/vo/SysUserVO.java
2022-08-31 11:22:15 +08:00

81 lines
2.3 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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