diff --git a/models/city.py b/models/city.py new file mode 100644 index 0000000..bea6af5 --- /dev/null +++ b/models/city.py @@ -0,0 +1,14 @@ +from sqlalchemy import Column, String, DateTime, Boolean +from sqlalchemy.sql import func +from core.database import Base +import uuid + +class City(Base): + __tablename__ = "cities" + id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4())) + name = Column(String, nullable=False, index=True) + endpoint = Column(String, nullable=False) + description = Column(String) + is_active = Column(Boolean, default=True) + created_at = Column(DateTime, default=func.now()) + updated_at = Column(DateTime, default=func.now(), onupdate=func.now()) \ No newline at end of file