package shop.alien.entity.store.dto;

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 java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

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

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "活动ID")
    private Long activityId;

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

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

    @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 discountMoney;

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

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

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

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

    @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 = "删除状态")
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(value = "创建时间")
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    private Date updatedTime;

    @ApiModelProperty(value = "创建人ID")
    private Integer createdUserId;

    @ApiModelProperty(value = "修改人ID")
    private Integer updatedUserId;


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

}
