add support for querying buying listings as well as by max price

This commit is contained in:
Viktor Barzin 2025-06-18 20:38:50 +00:00
parent ba4a95825b
commit 69d15e9a16
No known key found for this signature in database
GPG key ID: 4056458DBDBF8863
5 changed files with 95 additions and 31 deletions

View file

@ -6,6 +6,7 @@ import enum
import json
from pathlib import Path
from typing import Any, Dict, List
from pydantic import BaseModel
from rec import routing
from sqlmodel import JSON, SQLModel, Field, String
@ -230,7 +231,7 @@ class ListingType(enum.StrEnum):
@dataclass(frozen=True)
class QueryParameters:
class QueryParameters(BaseModel):
listing_type: ListingType
min_bedrooms: int = 1
max_bedrooms: int = 999