Edit on GitHub

ecourts.entities.order

 1from dataclasses import dataclass
 2from entities.court import Court
 3from typing import Optional
 4from parsers.utils import parse_date
 5import datetime
 6from urllib.parse import urlencode
 7
 8
 9@dataclass
10class Order:
11    filename: str
12    """The filename of the order."""
13
14    judge: Optional[str] = ""
15    """The judge associated with the order."""
16
17    date: Optional[datetime.date] = None
18    """The date of the order."""
19
20    judgement: Optional[bool] = None
21    """Indicates if the order is a judgement."""
22
23    def __post_init__(self):
24        """
25        Post-initialization processing to parse date strings and clean case number.
26        """
27        if isinstance(self.date, str):
28            self.date = parse_date(self.date)
@dataclass
class Order:
10@dataclass
11class Order:
12    filename: str
13    """The filename of the order."""
14
15    judge: Optional[str] = ""
16    """The judge associated with the order."""
17
18    date: Optional[datetime.date] = None
19    """The date of the order."""
20
21    judgement: Optional[bool] = None
22    """Indicates if the order is a judgement."""
23
24    def __post_init__(self):
25        """
26        Post-initialization processing to parse date strings and clean case number.
27        """
28        if isinstance(self.date, str):
29            self.date = parse_date(self.date)
Order( filename: str, judge: Optional[str] = '', date: Optional[datetime.date] = None, judgement: Optional[bool] = None)
filename: str

The filename of the order.

judge: Optional[str] = ''

The judge associated with the order.

date: Optional[datetime.date] = None

The date of the order.

judgement: Optional[bool] = None

Indicates if the order is a judgement.