Skip to content

Commit 3f82dd5

Browse files
committed
feat: create response struct for CNJ code search using pagination feature
1 parent df1f8ff commit 3f82dd5

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package models
2+
3+
import "time"
4+
5+
type ResponseBodyNextPage struct {
6+
Took int `json:"took"`
7+
TimedOut bool `json:"timed_out"`
8+
Shards Shard `json:"_shards"`
9+
Hit HitNextPage `json:"hits"`
10+
}
11+
12+
type HitNextPage struct {
13+
Total Total `json:"total"`
14+
MaxScore float64 `json:"max_score"`
15+
Hits []Hit2NextPage `json:"hits"`
16+
}
17+
18+
type Hit2NextPage struct {
19+
Index string `json:"_index"`
20+
Type string `json:"_type"`
21+
Id string `json:"_id"`
22+
Score float64 `json:"_score"`
23+
Source SourceNextPage `json:"_source"`
24+
Sort []int64 `json:"sort"`
25+
}
26+
27+
type SourceNextPage struct {
28+
Class Class `json:"classe"`
29+
LawsuitNumber string `json:"numeroProcesso"`
30+
System System `json:"sistema"`
31+
Format Format `json:"formato"`
32+
Court string `json:"tribunal"`
33+
DateLastUpdate time.Time `json:"dataHoraUltimaAtualizacao"`
34+
Degree string `json:"grau"`
35+
Timestamp time.Time `json:"@TimestampCode"`
36+
DistributionDate time.Time `json:"dataAjuizamento"`
37+
Movements []Movement `json:"movimentos"`
38+
Id string `json:"id"`
39+
SecrecyLevel int `json:"nivelSigilo"`
40+
CourtInstance Court `json:"orgaoJulgador"`
41+
Subjects []Subject `json:"assuntos"`
42+
}

0 commit comments

Comments
 (0)