| package com.mzl.flower.dto.request.coupon; | 
|   | 
|   | 
| import com.fasterxml.jackson.annotation.JsonFormat; | 
| import io.swagger.annotations.ApiModelProperty; | 
| import lombok.Data; | 
| import org.springframework.format.annotation.DateTimeFormat; | 
|   | 
| import javax.validation.constraints.*; | 
| import java.math.BigDecimal; | 
| import java.time.LocalDateTime; | 
|   | 
| @Data | 
| public class CreateCouponTemplateActivyDTO { | 
|   | 
|     @ApiModelProperty(value = "id") | 
|     private String id; | 
|   | 
|     /** | 
|      * 优惠券名称 | 
|      */ | 
|     @ApiModelProperty(value = "couponName") | 
|     @NotEmpty(message = "优惠券名称不能为空") | 
|     private String couponName; | 
|   | 
|     /** | 
|      * 优惠券类型(COUPON_TYPE)满减和无门槛 | 
|      */ | 
|     @ApiModelProperty(value = "优惠券类型(COUPON_TYPE)") | 
|     @NotEmpty(message = "优惠券类型不能为空(COUPON_TYPE)") | 
|     private String couponDiscountType; | 
|   | 
|     /** | 
|      * 领取渠道(COUPON_GET_TYPE)首页弹窗、活动入口、领券中心 | 
|      */ | 
|     @ApiModelProperty(value = "领取渠道(COUPON_GET_TYPE)") | 
|     @NotEmpty(message = "领取渠道不能为空(COUPON_GET_TYPE)") | 
|     private String getType; | 
|   | 
|   | 
|     /** | 
|      * 优惠券描述(使用规则) | 
|      */ | 
|     @ApiModelProperty(value = "使用规则") | 
|     @NotEmpty(message = "使用规则不能为空") | 
|     private String couponDescription; | 
|   | 
|   | 
|     /** | 
|      * 领取开始时间 | 
|      */ | 
|     @ApiModelProperty(value = "领取开始时间") | 
|     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8") | 
|     @DateTimeFormat | 
|     @NotNull(message = "领取开始时间不能为空") | 
|     private LocalDateTime getStartDate; | 
|   | 
|     /** | 
|      * 领取结束时间 | 
|      */ | 
|     @ApiModelProperty(value = "领取结束时间") | 
|     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8") | 
|     @DateTimeFormat | 
|     @NotNull(message = "领取结束时间不能为空") | 
|     private LocalDateTime getEndDate; | 
|   | 
|   | 
|     /** | 
|      * 使用时间类型(COUPON_USAGE_TYPE)与领取时间一致、固定时间、领取后有效 | 
|      */ | 
|     @ApiModelProperty(value = "使用时间类型(COUPON_USAGE_TYPE)") | 
|     @NotEmpty(message = "使用时间类型不能为空(COUPON_USAGE_TYPE)") | 
|     private String usageType; | 
|   | 
|   | 
|     /** | 
|      * 领取后有效类型(COUPON_usage_time_type)天、小时、分钟 | 
|      */ | 
|     @ApiModelProperty(value = "领取后有效类型 (COUPON_USAGE_TIME_TYPE)") | 
|     private String usageTimeType; | 
|   | 
|     /** | 
|      * 领取后有效时间整数,比如90(天,小时,分钟) | 
|      */ | 
|     @ApiModelProperty(value = "领取后有效时间整数") | 
|     @Min(value = 1,message = "领取后有效时间必须大于等于1") | 
|     @Max(value = 99999999,message = "领取后有效时间不能超过99999999") | 
|     private Integer usageTimeNum; | 
|   | 
|   | 
|     /** | 
|      * 使用开始时间 | 
|      */ | 
|     @ApiModelProperty(value = "使用时间-固定时间-开始日期") | 
|     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8") | 
|     @DateTimeFormat | 
|     private LocalDateTime usageStartDate; | 
|   | 
|     /** | 
|      * 使用结束时间 | 
|      */ | 
|     @ApiModelProperty(value = "使用时间-固定时间-结束日期") | 
|     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8") | 
|     @DateTimeFormat | 
|     private LocalDateTime usageEndDate; | 
|   | 
|   | 
|     /** | 
|      * 使用条件,最小订单金额(可选)=》使用条件 | 
|      */ | 
|     @ApiModelProperty(value = "使用条件,满多少钱") | 
|     @NotNull(message = "使用条件不能为空") | 
|     @Max(value = 99999999,message = "使用条件不能超过99999999") | 
| //    @DecimalMin(value = "0.01", inclusive = true,message = "使用条件大于0") | 
|     private BigDecimal minOrderAmount; | 
|   | 
|     /** | 
|      * 优惠券面值  折扣值(百分比或金额) | 
|      */ | 
|     @ApiModelProperty(value = "优惠券面值") | 
|     @NotNull(message = "优惠券面值不能为空") | 
|     @DecimalMin(value = "0.01", inclusive = true,message = "优惠券面值大于0") | 
|     @Max(value = 99999999,message = "优惠券面值不能超过99999999") | 
|     private BigDecimal couponDiscountValue; | 
|   | 
|   | 
|   | 
|     /** | 
|      * 发放数量 | 
|      */ | 
|     @ApiModelProperty(value = "发放数量") | 
|     @NotNull(message = "发放数量不能为空") | 
|     @Min(value = 1,message = "发放数量必须大于0") | 
|     @Max(value = 99999999,message = "库存数量不能超过99999999") | 
|     private Integer couponAmount; | 
|   | 
|   | 
|     /** | 
|      * 每人限领 | 
|      */ | 
|     @ApiModelProperty(value = "每人限领") | 
|     @NotNull(message = "每人限领不能为空") | 
|     @Min(value = 1,message = "每人限领必须大于0") | 
|     @Max(value = 99999999,message = "每人限领不能超过99999999") | 
|     private Integer getLimit; | 
|   | 
|     /** | 
|      * 优惠券图片 | 
|      */ | 
|     @ApiModelProperty(value = "优惠券图片") | 
|     private String imageUrl; | 
|   | 
| } |