from datetime import datetime from pydantic import BaseModel from typing import List, Optional class Host(BaseModel): host_id: str host_url: str host_name: str host_since: str host_location: str host_about: str host_response_time: Optional[str] = None host_response_rate: Optional[int] = None host_acceptance_rate: str host_is_superhost: bool host_thumbnail_url: str host_picture_url: str host_neighborhood: str host_listings_count: int host_total_listings_count: int host_verifications: str host_has_profile_pic: bool host_identity_verified: bool class Location(BaseModel): type: str coordinates: List[float] is_location_exact: bool class Address(BaseModel): street: str government_area: str market: str country: str country_code: str location: Location class Review(BaseModel): _id: str date: Optional[datetime] = None listing_id: str reviewer_id: str reviewer_name: Optional[str] = None comments: Optional[str] = None class Listing(BaseModel): _id: int listing_url: str """ scrape_id: int last_scraped: str source: str name: str description: str neighborhood_overview: Optional[str] = None picture_url: str host: Host neighborhood neighborhood_cleansed neighborhood_group_cleansed latitude longitude property_type: str room_type: str accommodates bathrooms bathrooms_text bedrooms beds amenities price minimum_nights maximum_nights minimum_minimum_nights maximum_minimum_nights minimum_maximum_nights maximum_maximum_nights minimum_nights_avg_ntm maximum_nights_avg_ntm calendar_updated has_availability availability_30 availability_60 availability_90 availability_365 calendar_last_scraped number_of_reviews number_of_reviews_ltm number_of_reviews_l30d first_review last_review review_scores_rating review_scores_accuracy review_scores_cleanliness review_scores_checkin review_scores_communication review_scores_location review_scores_value license instant_bookable calculated_host_listings_count calculated_host_listings_count_entire_homes calculated_host_listings_count_private_rooms calculated_host_listings_count_shared_rooms reviews_per_month description_embedding: List[float] """ class SearchResultItem(BaseModel): name: str accommodates: Optional[int] = None bedrooms: Optional[int] = None address: Address space: str = None