Add Glory model

This commit is contained in:
Backend IM Bot 2025-03-27 21:25:46 +00:00
parent a5fdedce46
commit a92196324d

View File

@ -9,7 +9,7 @@ class Glory(Base):
__tablename__ = "glory"
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
team_name = Column(String, nullable=False, index=True)
team_name = Column(String, unique=True, nullable=False, index=True)
league = Column(String, nullable=False)
points = Column(Integer, default=0)
matches_played = Column(Integer, default=0)
@ -22,7 +22,6 @@ class Glory(Base):
position = Column(Integer)
is_active = Column(Boolean, default=True)
season = Column(String, nullable=False)
coach = Column(String)
home_stadium = Column(String)
created_at = Column(DateTime, default=func.now())
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())