mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-23 11:09:29 +08:00
学员代码优化
This commit is contained in:
@@ -2,6 +2,7 @@ package xyz.playedu.api.request.backend;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.validation.constraints.Email;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
@@ -15,42 +16,30 @@ import java.util.Date;
|
||||
@Data
|
||||
public class UserRequest {
|
||||
|
||||
@NotNull(message = "请输入邮箱")
|
||||
@Email(message = "请输入合法邮箱")
|
||||
@NotBlank(message = "请输入邮箱")
|
||||
@NotNull(message = "email参数不存在")
|
||||
@Email(message = "请输入正确的邮箱")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "请输入昵称")
|
||||
private String nickname;
|
||||
|
||||
@NotNull(message = "name参数不存在")
|
||||
@NotBlank(message = "请输入姓名")
|
||||
@Length(min = 1, max = 20, message = "姓名长度在1-20个字符之间")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "请上传头像")
|
||||
@Length(min = 1, max = 20, message = "昵称长度在1-20个字符之间")
|
||||
private String nickname;
|
||||
|
||||
@NotNull(message = "avatar参数不存在")
|
||||
@NotBlank(message = "请上传头像")
|
||||
private String avatar;
|
||||
|
||||
@NotNull(message = "请输入密码")
|
||||
@NotNull(message = "password参数不存在")
|
||||
@Length(min = 6, max = 16, message = "密码长度在6-16个字符之间")
|
||||
private String password;
|
||||
|
||||
@JsonProperty("id_card")
|
||||
private String idCard;
|
||||
|
||||
private Integer credit1;
|
||||
|
||||
@JsonProperty("is_active")
|
||||
private Integer isActive;
|
||||
|
||||
@JsonProperty("is_lock")
|
||||
private Integer isLock;
|
||||
|
||||
@JsonProperty("is_verify")
|
||||
private Integer isVerify;
|
||||
|
||||
@JsonProperty("verify_at")
|
||||
private Date verifyAt;
|
||||
|
||||
@JsonProperty("is_set_password")
|
||||
private Integer isSetPassword;
|
||||
|
||||
@JsonProperty("dep_ids")
|
||||
private Integer[] depIds;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user