
package shop.alien.entity.store.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import shop.alien.entity.store.StoreActivityRuleDetail;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 活动主表
 * </p>
 *
 * @author ssk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class StoreActivityVo extends Model<StoreActivityVo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "活动编号")
    private String activityNo;

    @ApiModelProperty(value = "活动标题")
    private String activityTitle;

    @ApiModelProperty(value = "活动类型(1:邀请好友 2:签到领红包)")
    private Integer activityType;

    @ApiModelProperty(value = "活动图片(JSON数组)")
    private String contractImage;

    @ApiModelProperty(value = "活动人群类型选择框")
    private Integer activityCrowdRedio;

    @ApiModelProperty(value = "活动人群类型(0:全部用户 1:自定义)")
    private Integer activityCrowdType;

    @ApiModelProperty(value = "具体规则说明")
    private String specificRules;

    @ApiModelProperty(value = "活动开始时间")
    private Date activityStartTime;

    @ApiModelProperty(value = "活动结束时间")
    private Date activityEndTime;

    @ApiModelProperty(value = "是否永久有效")
    private Boolean isPermanent;

    @ApiModelProperty(value = "状态(0:禁用 1:启用)")
    private Integer status;

    @ApiModelProperty(value = "审批意见")
    private String approvalOpinion;

    @ApiModelProperty(value = "规则类型(1:邀请好友规则 2:签到规则 3:任务规则)")
    private Integer ruleType;

    @ApiModelProperty(value = "邀请好友限时选择类型")
    private Integer timeLimitRedio;

    @ApiModelProperty(value = "邀请好友限时(小时)")
    private Integer timeLimit;

    @ApiModelProperty(value = "人数邀请限制选择框类型")
    private Integer limitationPeopleRedio;

    @ApiModelProperty(value = "人数邀请限制(0:无限制)")
    private Integer limitationPeople;

    @ApiModelProperty(value = "限领次数")
    private Integer claimsNumber;

    @ApiModelProperty(value = "折扣类型(1:优惠券 2:折扣券)")
    private Integer discountType;

    @ApiModelProperty(value = "折扣分数")
    private BigDecimal discountGrade;

    @ApiModelProperty(value = "折扣分数选择框类型")
    private BigDecimal discountGradeRedio;

    @ApiModelProperty(value = "折扣金额")
    private BigDecimal discountMoney;

    @ApiModelProperty(value = "折扣金额选择框类型")
    private BigDecimal discountMoneyRedio;

    @ApiModelProperty(value = "指定商家ID列表（空则无指定商家，所有商家）")
    private List<Integer> storeIds;

    @ApiModelProperty(value = "指定活动人群（空则无指定活动人群，所有人）")
    private List<Integer> userIds;

    @ApiModelProperty(value = "是否适用于堂食")
    private Boolean isDineIn;

    @ApiModelProperty(value = "是否适用于外卖")
    private Boolean isTakeOut;

    @ApiModelProperty(value = "折扣有效天数选择框")
    private Integer effectiveDaysRedio;

    @ApiModelProperty(value = "折扣有效天数")
    private Integer effectiveDays;

    @ApiModelProperty(value = "发放类型(1:红包)")
    private Integer sendType;

    @ApiModelProperty(value = "每日最小金额")
    private BigDecimal dailyMinAmount;

    @ApiModelProperty(value = "每日最大金额")
    private BigDecimal dailyMaxAmount;

    @ApiModelProperty(value = "每日领取次数")
    private Integer dailyCollectionFrequency;

    @ApiModelProperty(value = "保留天数")
    private Integer retentionDays;

    @ApiModelProperty(value = "任务类型(1:浏览团购 2:购买团购 3:邀请好友)")
    private Integer taskType;

    @ApiModelProperty(value = "任务详情")
    private String taskDetail;

    @ApiModelProperty(value = "浏览时长(分钟)")
    private Integer browseTime;

    @ApiModelProperty(value = "最小金额")
    private BigDecimal minAmount;

    @ApiModelProperty(value = "最大金额")
    private BigDecimal maxAmount;

    @ApiModelProperty(value = "活动起止时间")
    private List<String> activityDate;

    @ApiModelProperty(value = "删除状态")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    private Date updatedTime;

    @ApiModelProperty(value = "创建人ID")
    @TableField(value = "created_user_id", fill = FieldFill.INSERT)
    private Integer createdUserId;

    @ApiModelProperty(value = "修改人ID")
    @TableField(value = "updated_user_id", fill = FieldFill.INSERT_UPDATE)
    private Integer updatedUserId;

    @ApiModelProperty(value = "活动时间（处理过）")
    private String activityTime;

    @ApiModelProperty(value = "用户选项")
    private List<LifeUserVo> userOptions;

    @ApiModelProperty(value = "店铺选项")
    private List<StoreInfoVo> storeOptions;

    @ApiModelProperty(value = "连续签到奖励")
    private List<StoreActivityRuleDetail> ruleTableData;

    @ApiModelProperty(value = "连续签到奖励")
    private List<StoreActivityRuleDetail> taskRuleTableData;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
