18 lines
618 B
Python
18 lines
618 B
Python
# coding: utf-8
|
|
from sqlalchemy import Column, DateTime, Integer, text
|
|
from sqlalchemy.dialects.mysql import VARCHAR
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
Base = declarative_base()
|
|
metadata = Base.metadata
|
|
|
|
|
|
class FootballTeam(Base):
|
|
__tablename__ = 'football_team'
|
|
__table_args__ = {'comment': '足球球队信息表'}
|
|
|
|
team_id = Column(Integer, primary_key=True, comment='球队id')
|
|
team_name = Column(VARCHAR(255), comment='球队名称')
|
|
team_all_name = Column(VARCHAR(255), comment='球队全称')
|
|
created_at = Column(DateTime, server_default=text("CURRENT_TIMESTAMP"))
|