40 lines
1.9 KiB
Python
40 lines
1.9 KiB
Python
# coding: utf-8
|
||
from sqlalchemy import Column, Date, DateTime, Integer, text
|
||
from sqlalchemy.dialects.mysql import VARCHAR
|
||
from sqlalchemy.ext.declarative import declarative_base
|
||
|
||
Base = declarative_base()
|
||
metadata = Base.metadata
|
||
|
||
|
||
class FootballMatch(Base):
|
||
__tablename__ = 'football_match'
|
||
__table_args__ = {'comment': '足球比赛表'}
|
||
|
||
id = Column(Integer, primary_key=True)
|
||
match_id = Column(Integer, nullable=False, comment='竞彩网的比赛id')
|
||
match_num = Column(VARCHAR(50))
|
||
match_num_str = Column(VARCHAR(50))
|
||
match_date = Column(Date, comment='比赛时间')
|
||
league_id = Column(Integer, comment='联赛id')
|
||
league_name = Column(VARCHAR(255), comment='联赛名')
|
||
home_team_id = Column(Integer, comment='主队id')
|
||
home_name = Column(VARCHAR(255), comment='主队名')
|
||
away_team_id = Column(Integer, comment='客队id')
|
||
away_name = Column(VARCHAR(255), comment='客队名')
|
||
half_score = Column(VARCHAR(10), comment='半场比分')
|
||
score = Column(VARCHAR(10), comment='全场比分')
|
||
total_goal_count = Column(Integer, comment='总进球数')
|
||
result = Column(Integer, comment='结果:0 负 1 平 3 胜')
|
||
rq_count = Column(Integer, comment='让球数')
|
||
rq_result = Column(Integer, comment='让球结果:0 负 1 平 3 胜')
|
||
bqc_result = Column(VARCHAR(10), comment='半全场结果')
|
||
spf_odds_ranking = Column(Integer, comment='胜平负赔率排名')
|
||
rq_spf_odds_ranking = Column(Integer, comment='让球胜平负赔率排名')
|
||
bf_odds_ranking = Column(Integer, comment='比分赔率排名')
|
||
bqc_odds_ranking = Column(Integer, comment='半全场赔率排名')
|
||
zjq_odds_ranking = Column(Integer, comment='总进球数赔率排名')
|
||
is_single = Column(Integer, server_default=text("'0'"), comment='是否单场')
|
||
created_at = Column(DateTime, server_default=text("CURRENT_TIMESTAMP"))
|
||
match_result_status = Column(Integer, comment='比赛结果状态')
|