-
Notifications
You must be signed in to change notification settings - Fork 11
/
cases.py
64 lines (54 loc) · 1.71 KB
/
cases.py
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from datetime import date
from decimal import Decimal
from typing import Any, List, Optional
from pydantic import BaseModel, HttpUrl
class EvictionHearing(BaseModel):
"""
A hearing referenced in an eviction case docket.
May be a future or past hearing.
"""
hearing_date: str = "" # could become datetime.date
hearing_time: str = "" # could become datetime.time
hearing_officer: str = ""
appeared: Optional[bool] = None
hearing_type: str = ""
all_text: str = ""
class CaseEvent(BaseModel):
case_event_date: Optional[date]
served_date: str = ""
served_subject: str = ""
returned: str = ""
class EvictionCase(BaseModel):
"""A docketed eviction case."""
precinct_number: int
style: str
plaintiff: str
active_or_inactive: str # could become optional bool
judgment_after_moratorium: str # could become optional bool
defendants: str
attorneys_for_plaintiffs: str
attorneys_for_defendants: str
case_number: str
defendant_zip: str
plaintiff_zip: str
hearings: List[EvictionHearing]
status: str
type: str
register_url: Optional[HttpUrl]
disposition_type: str
disposition_amount: Optional[Decimal]
disposition_date: str
disposition_awarded_to: str
disposition_awarded_against: str
comments: str
writ: Optional[CaseEvent]
writ_of_possession_service: Optional[CaseEvent]
writ_of_possession_requested: Optional[CaseEvent]
writ_of_possession_sent_to_constable_office: Optional[CaseEvent]
writ_returned_to_court: Optional[CaseEvent]
judgement_for: str
match_score: str
date_filed: str
defendant_address: str = ""
defendant_race: str = ""
defendant_gender: str = ""