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 aAddRoleReq
record class. -
Method Summary
Modifier and TypeMethodDescriptioncode()
Returns the value of thecode
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinheritable
record component.into()
name()
Returns the value of thename
record component.parentId()
Returns the value of theparentId
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AddRoleReq
Creates an instance of aAddRoleReq
record class.- Parameters:
code
- the value for thecode
record componentname
- the value for thename
record componentinheritable
- the value for theinheritable
record componentparentId
- the value for theparentId
record component
-
-
Method Details
-
into
- Specified by:
into
in 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 thecode
record component.- Returns:
- the value of the
code
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
inheritable
Returns the value of theinheritable
record component.- Returns:
- the value of the
inheritable
record component
-
parentId
Returns the value of theparentId
record component.- Returns:
- the value of the
parentId
record component
-