Add listing decisions (like/dislike) backend with detail endpoint
- ListingDecision model with unique constraint on (user_id, listing_id, listing_type)
- Alembic migration for listingdecision table
- DecisionRepository with dialect-aware upsert (MySQL/SQLite)
- DecisionService with input validation
- Decision API routes: PUT/GET/DELETE on /api/decisions
- GET /api/listing/{id}/detail endpoint extracting full property info from additional_info
- Add listing ID to GeoJSON feature properties
- Decision filtering on GeoJSON stream endpoint (decision_filter param)
This commit is contained in:
parent
a2e7d59af2
commit
9e1beb7495
7 changed files with 447 additions and 138 deletions
|
|
@ -54,6 +54,7 @@ def convert_row_to_geojson(row: dict[str, Any], listing_type: str = "RENT") -> d
|
|||
last_seen_str = str(last_seen_val)
|
||||
|
||||
properties: dict[str, Any] = {
|
||||
"id": row['id'],
|
||||
"listing_type": listing_type,
|
||||
"city": "London",
|
||||
"country": "United Kingdom",
|
||||
|
|
@ -98,6 +99,7 @@ def convert_to_geojson_feature(listing: RentListing | BuyListing) -> dict[str, A
|
|||
listing_type = "RENT" if isinstance(listing, RentListing) else "BUY"
|
||||
|
||||
properties: dict[str, Any] = {
|
||||
"id": listing.id,
|
||||
"listing_type": listing_type,
|
||||
"city": "London",
|
||||
"country": "United Kingdom",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue