Spaces:
Running
on
Zero
Running
on
Zero
from sqlalchemy import Column, Integer, String | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
class User(Base): | |
__tablename__ = 'users' | |
id = Column(Integer, primary_key=True) | |
username = Column(String, unique=True) | |
password = Column(String) | |
profile = Column(String) | |
tags = Column(String) | |
team_id = Column(Integer, ForeignKey('teams.id')) | |
team = relationship('Team', backref='users') |