package shop.alien.entity.store;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 活动规则表
 * </p>
 *
 * @author ssk
 * @since 2025-05-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="StoreActivityRule对象", description="活动规则表")
public class StoreActivityRule extends Model<StoreActivityRule> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    @ApiModelProperty(value = "删除状态")
    @TableField("delete_flag")
    @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;


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

}
