blob: 0bf1d184f757c09c71b14f45324a67d5d6618dc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
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")
|