diff --git a/models/shoe.py b/models/shoe.py new file mode 100644 index 0000000..eeb1b5a --- /dev/null +++ b/models/shoe.py @@ -0,0 +1,22 @@ +from sqlalchemy import Column, String, Integer, DateTime, ForeignKey +from sqlalchemy.orm import relationship +from sqlalchemy.sql import func +from core.database import Base +import uuid + +class Shoe(Base): + __tablename__ = "shoes" + + id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4())) + name = Column(String, nullable=False, index=True) + brand = Column(String, nullable=False) + size = Column(Integer, nullable=False) + color = Column(String, nullable=False) + style = Column(String) + condition = Column(String) + purchase_date = Column(DateTime) + price = Column(Integer) + notes = Column(String) + + created_at = Column(DateTime, default=func.now()) + updated_at = Column(DateTime, default=func.now(), onupdate=func.now()) \ No newline at end of file