kenken999's picture
test
ba19a97
raw
history blame
552 Bytes
from sqlalchemy import Column, Integer, String
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import relationship
from app.models.base import Base
class User(Base):
__tablename__ = "users"
id = Column(Integer, primary_key=True)
username = Column(String, unique=True)
password = Column(String)
profile = Column(String)
team_id = Column(Integer, nullable=True)
team = relationship("Team", backref="users")
def __repr__(self):
return f"User(username={self.username}, profile={self.profile})"