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 javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 商品促销
 * </p>
 *
 * @author wulixian
 * @since 2021-03-10
 */
@Data
@ApiModel(value = "Promotion新增对象", description = "商品促销")
public class PromotionSaveDTO 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 = "活动范围 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 = "描述")
    private String remark;

    @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 = "商户id")
    private String merchantId;

    @ApiModelProperty(value = "商品促销规则", required = true)
    private PromotionRuleSaveDTO promotionRule;

    @ApiModelProperty(value = "商品规格集合")
    private List<PromotionSkuSaveDTO> promotionSkuList;

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