Record Class RegisterUserReq
java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.user.entity.RegisterUserReq
- Record Components:
username- 用户名。nickname- 用户昵称。password- 密码。为了防止身份被冒用,由用户设置的、只有用户自己知晓的口令。
- All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.Into<User>
public record RegisterUserReq(@Alphanumeric(excludes="\\.") @NotBlank @Size(min=3,max=32) String username, @Size(max=255) String nickname, @NotBlank @Size(min=4) String password)
extends Record
implements io.github.xezzon.zeroweb.core.trait.Into<User>
用户注册请求
包含用户注册所需的必要信息,包括用户名、昵称和密码。
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionRegisterUserReq(@Alphanumeric(excludes="\\.") @NotBlank @Size(min=3,max=32) String username, @Size(max=255) String nickname, @NotBlank @Size(min=4) String password) Creates an instance of aRegisterUserReqrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.into()转换为用户实体@Size(max=255) Stringnickname()Returns the value of thenicknamerecord component.@NotBlank @Size(min=4) Stringpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.@Alphanumeric(excludes="\\.") @NotBlank @Size(min=3,max=32) Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
RegisterUserReq
public RegisterUserReq(@Alphanumeric(excludes="\\.") @NotBlank @Size(min=3,max=32) @Alphanumeric(excludes="\\.") @NotBlank @Size(min=3,max=32) String username, @Size(max=255) @Size(max=255) String nickname, @NotBlank @Size(min=4) @NotBlank @Size(min=4) String password) Creates an instance of aRegisterUserReqrecord class.
-
-
Method Details
-
into
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
username
-
nickname
-
password
-