Record Class ModifyDictReq

java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.dict.entity.ModifyDictReq
Record Components:
id - 字典ID
code - 字典键
label - 字典值
ordinal - 排序号
parentId - 上级字典 ID
enabled - 启用状态
All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.Into<Dict>

public record ModifyDictReq(@NotNull String id, @Alphanumeric @NotBlank @Size(max=255) String code, @Size(max=255) String label, @NotNull Integer ordinal, String parentId, Boolean enabled) extends Record implements io.github.xezzon.zeroweb.core.trait.Into<Dict>

修改字典请求对象

用于封装修改字典项的请求参数。 该对象实现了 Into 接口,可以转换为 Dict 实体对象。

  • Constructor Summary

    Constructors
    Constructor
    Description
    ModifyDictReq(@NotNull String id, @Alphanumeric @NotBlank @Size(max=255) String code, @Size(max=255) String label, @NotNull Integer ordinal, String parentId, Boolean enabled)
    Creates an instance of a ModifyDictReq record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Alphanumeric @NotBlank @Size(max=255) String
    Returns the value of the code record component.
    Returns the value of the enabled record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull String
    id()
    Returns the value of the id record component.
    转换为字典实体对象
    @Size(max=255) String
    Returns the value of the label record component.
    @NotNull Integer
    Returns the value of the ordinal record component.
    Returns the value of the parentId record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ModifyDictReq

      public ModifyDictReq(@NotNull @NotNull String id, @Alphanumeric @NotBlank @Size(max=255) @Alphanumeric @NotBlank @Size(max=255) String code, @Size(max=255) @Size(max=255) String label, @NotNull @NotNull Integer ordinal, String parentId, Boolean enabled)
      Creates an instance of a ModifyDictReq record class.
      Parameters:
      id - the value for the id record component
      code - the value for the code record component
      label - the value for the label record component
      ordinal - the value for the ordinal record component
      parentId - the value for the parentId record component
      enabled - the value for the enabled record component
  • Method Details

    • into

      public Dict into()
      转换为字典实体对象
      Specified by:
      into in interface io.github.xezzon.zeroweb.core.trait.Into<Dict>
      Returns:
      字典实体对象
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      @NotNull public @NotNull String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • code

      @Alphanumeric @NotBlank @Size(max=255) public @Alphanumeric @NotBlank @Size(max=255) String code()
      Returns the value of the code record component.
      Returns:
      the value of the code record component
    • label

      @Size(max=255) public @Size(max=255) String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • ordinal

      @NotNull public @NotNull Integer ordinal()
      Returns the value of the ordinal record component.
      Returns:
      the value of the ordinal record component
    • parentId

      public String parentId()
      Returns the value of the parentId record component.
      Returns:
      the value of the parentId record component
    • enabled

      public Boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component