Skip to content

Commit df1f8ff

Browse files
committed
feat: create request struct for CNJ code search using pagination feature
1 parent 86a1b31 commit df1f8ff

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package models
2+
3+
type BodyRequestCodeNextPage struct {
4+
Size int `json:"size"`
5+
Query Query `json:"query"`
6+
Sort []Sort `json:"sort"`
7+
SearchAfter []int64 `json:"search_after"`
8+
}
9+
10+
type BodyRequestCode struct {
11+
Size int `json:"size"`
12+
Query Query `json:"query"`
13+
Sort []Sort `json:"sort"`
14+
}
15+
16+
type Query struct {
17+
Bool Bool `json:"bool"`
18+
}
19+
20+
type Bool struct {
21+
Must []Must `json:"must"`
22+
}
23+
24+
type Must struct {
25+
Match Match `json:"match"`
26+
}
27+
28+
type Match struct {
29+
ClasseCodigo int `json:"classe.codigo,omitempty"`
30+
OrgaoJulgadorCodigo int `json:"orgaoJulgador.codigo,omitempty"`
31+
}
32+
33+
type Sort struct {
34+
Timestamp `json:"@timestamp"`
35+
}
36+
37+
type Timestamp struct {
38+
Order string `json:"order"`
39+
}

0 commit comments

Comments
 (0)