package com.ylx.point.domain.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
@ApiModel("活动详情vo")
public class PointActivityDetailsVo<T extends PointActivityBaseVo> {

    @ApiModelProperty("活动类型")
    private Integer activityType;

    @ApiModelProperty("活动详情")
    private T detail; // 自动适配不同VO

    public static <T extends PointActivityBaseVo> PointActivityDetailsVo<T> of(Integer activityType, T detail) {
        PointActivityDetailsVo<T> resp = new PointActivityDetailsVo<>();
        resp.setActivityType(activityType);
        resp.setDetail(detail);
        return resp;
    }
}
