diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2025-04-27 22:35:12 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2025-04-27 22:35:12 -0600 |
commit | 67fc7ee54c658020294a7f048afeea304118075d (patch) | |
tree | e0d29ee50b001acfdca83095e2e977b1f9a4786a | |
parent | 18db41658af5ff8f4d5f694fa6f2e2b59a10a8d5 (diff) |
user model
-rw-r--r-- | server/models/auth.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/server/models/auth.py b/server/models/auth.py new file mode 100644 index 0000000..0bf1d18 --- /dev/null +++ b/server/models/auth.py @@ -0,0 +1,12 @@ +from sqlalchemy import Column, Integer, String +from sqlalchemy.orm import relationship +from db import Base + +class User(Base): + __tablename__ = "users" + + id = Column(Integer, primary_key=True, index=True) + username = Column(String, unique=True, index=True, nullable=False) + password = Column(String, nullable=False) + + bids = relationship("Bid", back_populates="user") |