package org.qinan.safetyeval.infrastructure.dataobject.base;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

@Schema(description = "请求对象")
@SuperBuilder
@Accessors(chain = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Req<T> {

    private static final long serialVersionUID = 1L;

    @Schema(description = "请求参数，可为基本类型（包装类），可以为其它可序列化对象")
    private T data;

    public static <T> Req<T> create() {
        return Req.<T>builder().build();
    }
}
