|
| 1 | +package models |
| 2 | + |
| 3 | +import "time" |
| 4 | + |
| 5 | +type ResponseBody struct { |
| 6 | + Took int `json:"took"` |
| 7 | + TimedOut bool `json:"timed_out"` |
| 8 | + Shards Shard `json:"_shards"` |
| 9 | + Hit Hit `json:"hits"` |
| 10 | +} |
| 11 | + |
| 12 | +type Shard struct { |
| 13 | + Total int `json:"total"` |
| 14 | + Successful int `json:"successful"` |
| 15 | + Skipped int `json:"skipped"` |
| 16 | + Failed int `json:"failed"` |
| 17 | +} |
| 18 | + |
| 19 | +type Hit struct { |
| 20 | + Total Total `json:"total"` |
| 21 | + MaxScore float64 `json:"max_score"` |
| 22 | + Hits []Hit2 `json:"hits"` |
| 23 | +} |
| 24 | + |
| 25 | +type Total struct { |
| 26 | + Value int `json:"value"` |
| 27 | + Relation string `json:"relation"` |
| 28 | +} |
| 29 | + |
| 30 | +type Hit2 struct { |
| 31 | + Index string `json:"_index"` |
| 32 | + Type string `json:"_type"` |
| 33 | + Id string `json:"_id"` |
| 34 | + Score float64 `json:"_score"` |
| 35 | + Source Source `json:"_source"` |
| 36 | +} |
| 37 | + |
| 38 | +type Source struct { |
| 39 | + LawsuitNumber string `json:"numeroProcesso"` |
| 40 | + Class Class `json:"classe"` |
| 41 | + System System `json:"sistema"` |
| 42 | + Format Format `json:"formato"` |
| 43 | + Court string `json:"tribunal"` |
| 44 | + DateLastUpdate time.Time `json:"dataHoraUltimaAtualizacao"` |
| 45 | + Degree string `json:"grau"` |
| 46 | + Timestamp time.Time `json:"@timestamp"` |
| 47 | + DistributionDate time.Time `json:"dataAjuizamento"` |
| 48 | + Movements []Movement `json:"movimentos"` |
| 49 | + Id string `json:"id"` |
| 50 | + SecrecyLevel int `json:"nivelSigilo"` |
| 51 | + CourtInstance Court `json:"orgaoJulgador"` |
| 52 | + Subjects []Subject `json:"assuntos"` |
| 53 | +} |
| 54 | + |
| 55 | +type Class struct { |
| 56 | + Code int `json:"codigo"` |
| 57 | + Name string `json:"nome"` |
| 58 | +} |
| 59 | + |
| 60 | +type System struct { |
| 61 | + Code int `json:"codigo"` |
| 62 | + Name string `json:"nome"` |
| 63 | +} |
| 64 | + |
| 65 | +type Format struct { |
| 66 | + Code int `json:"codigo"` |
| 67 | + Name string `json:"nome"` |
| 68 | +} |
| 69 | + |
| 70 | +type Movement struct { |
| 71 | + Complement []Complement `json:"complementosTabelados,omitempty"` |
| 72 | + Code int `json:"codigo"` |
| 73 | + Name string `json:"nome"` |
| 74 | + DateTime time.Time `json:"dataHora"` |
| 75 | +} |
| 76 | + |
| 77 | +type Complement struct { |
| 78 | + Code int `json:"codigo"` |
| 79 | + Value int `json:"valor"` |
| 80 | + Name string `json:"nome"` |
| 81 | + Description string `json:"descricao"` |
| 82 | +} |
| 83 | + |
| 84 | +type Court struct { |
| 85 | + CountyCodeIBGE int `json:"codigoMunicipioIBGE"` |
| 86 | + Code int `json:"codigo"` |
| 87 | + Name string `json:"nome"` |
| 88 | +} |
| 89 | + |
| 90 | +type Subject struct { |
| 91 | + Code int `json:"codigo"` |
| 92 | + Name string `json:"nome"` |
| 93 | +} |
0 commit comments