package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 商户动态折扣
 *
 * @author ssk
 * @since 2025-03-18
 */
@Data
@ApiModel(value = "StoreDynamicDiscount对象", description = "商户动态折扣")
public class StoreDynamicDiscount extends Model<StoreDynamicDiscount> {

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

    @ApiModelProperty(value = "门店ID")
    @TableField("store_id")
    private Integer storeId;

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

    @ApiModelProperty(value = "活动名称")
    @TableField("activity_name")
    private String activityName;

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

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

    @ApiModelProperty(value = "审核状态, 0:待审核, 1:已通过, 2:已拒绝")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "图片id")
    @TableField("img_id")
    private Integer imgId;

    @ApiModelProperty(value = "团购类型, 1:邀请好友,")
    @TableField("group_type")
    private Integer groupType;

    @ApiModelProperty(value = "限制时间, 单位小时")
    @TableField("limit_time")
    private Integer limitTime;

    @ApiModelProperty(value = "邀请人数")
    @TableField("invited_count")
    private Integer invitedCount;

    @ApiModelProperty(value = "限领次数")
    @TableField("limit_count")
    private Integer limitCount;

    @ApiModelProperty(value = "折扣比例")
    @TableField("discount_percent")
    private Integer discountPercent;

    @ApiModelProperty(value = "活动人群, 0:所有人, 逗号分割id:固定人群")
    @TableField("activity_crowd")
    private String activityCrowd;

    @ApiModelProperty(value = "折扣适用范围, 0:堂食, 1外卖")
    @TableField("discount_range")
    private Integer discountRange;

    @ApiModelProperty(value = "具体规则")
    @TableField("rule_detail")
    private String ruleDetail;

    @ApiModelProperty(value = "拒绝原因")
    @TableField("refuse_reson")
    private String refuseReson;

    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;

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

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

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

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

}
