17 lines
536 B
Python
17 lines
536 B
Python
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.base_class import Base
|
|
|
|
|
|
class MatchdayPlayer(Base):
|
|
|
|
player_id = Column("players_id", ForeignKey("players.id"), primary_key=True)
|
|
matchday_id = Column("teams_id", ForeignKey("teams.id"), primary_key=True)
|
|
|
|
|
|
class Matchday(Base):
|
|
|
|
matchday_id = Column(Integer, primary_key=True)
|
|
day = Column(DateTime, nullable=False)
|
|
players = relationship("Player", secondary="matchdayplayer") |