1 package org.oxerr.youzan.dto.item;
2
3 import java.io.Serializable;
4 import java.math.BigDecimal;
5 import java.time.Instant;
6
7 import org.oxerr.youzan.dto.deserializer.InstantDeserializer;
8
9 import com.fasterxml.jackson.annotation.JsonProperty;
10 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
11
12
13
14
15
16 public class TradePromotion implements Serializable {
17
18 private static final long serialVersionUID = 2016062001L;
19
20
21
22
23
24
25
26
27
28
29
30 private String promotionType;
31
32
33
34
35 private Instant usedAt;
36
37
38
39
40 private String promotionName;
41
42
43
44
45 private String promotionCondition;
46
47
48
49
50 private Long promotionId;
51
52
53
54
55 private BigDecimal discountFee;
56
57 public TradePromotion() {
58 }
59
60 public TradePromotion(
61 @JsonProperty("promotion_type") String promotionType,
62 @JsonProperty("used_at")
63 @JsonDeserialize(using = InstantDeserializer.class)
64 Instant usedAt,
65 @JsonProperty("promotion_name") String promotionName,
66 @JsonProperty("promotion_condition") String promotionCondition,
67 @JsonProperty("promotion_id") Long promotionId,
68 @JsonProperty("discount_fee") BigDecimal discountFee
69 ) {
70 this.promotionType = promotionType;
71 this.usedAt = usedAt;
72 this.promotionName = promotionName;
73 this.promotionCondition = promotionCondition;
74 this.promotionId = promotionId;
75 this.discountFee = discountFee;
76 }
77
78 public String getPromotionType() {
79 return promotionType;
80 }
81
82 public void setPromotionType(String promotionType) {
83 this.promotionType = promotionType;
84 }
85
86 public Instant getUsedAt() {
87 return usedAt;
88 }
89
90 public void setUsedAt(Instant usedAt) {
91 this.usedAt = usedAt;
92 }
93
94 public String getPromotionName() {
95 return promotionName;
96 }
97
98 public void setPromotionName(String promotionName) {
99 this.promotionName = promotionName;
100 }
101
102 public String getPromotionCondition() {
103 return promotionCondition;
104 }
105
106 public void setPromotionCondition(String promotionCondition) {
107 this.promotionCondition = promotionCondition;
108 }
109
110 public Long getPromotionId() {
111 return promotionId;
112 }
113
114 public void setPromotionId(Long promotionId) {
115 this.promotionId = promotionId;
116 }
117
118 public BigDecimal getDiscountFee() {
119 return discountFee;
120 }
121
122 public void setDiscountFee(BigDecimal discountFee) {
123 this.discountFee = discountFee;
124 }
125
126 }