File size: 1,327 Bytes
161d75f
 
 
 
 
 
 
a725af0
161d75f
 
 
a725af0
 
 
 
161d75f
 
a725af0
161d75f
 
 
995b526
a725af0
 
 
 
 
 
 
161d75f
 
 
995b526
a725af0
161d75f
 
 
a725af0
161d75f
 
 
 
 
 
 
 
 
 
 
a725af0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from pydantic import BaseModel, Field
from typing import Literal, Union, Optional, List

# --- Event follow-up classes ---

class AnimalCollectedEvent(BaseModel):
    type: Literal['animal collected']
    collected: Literal['yes', 'no']

class RecipientEvent(BaseModel):
    type: Literal['recipient']
    recipient: Literal['veterinary', 'care center', 
                                'local museum', 'national museum', 
                                'other']

class RadiographyEvent(BaseModel):
    type: Literal['radiography']
    radiography: Literal['yes', 'no', 'unknown']

class GivenAnswerEvent(BaseModel):
    type: Literal['given answer']
    answer: Literal[
        'nothing', 
        'complaint against x', 
        'complaint', 
        'police call', 
        'discussion with the speaker', 
        'press release', 
        'unknown'
    ]

class NameOfRecipientEvent(BaseModel):
    type: Literal['recipient name']
    name: str

class CollectionReferenceEvent(BaseModel):
    type: Literal['collection reference']
    reference: str

FollowUpEventType = Union[
    AnimalCollectedEvent,
    RecipientEvent,
    RadiographyEvent,
    GivenAnswerEvent,
    NameOfRecipientEvent,
    CollectionReferenceEvent
]

class FollowUpEvents(BaseModel):
    follow_up_events: Optional[List[FollowUpEventType]] = None