2
2
3
3
import com .fasterxml .jackson .annotation .JsonFormat ;
4
4
import com .fasterxml .jackson .annotation .JsonInclude ;
5
+ import com .fasterxml .jackson .annotation .JsonProperty ;
6
+ import lombok .AllArgsConstructor ;
7
+ import lombok .Data ;
8
+ import lombok .NoArgsConstructor ;
5
9
6
10
import java .util .Date ;
7
11
12
+ @ Data
13
+ @ AllArgsConstructor
14
+ @ NoArgsConstructor
8
15
@ JsonInclude (JsonInclude .Include .NON_EMPTY )
9
16
public class ModelSearchParams extends Pagination {
10
17
@@ -18,123 +25,19 @@ public class ModelSearchParams extends Pagination{
18
25
19
26
protected String description ;
20
27
21
- protected Boolean isActive ;
28
+ @ JsonProperty ("isActive" )
29
+ protected Boolean active ;
22
30
23
- protected Boolean isExpired ;
31
+ @ JsonProperty ("isExpired" )
32
+ protected Boolean expired ;
24
33
25
- protected Boolean isRecommended ;
34
+ @ JsonProperty ("isRecommended" )
35
+ protected Boolean recommended ;
26
36
27
37
@ JsonFormat (shape = JsonFormat .Shape .STRING , pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS" )
28
38
protected Date lastActiveDateTime ;
29
39
30
40
@ JsonFormat (shape = JsonFormat .Shape .STRING , pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS" )
31
41
protected Date expirationDateTime ;
32
42
33
- public ModelSearchParams (){
34
- super ();
35
- this .perPage = 1000 ;
36
- }
37
-
38
- public ModelSearchParams (
39
- String modelId , String author , String createdByEmail , String name ,
40
- String description , Boolean isActive , Boolean isExpired , Boolean isRecommended ,
41
- Date lastActiveDateTime , Date expirationDateTime ,
42
- Integer page , Integer perPage , String sortBy , String direction
43
- ) {
44
- this ();
45
- this .modelId = modelId ;
46
- this .author = author ;
47
- this .createdByEmail = createdByEmail ;
48
- this .name = name ;
49
- this .description = description ;
50
- this .isActive = isActive ;
51
- this .isExpired = isExpired ;
52
- this .isRecommended = isRecommended ;
53
- this .lastActiveDateTime = lastActiveDateTime ;
54
- this .expirationDateTime = expirationDateTime ;
55
- this .page = page ;
56
- this .perPage = perPage ;
57
- this .sortBy = sortBy ;
58
- this .direction = direction ;
59
- }
60
-
61
- public String getModelId () {
62
- return modelId ;
63
- }
64
-
65
- public void setModelId (String modelId ) {
66
- this .modelId = modelId ;
67
- }
68
-
69
- public String getAuthor () {
70
- return author ;
71
- }
72
-
73
- public void setAuthor (String author ) {
74
- this .author = author ;
75
- }
76
-
77
- public String getCreatedByEmail () {
78
- return createdByEmail ;
79
- }
80
-
81
- public void setCreatedByEmail (String createdByEmail ) {
82
- this .createdByEmail = createdByEmail ;
83
- }
84
-
85
- public String getName () {
86
- return name ;
87
- }
88
-
89
- public void setName (String name ) {
90
- this .name = name ;
91
- }
92
-
93
- public String getDescription () {
94
- return description ;
95
- }
96
-
97
- public void setDescription (String description ) {
98
- this .description = description ;
99
- }
100
-
101
- public Boolean getActive () {
102
- return isActive ;
103
- }
104
-
105
- public void setActive (Boolean active ) {
106
- isActive = active ;
107
- }
108
-
109
- public Boolean getExpired () {
110
- return isExpired ;
111
- }
112
-
113
- public void setExpired (Boolean expired ) {
114
- isExpired = expired ;
115
- }
116
-
117
- public Boolean getRecommended () {
118
- return isRecommended ;
119
- }
120
-
121
- public void setRecommended (Boolean recommended ) {
122
- isRecommended = recommended ;
123
- }
124
-
125
- public Date getLastActiveDateTime () {
126
- return lastActiveDateTime ;
127
- }
128
-
129
- public void setLastActiveDateTime (Date lastActiveDateTime ) {
130
- this .lastActiveDateTime = lastActiveDateTime ;
131
- }
132
-
133
- public Date getExpirationDateTime () {
134
- return expirationDateTime ;
135
- }
136
-
137
- public void setExpirationDateTime (Date expirationDateTime ) {
138
- this .expirationDateTime = expirationDateTime ;
139
- }
140
43
}
0 commit comments