package shop.alien.entity.store.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import shop.alien.entity.store.LifeDiscountCouponQuantumRules;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 门店优惠券入参 DTO，对应表 {@code life_discount_coupon}（满减/折扣券模板）。<br/>
 * 与代金券表 {@code life_coupon} 无关；代金券请走其它业务接口。
 * </p>
 *
 * @author ssk
 * @since 2025-02-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "LifeDiscountCouponDto", description = "门店优惠券入参（life_discount_coupon，满减/折扣）。门店接口不生成 life_coupon 代金券。")
public class LifeDiscountCouponDto {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "优惠券id")
    private String couponId;

    @ApiModelProperty(value = "商铺id")
    private String storeId;

    @ApiModelProperty(value = "券名称")
    private String name;

    @ApiModelProperty(value = "面值")
    private BigDecimal nominalValue;

    @ApiModelProperty(value = "有效期（天）")
    private Integer expirationDate;

    @ApiModelProperty(value = "领取后是否长期有效：0-否，1-是")
    private Integer longTermValid;

    @ApiModelProperty(value = "开始日期")
    private LocalDate startDate;

    @ApiModelProperty(value = "结束日期")
    private LocalDate endDate;

    @ApiModelProperty(value = "库存（优惠券数量）")
    private Integer singleQty;

    @ApiModelProperty(value = "发行数量是否不限：0-否，1-是")
    private Integer unlimitedQty;

    @ApiModelProperty(value = "补充说明")
    private String supplementaryInstruction;

    @ApiModelProperty(value = "领取状态：0：关闭领取，1：开启领取")
    private Integer getStatus;

    @ApiModelProperty(value = "限制领取数量")
    private Integer restrictedQuantity;

    @ApiModelProperty(value = "最低消费")
    private BigDecimal minimumSpendingAmount;

    @ApiModelProperty(value = "业务大类：门店新增接口请固定为 1（优惠券）；勿传 2/3（其它端）或误当作代金券")
    private Integer type;

    @ApiModelProperty(value = "收藏可领（0：否，1：是）")
    private Integer attentionCanReceived;

    @ApiModelProperty(value = "周中禁用规则")
    private List<String> weeklyDisabledList;

    @ApiModelProperty(value = "节假日禁用规则")
    private List<String> holidayDisabledList;

    @ApiModelProperty(value = "指定天数")
    private String specifiedDay;

    @ApiModelProperty(value = "是否可以叠加其他优惠券使用，0，是，1否")
    private Integer isOverlay;

    @ApiModelProperty(value = "是否通用，0，是，1否")
    private Integer isCommon;

    @ApiModelProperty(value = "指定时间段可用")
    private List<LifeDiscountCouponQuantumRules> availableTimeQuantum;

    @ApiModelProperty(value = "自定义时间段不可用")
    private List<LifeDiscountCouponQuantumRules> customizeUnavailableTimeQuantum;

    @ApiModelProperty(value = "优惠券领取规则  每日一领：day，每周一领：week，每月一领：month，每年一领：year，自定义：customize")
    private String claimRule;

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

    @ApiModelProperty(value = "适用范围，0，适用，1不适用")
    private Integer applicationScope;

    @ApiModelProperty(value = "适用范围内容")
    private String applicationScopeValue;

    @ApiModelProperty(value = "开始领取时间")
    private LocalDate beginGetDate;

    @ApiModelProperty(value = "结束领取时间")
    private LocalDate endGetDate;

    @ApiModelProperty(value = "优惠券状态：0：草稿，1：正式")
    private Integer couponStatus;

    @ApiModelProperty(value = "优惠券类型：1-满减券，2-折扣券")
    private Integer couponType;

    @ApiModelProperty(value = "折扣率（0-100，用于折扣券，例如80表示8折）")
    private BigDecimal discountRate;
}
