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 lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 优惠券禁用规则表
 * </p>
 *
 * @author ssk
 * @since 2025-02-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "LifeDiscountCouponUnavailableRules对象", description = "优惠券禁用规则表")
public class LifeDiscountCouponUnavailableRules extends Model<LifeDiscountCouponUnavailableRules> {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "优惠券id")
    @TableField("discount_coupon_id")
    private Integer discountCouponId;

    @ApiModelProperty(value = "代金券id（life_coupon.id，代金券时使用）")
    @TableField("voucher_id")
    private String voucherId;

    @ApiModelProperty(value = "类型 默认0 代金券为1")
    @TableField("coupon_type")
    private Integer couponType;

    @ApiModelProperty(value = "禁用规则类型（周规则限制：weekday_unavailable，节日规则限制：holiday_unavailable）")
    @TableField("unavailable_rule_type")
    private String unavailableRuleType;

    @ApiModelProperty(value = "禁用规则值")
    @TableField("unavailable_rule_value")
    private String unavailableRuleValue;

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

    @ApiModelProperty(value = "自定义领取规则数量")
    @TableField("customize_value")
    private Integer customizeValue;

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

}
