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 PromotionUpdateDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "促销编号", required = true)
    @NotBlank(message = MallResponseError.NULL_PARAM_ERROR)
    private String promotionId;

    @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 = "状态 0->不可用;1->进行中;2->未开始;3->已结束")
    private Integer status;

    @ApiModelProperty(value = "更新时间", required = true)
    @NotNull(message = MallResponseError.NULL_PARAM_ERROR)
    private Long updateTime;

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

    @ApiModelProperty(value = "商品促销规则")
    private PromotionRuleUpdateDTO promotionRule;

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

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