package com.liquidnet.service.sweet.dto.vo.admin;

import com.liquidnet.service.sweet.entity.SweetIntegralActivity;
import com.liquidnet.service.sweet.entity.SweetIntegralActivityPrize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * SweetIntegralActivityVo
 * </p>
 *
 * @author jiangxiulong
 * @since 2021-10-20
 */

@Data
@ApiModel
public class SweetIntegralActivityVo implements Serializable, Cloneable {

    private static final long serialVersionUID = 1599981143175023116L;

    @ApiModelProperty(value = "活动id")
    private String integralActivityId;

    @ApiModelProperty(value = "活动名称")
    private String activityTitle;

    @ApiModelProperty(value = "活动图片")
    private String activityImg;

    @ApiModelProperty(value = "活动类型 1转盘")
    private Integer activityType;

    @ApiModelProperty(value = "活动时间类型 1长期 2开始结束时间")
    private Integer timeType;

    @ApiModelProperty(value = "如果活动有时间限制 开始时间")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "如果活动有时间限制 结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "快递费用类型 1包邮 2到付")
    private Integer expressFeeType;

    @ApiModelProperty(value = "活动规则")
    private String activityRules;

    @ApiModelProperty(value = "是否上线 1未上线 2已上线")
    private Integer isOnline;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createdAt;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updatedAt;

    @ApiModelProperty(value = "奖品列表")
    private List<SweetIntegralActivityPrize> prizeList;

    private static final SweetIntegralActivityVo obj = new SweetIntegralActivityVo();

    public static SweetIntegralActivityVo getNew() {
        try {
            return (SweetIntegralActivityVo) obj.clone();
        } catch (CloneNotSupportedException e) {
            return new SweetIntegralActivityVo();
        }
    }

    public SweetIntegralActivityVo copy(SweetIntegralActivity source) {
        if (null == source) return this;
        this.setIntegralActivityId(source.getIntegralActivityId());
        this.setActivityTitle(source.getActivityTitle());
        this.setActivityImg(source.getActivityImg());
        this.setActivityType(source.getActivityType());
        this.setTimeType(source.getTimeType());
        this.setStartTime(source.getStartTime());
        this.setEndTime(source.getEndTime());
        this.setExpressFeeType(source.getExpressFeeType());
        this.setActivityRules(source.getActivityRules());
        this.setIsOnline(source.getIsOnline());
        this.setCreatedAt(source.getCreatedAt());
        this.setUpdatedAt(source.getUpdatedAt());
        return this;
    }

}
