StoreProductAddRequest.java 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. package dto;
  2. import com.baomidou.mybatisplus.annotation.TableName;
  3. import io.swagger.annotations.ApiModel;
  4. import io.swagger.annotations.ApiModelProperty;
  5. import lombok.Data;
  6. import lombok.EqualsAndHashCode;
  7. import lombok.experimental.Accessors;
  8. import org.hibernate.validator.constraints.Length;
  9. import javax.validation.constraints.NotBlank;
  10. import javax.validation.constraints.NotEmpty;
  11. import javax.validation.constraints.NotNull;
  12. import java.io.Serializable;
  13. import java.math.BigDecimal;
  14. import java.util.List;
  15. @Data
  16. @EqualsAndHashCode(callSuper = false)
  17. @Accessors(chain = true)
  18. @TableName("eb_store_product")
  19. @ApiModel(value = "StoreProductAddRequest对象", description = "商品添加对象")
  20. public class StoreProductAddRequest implements Serializable {
  21. private static final long serialVersionUID = -452373239606480650L;
  22. @ApiModelProperty(value = "商品id|添加时不填,修改时必填")
  23. private Long id;
  24. @ApiModelProperty(value = "商品图片", required = true)
  25. @NotBlank(message = "商品图片不能为空")
  26. @Length(max = 255, message = "商品图片名称长度不能超过255个字符")
  27. private String image;
  28. @ApiModelProperty(value = "轮播图", required = true)
  29. @NotBlank(message = "轮播图不能为空")
  30. @Length(max = 2000, message = "轮播图名称长度不能超过2000个字符")
  31. private String sliderImage;
  32. @ApiModelProperty(value = "商品名称", required = true)
  33. @NotBlank(message = "商品名称不能为空")
  34. @Length(max = 128, message = "商品名称长度不能超过128个字符")
  35. private String storeName;
  36. @ApiModelProperty(value = "商品简介", required = true)
  37. // @NotBlank(message = "商品简介不能为空")
  38. @Length(max = 256, message = "商品简介长度不能超过256个字符")
  39. private String storeInfo;
  40. @ApiModelProperty(value = "关键字", required = true)
  41. @Length(max = 255, message = "关键字长度不能超过255个字符")
  42. // @NotBlank(message = "关键字不能为空")
  43. private String keyword;
  44. @ApiModelProperty(value = "分类id|逗号分隔", required = true)
  45. @NotBlank(message = "商品分类不能为空")
  46. @Length(max = 64, message = "商品分类组合长度不能超过64个字符")
  47. private String cateId;
  48. @ApiModelProperty(value = "单位名", required = true)
  49. // @NotBlank(message = "单位名称不能为空")
  50. @Length(max = 32, message = "单位名长度不能超过32个字符")
  51. private String unitName;
  52. @ApiModelProperty(value = "排序")
  53. private Integer sort;
  54. @ApiModelProperty(value = "是否热卖")
  55. private Integer isHot;
  56. @ApiModelProperty(value = "是否优惠")
  57. private Integer isBenefit;
  58. @ApiModelProperty(value = "是否精品")
  59. private Integer isBest;
  60. @ApiModelProperty(value = "是否新品")
  61. private Integer isNew;
  62. @ApiModelProperty(value = "是否优品推荐")
  63. private Integer isGood;
  64. @ApiModelProperty(value = "获得积分")
  65. private Integer giveIntegral;
  66. @ApiModelProperty(value = "是否单独分佣", required = true)
  67. // @NotNull(message = "是否单独分佣不能为空")
  68. private Integer isSub;
  69. @ApiModelProperty(value = "虚拟销量")
  70. private Integer ficti;
  71. @ApiModelProperty(value = "运费模板ID", required = true)
  72. // @NotNull(message = "运费模板不能为空")
  73. private Integer tempId;
  74. @ApiModelProperty(value = "规格 0单 1多", required = true)
  75. @NotNull(message = "商品规格类型不能为空")
  76. private Integer specType;
  77. @ApiModelProperty(value = "活动显示排序 0=默认,1=秒杀,2=砍价,3=拼团")
  78. private List<String> activity;
  79. @ApiModelProperty(value = "商品属性", required = true)
  80. @NotEmpty(message = "商品属性不能为空")
  81. private List<StoreProductAttrAddRequest> attr;
  82. @ApiModelProperty(value = "商品属性详情", required = true)
  83. @NotEmpty(message = "商品属性详情不能为空")
  84. private List<StoreProductAttrValueAddRequest> attrValue;
  85. @ApiModelProperty(value = "商品描述")
  86. private String content;
  87. @ApiModelProperty(value = "优惠券id集合")
  88. private List<Integer> couponIds;
  89. @ApiModelProperty(value = "展示图")
  90. @Length(max = 1000, message = "展示图名称长度不能超过1000个字符")
  91. private String flatPattern;
  92. @ApiModelProperty("品牌")
  93. private String itemBrand;
  94. @ApiModelProperty("货号")
  95. private String itemNumber;
  96. @ApiModelProperty("库存预警值")
  97. private Integer stockThreshold;
  98. @ApiModelProperty("供应商")
  99. private String itemSupplier;
  100. @ApiModelProperty(value = "状态 (0:未上架,1:上架)")
  101. private Integer isShow;
  102. @ApiModelProperty(value = "商品价格")
  103. private BigDecimal price;
  104. @ApiModelProperty(value = "市场价")
  105. private BigDecimal otPrice;
  106. @ApiModelProperty(value = "库存")
  107. private Integer stock;
  108. }