12 lines
343 B
Python
12 lines
343 B
Python
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.base_class import Base
|
|
|
|
|
|
class Team(Base):
|
|
|
|
team_id = Column(Integer, primary_key=True, index=True)
|
|
teamname = Column(String, nullable=False)
|
|
players = relationship("Player", back_populates="team")
|