HomeHarvest/homeharvest/core/scrapers/models.py

53 lines
1.0 KiB
Python
Raw Normal View History

2023-09-15 15:17:37 -07:00
from dataclasses import dataclass
from enum import Enum
class ListingType(Enum):
FOR_SALE = "for_sale"
FOR_RENT = "for_rent"
SOLD = "sold"
@dataclass
class Address:
address_one: str
city: str
state: str
zip_code: str
address_two: str | None = None
@dataclass
2023-09-16 10:11:39 -07:00
class Property:
2023-09-15 15:17:37 -07:00
address: Address
2023-09-15 16:03:17 -07:00
url: str
beds: int | None = None
2023-09-17 13:06:31 -07:00
baths: float | None = None
2023-09-15 16:03:17 -07:00
stories: int | None = None
agent_name: str | None = None
year_built: int | None = None
square_feet: int | None = None
price_per_square_foot: int | None = None
2023-09-17 13:06:31 -07:00
year_built: int | None = None
2023-09-15 16:03:17 -07:00
price: int | None = None
mls_id: str | None = None
2023-09-17 13:06:31 -07:00
listing_type: ListingType | None = None
lot_size: int | None = None
description: str | None = None
@dataclass
class Building:
address: Address
url: str
num_units: int | None = None
min_unit_price: int | None = None
max_unit_price: int | None = None
avg_unit_price: int | None = None
listing_type: str | None = None