package com.fzm.mall.server.admin.marketing.entity.dto;

import com.fzm.mall.server.admin.constant.MallResponseError;
import com.fzm.mall.server.admin.goods_center.entity.dto.CategoryDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 商品优惠券
 * </p>
 *
 * @author fzm
 * @since 2021-04-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Coupon新增对象", description = "商品优惠券")
public class CouponSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "类型  1:满减  2:直减  3: 满折  4:折扣   5:旅游消费", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer type;

    @ApiModelProperty(value = "优惠券名称", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String name;

    @ApiModelProperty(value = "描述", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String remark;

    @ApiModelProperty(value = "活动范围 1.全部 2.APP 3.PC 4.微信小程序", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer scope;

    @ApiModelProperty(value = "范围类型1: 全部  2: 指定类目  3: 指定商品", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Integer rangeType;

    @ApiModelProperty(value = "优惠券条件值", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal conditionVal;

    @ApiModelProperty(value = "优惠值-面值", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal couponVal;

    @ApiModelProperty(value = "优惠券兑换价格（仅旅游消费）", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private BigDecimal exchangePrice;

    @ApiModelProperty(value = "发行量  为0表示发行量没有上限", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Long circulation;

    @ApiModelProperty(value = "商户id")
    private String merchantId;

    @ApiModelProperty(value = "开始时间", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Long startTime;

    @ApiModelProperty(value = "结束时间", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Long endTime;

    @ApiModelProperty(value = "优惠券对应的规格商品")
    private List<CouponSkuDTO> couponSkuList;

    @ApiModelProperty(value = "优惠券对应的商品类目")
    private List<CategoryDTO> categoryList;
}
