Skip to content

Commit

Permalink
search: add SourceID (to Entity) and AltNames (to Person)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Mar 12, 2024
1 parent 6b4400f commit eb75cb1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/search/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package search
import "time"

type Entity[T any] struct {
Name string `json:"name"`
Type EntityType `json:"entityType"`
Source SourceList `json:"sourceList"`
Name string `json:"name"`
Type EntityType `json:"entityType"`
Source SourceList `json:"sourceList"`
SourceID string `json:"sourceID"` // TODO(adam):

// TODO(adam): What has opensanctions done to normalize and join this data
// Review https://www.opensanctions.org/reference/
Expand Down Expand Up @@ -44,6 +45,7 @@ var (

type Person struct {
Name string `json:"name"`
AltNames []string `json:"altNames"`
Gender Gender `json:"gender"`
BirthDate *time.Time `json:"birthDate"`
DeathDate *time.Time `json:"deathDate"`
Expand Down
1 change: 1 addition & 0 deletions pkg/search/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestEntityJSON(t *testing.T) {
"name": "",
"entityType": "",
"sourceList": "",
"sourceID": "",
"person": null,
"business": null,
"organization": null,
Expand Down

0 comments on commit eb75cb1

Please sign in to comment.