destinyebuka commited on
Commit
2eb8868
·
1 Parent(s): 9f0c212
Files changed (1) hide show
  1. app/models/listing.py +3 -3
app/models/listing.py CHANGED
@@ -9,9 +9,9 @@ from app.database import get_db
9
  class Listing(BaseModel):
10
  """Single source of truth stored in Mongo"""
11
  id: Optional[str] = Field(default_factory=lambda: str(ObjectId()), alias="_id")
12
- user_id: str # Changed from owner_id to match DB
13
- user_role: Optional[str] = None
14
- listing_type: str # Changed from type to match DB (rent | short-stay | roommate | sale)
15
  title: str
16
  description: str
17
  price: float
 
9
  class Listing(BaseModel):
10
  """Single source of truth stored in Mongo"""
11
  id: Optional[str] = Field(default_factory=lambda: str(ObjectId()), alias="_id")
12
+ user_id: str # Maps to user_id in DB
13
+ user_role: Optional[str] = None # landlord | tenant
14
+ listing_type: str # Maps to listing_type in DB (rent | short-stay | roommate | sale)
15
  title: str
16
  description: str
17
  price: float