Record Class AddSettingRequest

java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.setting.entity.AddSettingRequest
Record Components:
code - 业务参数标识,唯一标识参数类型
schema - 参数约束定义,JSON Schema 格式
value - 参数初始值,JSON格式
All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.Into<Setting>

public record AddSettingRequest(@Alphanumeric @NotBlank @Size(max=255) String code, @NotNull String schema, Map<String,Object> value) extends Record implements io.github.xezzon.zeroweb.core.trait.Into<Setting>

新增业务参数请求

用于创建新的业务参数配置,包含参数标识、约束定义和初始值。 实现 Into 接口,提供转换为 Setting 实体对象的方法。

Author:
xezzon
  • Constructor Details

    • AddSettingRequest

      public AddSettingRequest(@Alphanumeric @NotBlank @Size(max=255) @Alphanumeric @NotBlank @Size(max=255) String code, @NotNull @NotNull String schema, Map<String,Object> value)
      Creates an instance of a AddSettingRequest record class.
      Parameters:
      code - the value for the code record component
      schema - the value for the schema record component
      value - the value for the value record component
  • Method Details

    • into

      public Setting into()
      Specified by:
      into in interface io.github.xezzon.zeroweb.core.trait.Into<Setting>
    • 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.
    • 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
    • schema

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

      public Map<String,Object> value()
      Returns the value of the value record component.
      Returns:
      the value of the value record component