LuckyDraw.java 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. package com.cyksj.model.entity;
  2. import lombok.Getter;
  3. import lombok.Setter;
  4. import javax.validation.constraints.NotEmpty;
  5. import javax.validation.constraints.NotNull;
  6. import java.math.BigDecimal;
  7. /*
  8. *项目名: netflix
  9. *文件名: LuckyDraw
  10. *创建者: JavaZou
  11. *创建时间:2022/12/27 15:57
  12. */
  13. @Getter
  14. @Setter
  15. public class LuckyDraw extends BaseEntity {
  16. @NotNull(message = "类型不能为空")
  17. private Type type;
  18. @NotEmpty(message = "奖品名称不能为空")
  19. private String name;
  20. private Integer points;
  21. private Long couponId;
  22. private Long goodsId;
  23. private Long skuId;
  24. private Integer days;
  25. private Integer cost;
  26. private Integer num;
  27. @NotEmpty(message = "奖品位置不能为空")
  28. private String position;
  29. @NotNull(message = "概率不能为空")
  30. private BigDecimal probability;
  31. private String picture;
  32. private LuckyDraw.DrawType drawType;
  33. private Boolean status;
  34. private Boolean deleted;
  35. @Getter
  36. public enum Type {
  37. points("积分"),
  38. coupon("优惠券"),
  39. realGoods("实物"),
  40. virtualGoods("虚物"),
  41. duration("车票时长"),
  42. ;
  43. String desc;
  44. Type(String desc) {
  45. this.desc = desc;
  46. }
  47. }
  48. @Getter
  49. public enum DrawType {
  50. normal("普通奖池"),
  51. specific("特定奖池"),
  52. ;
  53. String desc;
  54. DrawType(String desc) {
  55. this.desc = desc;
  56. }
  57. }
  58. }