21 lines
912 B
Python
21 lines
912 B
Python
from sqlalchemy import Column, String, Integer, Boolean, DateTime, Float
|
|
from sqlalchemy.dialects.postgresql import UUID
|
|
from sqlalchemy.sql import func
|
|
from core.database import Base
|
|
import uuid
|
|
|
|
class RentMonitoring(Base):
|
|
__tablename__ = "rent_monitoring"
|
|
|
|
id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
|
|
property_address = Column(String, nullable=False)
|
|
property_type = Column(String, nullable=False)
|
|
bedrooms = Column(Integer, nullable=False)
|
|
bathrooms = Column(Integer, nullable=False)
|
|
square_feet = Column(Float, nullable=False)
|
|
rent_amount = Column(Float, nullable=False)
|
|
listing_url = Column(String, nullable=False)
|
|
listing_source = Column(String, nullable=False)
|
|
is_available = Column(Boolean, default=True)
|
|
created_at = Column(DateTime, default=func.now())
|
|
updated_at = Column(DateTime, default=func.now(), onupdate=func.now()) |