| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- package com.cyksj.model.entity;
- import com.baomidou.mybatisplus.annotation.TableLogic;
- import lombok.Getter;
- import lombok.Setter;
- import javax.validation.constraints.NotEmpty;
- import javax.validation.constraints.NotNull;
- import java.math.BigDecimal;
- import java.util.Date;
- /*
- *项目名: netflix
- *文件名: Coupon
- *创建者: JavaZou
- *创建时间:2022/11/17 15:49
- */
- @Getter
- @Setter
- public class Coupon extends BaseEntity {
- /**
- * 优惠券名称
- */
- @NotEmpty(message = "优惠券名称不能为空")
- private String name;
- /**
- * 优惠券分类id
- */
- private Long classificationId;
- /**
- * 优惠券平台类型
- */
- @NotNull(message = "优惠券平台类型不能为空")
- private GoodsType goodsType;
- /**
- * 优惠券类型
- */
- @NotNull(message = "优惠券类型不能为空")
- private Type type;
- /**
- * 可用满减卷金额条件
- */
- private BigDecimal reduceCondition;
- /**
- * 抵扣金额
- */
- private BigDecimal reduceMoney;
- /**
- * 折扣
- */
- private BigDecimal discount;
- /**
- * 领取人范围
- */
- @NotNull(message = "领取人不能为空")
- private Scope scope;
- /**
- * 平台规格集合
- */
- @NotEmpty
- private String goodsSkuIds;
- /**
- * 是否是有效时间
- */
- private Boolean isValidTime;
- /**
- * 起始有效时间
- */
- private Date validStartTime;
- /**
- * 截止有效时间
- */
- private Date validEndTime;
- /**
- * 领取有效天数
- */
- private Integer validDays;
- /**
- * 领取有效小时
- */
- private Integer validHours;
- /**
- * 使用范围
- */
- private UseScope useScope;
- /**
- * 兑换码
- */
- private String exCode;
- /**
- * 发放状态
- */
- private Boolean sendStatus;
- /**
- * 推荐状态
- */
- private Boolean hotStatus;
- @TableLogic(value = "1", delval = "0")
- private Boolean deleted;
- @Getter
- public enum GoodsType {
- realGoods("实物"),
- virtualGoods("虚物"),
- ;
- String type;
- GoodsType(String type) {
- this.type = type;
- }
- }
- @Getter
- public enum Type {
- reduce("立减卷"),
- discount("折扣卷"),
- ;
- String desc;
- Type(String desc) {
- this.desc = desc;
- }
- }
- @Getter
- public enum Scope {
- everyone("所有人"),
- newUser("新用户"),
- ;
- String desc;
- Scope(String desc) {
- this.desc = desc;
- }
- }
- @Getter
- public enum UseScope {
- orders("下单可用"),
- renew("续费可用"),
- all("所有")
- ;
- String desc;
- UseScope(String desc) {
- this.desc = desc;
- }
- }
- @Getter
- @Setter
- public static class CouponGoodsSku {
- private Long goodsId;
- private Long skuId;
- }
- }
|