package com.qs.mp.user.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.qs.mp.admin.domain.vo.MarketingAwardsVO;
import com.qs.mp.common.enums.MarketingStatusEnum;
import com.qs.mp.common.utils.DateUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 营销活动详情出参类
 * @author Cup
 * @date 2022/5/17
 */
@ApiModel("营销活动详情出参类")
@Data
public class UserMarketingDetailVO {

    @ApiModelProperty("活动id")
    private Long id;

    @ApiModelProperty("活动标题")
    private String title;

    @ApiModelProperty("参与人数")
    private Integer fakeNum;

    @ApiModelProperty("开始时间")
    private Date startTime;

    @ApiModelProperty("结束时间")
    private Date endTime;

    @ApiModelProperty("是否开启: -1关闭,0待开启, 1开启 ")
    private Integer isOn;

    @ApiModelProperty("活动状态-1关闭,0待开启,1开启,2未开始,3进行中,4已结束")
    private String status;

    @ApiModelProperty("活动描述")
    private String description;

    @ApiModelProperty("code获取类型,1可立即获得,2必须助力")
    private Integer codeType;

    @ApiModelProperty("抽奖码列表")
    private List<String> codeList;

    @ApiModelProperty("奖级列表")
    List<MarketingAwardsVO> awardsList;

    public String getStatus() {
        return MarketingStatusEnum.getStatus(this.startTime, this.endTime, this.isOn);
    }
}
