Record Class AddAttachmentReq

java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.attachment.entity.AddAttachmentReq
Record Components:
name - 文件名
checksum - 文件摘要
size - 文件大小。单位:字节。
type - MIME 类型
bizType - 业务类型
bizId - 业务 ID
All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.Into<Attachment>

public record AddAttachmentReq(@NotBlank @Size(max=255) String name, @NotBlank @Size(max=128) String checksum, @NotNull @Positive Long size, @NotBlank @Size(max=255) String type, @NotBlank @Size(max=255) String bizType, String bizId) extends Record implements io.github.xezzon.zeroweb.core.trait.Into<Attachment>
新增附件请求体
Author:
xezzon
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddAttachmentReq(@NotBlank @Size(max=255) String name, @NotBlank @Size(max=128) String checksum, @NotNull @Positive Long size, @NotBlank @Size(max=255) String type, @NotBlank @Size(max=255) String bizType, String bizId)
    Creates an instance of a AddAttachmentReq record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the bizId record component.
    @NotBlank @Size(max=255) String
    Returns the value of the bizType record component.
    @NotBlank @Size(max=128) String
    Returns the value of the checksum record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
     
    @NotBlank @Size(max=255) String
    Returns the value of the name record component.
    @NotNull @Positive Long
    Returns the value of the size record component.
    final String
    Returns a string representation of this record class.
    @NotBlank @Size(max=255) String
    Returns the value of the type record component.

    Methods inherited from class Object

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

    • AddAttachmentReq

      public AddAttachmentReq(@NotBlank @Size(max=255) @NotBlank @Size(max=255) String name, @NotBlank @Size(max=128) @NotBlank @Size(max=128) String checksum, @NotNull @Positive @NotNull @Positive Long size, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String type, @NotBlank @Size(max=255) @NotBlank @Size(max=255) String bizType, String bizId)
      Creates an instance of a AddAttachmentReq record class.
      Parameters:
      name - the value for the name record component
      checksum - the value for the checksum record component
      size - the value for the size record component
      type - the value for the type record component
      bizType - the value for the bizType record component
      bizId - the value for the bizId record component
  • Method Details

    • into

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

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • checksum

      @NotBlank @Size(max=128) public @NotBlank @Size(max=128) String checksum()
      Returns the value of the checksum record component.
      Returns:
      the value of the checksum record component
    • size

      @NotNull @Positive public @NotNull @Positive Long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • type

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • bizType

      @NotBlank @Size(max=255) public @NotBlank @Size(max=255) String bizType()
      Returns the value of the bizType record component.
      Returns:
      the value of the bizType record component
    • bizId

      public String bizId()
      Returns the value of the bizId record component.
      Returns:
      the value of the bizId record component