Record Class AddRoleReq
java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.role.entity.AddRoleReq
- Record Components:
code- 角色简码name- 角色名称inheritable- 是否允许该角色新建其下级角色parentId- 上级角色
- All Implemented Interfaces:
io.github.xezzon.tao.trait.Into<Role>
public record AddRoleReq(String code, String name, Boolean inheritable, String parentId)
extends Record
implements io.github.xezzon.tao.trait.Into<Role>
新增角色
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionAddRoleReq(String code, String name, Boolean inheritable, String parentId) Creates an instance of aAddRoleReqrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinheritablerecord component.into()name()Returns the value of thenamerecord component.parentId()Returns the value of theparentIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AddRoleReq
Creates an instance of aAddRoleReqrecord class.- Parameters:
code- the value for thecoderecord componentname- the value for thenamerecord componentinheritable- the value for theinheritablerecord componentparentId- the value for theparentIdrecord component
-
-
Method Details
-
into
- Specified by:
intoin interfaceio.github.xezzon.tao.trait.Into<Role>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
code
Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
inheritable
Returns the value of theinheritablerecord component.- Returns:
- the value of the
inheritablerecord component
-
parentId
Returns the value of theparentIdrecord component.- Returns:
- the value of the
parentIdrecord component
-