Skip to content

Commit

Permalink
feat: adds model for entityType stats endpoint
Browse files Browse the repository at this point in the history
BREAKING CHANGE: changes swagger definition of return shapes
  • Loading branch information
sennierer committed Aug 23, 2023
1 parent d1dd176 commit f8572dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions intavia_backend/models_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,13 @@ class StatisticsBins(BaseModel):
bins: list[Bin]


class StatsEntityType(BaseModel):
person: PositiveInt = Field(default=0, rdfconfig=FieldConfigurationRDF(path="personCount"))
place: PositiveInt = Field(default=0, rdfconfig=FieldConfigurationRDF(path="placeCount"))
group: PositiveInt = Field(default=0, rdfconfig=FieldConfigurationRDF(path="groupCount"))
culturalHeritageObject: PositiveInt = Field(default=0, rdfconfig=FieldConfigurationRDF(path="culturalHeritageObjectCount"))


EntityEventRelation.update_forward_refs()
Event.update_forward_refs()
Entity.update_forward_refs()
Expand Down

0 comments on commit f8572dc

Please sign in to comment.