package com.qs.mp.admin.domain.param;

import com.qs.mp.common.enums.CouponDiscountTypeEnum;
import com.qs.mp.common.enums.CouponDistributeTypeEnum;
import com.qs.mp.common.enums.CouponStatusEnum;
import com.qs.mp.common.enums.CouponTypeEnum;
import com.qs.mp.common.enums.CouponUseAreaEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

/**
 * @describe 优惠券实体类
 * @auther quanshu
 * @create 2022-03-07 20:43:44
 */
@ApiModel(value = "添加、编辑优惠券参数")
@Data
public class CouponParam {

  /**
   * 主键
   */
  @ApiModelProperty(value = "代金券ID", required = false)
  private String couponId;

  /**
   * 标题
   */
  @NotNull(message = "代金券名称不能为空")
  @ApiModelProperty(value = "代金券名称", required = true)
  private String title;

  /**
   * 类型;1用户盲票购买优惠券、2用户门店消费优惠券、3经销商盲票采购优惠券
   */
  @ApiModelProperty(value = "代金券类型", required = false)
  private CouponTypeEnum type;

  /**
   * 图片
   */
  @ApiModelProperty(value = "代金券图片", required = false)
  private String picUrl;

  /**
   * 使用说明
   */
  @ApiModelProperty(value = "使用说明", required = false)
  private String description;

  /**
   * 优惠类型;1代金券(默认)、2折扣券、3兑换券
   */
  @ApiModelProperty(value = "优惠类型;1代金券、2折扣券、3兑换券", required = false)
  private CouponDiscountTypeEnum discountType;

  /**
   * 优惠金额（比例）面值
   */
  @NotNull(message = "面值不能为空")
  @ApiModelProperty(value = "优惠金额", required = true)
  private Integer discount;

  /**
   * 最低消费金额
   */
  @ApiModelProperty(value = "最低消费金额", required = false)
  private Integer minOrderAmt;

  /**
   * 渠道代金券，渠道承担比例
   */
  @ApiModelProperty(value = "渠道代金券，渠道承担比例", required = true)
  private Integer channelSharedRate;


  /**
   * 状态;off下架 on正常
   */
  @ApiModelProperty(value = "状态", required = false)
  private CouponStatusEnum status;

  /**
   * 使用范围;0通用 1生成券时指定范围 2发放时动态指定范围
   */
  @ApiModelProperty(value = "使用范围", required = true)
  private CouponUseAreaEnum useArea;

  /**
   * 发放方式;1系统发放(默认) 2用户主动领取
   */
  @ApiModelProperty(value = "发放方式", required = false)
  private CouponDistributeTypeEnum distributeType;

  /**
   * 叠加使用;0不允许 1允许
   */
  @ApiModelProperty(value = "叠加使用", required = false)
  private Integer compositeUse;

  /**
   * 有效期天数;从领券后开始多少天有效，0则使用绝对有效期
   */
  @NotNull(message = "有效期天数不能为空")
  @ApiModelProperty(value = "有效期天数", required = false)
  private Integer dueDays;

  @ApiModelProperty(value = "盲票购买优惠券使用范围限制实体类列表", required = false)
  private String boxIds;


  @ApiModelProperty("排除的优惠券id列表")
  private List<Long> excludeCouponIds;


}
