package com.yami.shop.bean.dto.hb;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import lombok.*;

/**
 * <p>TODO</p>
 *
 * @author mr wang
 * @version 1.0.0
 * @since 2025-08-29
 */
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(description = "请求海博基础信息的实体")
public class HBBaseReq<T> {
    private String appId;
    private String sign;
    private String taskType;
    @Builder.Default
    private String signMethod = "md5";
    @Builder.Default
    private Long timestamp = System.currentTimeMillis();
    private T body;
    // 添加静态工厂方法
    public static <T> HBBaseReq<T> create() {
        HBBaseReq<T> req = new HBBaseReq<>();
        req.setTimestamp(System.currentTimeMillis());
        req.setSignMethod("md5");
        return req;
    }
}
