Add Football model
This commit is contained in:
parent
0939bd1189
commit
2f6fa82e36
16
models/football.py
Normal file
16
models/football.py
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
from sqlalchemy import Column, String, Integer, Boolean, DateTime
|
||||||
|
from sqlalchemy.sql import func
|
||||||
|
from core.database import Base
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
class Football(Base):
|
||||||
|
__tablename__ = "football"
|
||||||
|
id = Column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
||||||
|
team_name = Column(String, nullable=False, index=True)
|
||||||
|
player_count = Column(Integer, default=11)
|
||||||
|
league = Column(String, nullable=False)
|
||||||
|
is_active = Column(Boolean, default=True)
|
||||||
|
team_ranking = Column(Integer)
|
||||||
|
stadium_name = Column(String)
|
||||||
|
created_at = Column(DateTime, default=func.now())
|
||||||
|
updated_at = Column(DateTime, default=func.now(), onupdate=func.now())
|
Loading…
x
Reference in New Issue
Block a user