Пример #1
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         cls.table = sql_tables.Table(
             cls.__name__, sql_columns.id_column(),
             [sql_columns.id_column(),
              sql_columns.name_column()])
     return cls.table
Пример #2
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         cls.table = sql_tables.Table(
             cls.__name__, sql_columns.id_column(), [
                 sql_columns.id_column(),
                 sql_columns.name_column(),
                 Column(ColumnNames.Date_Of_Birth.name, Affinity.TEXT)
             ])
     return cls.table
Пример #3
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         cls.table = sql_tables.Table(
             cls.__name__, sql_columns.id_column(), [
                 sql_columns.id_column(),
                 sql_columns.name_column(),
                 Column(ColumnNames.Country.name, Affinity.TEXT),
                 Column(ColumnNames.Logo.name, Affinity.TEXT)
             ])
     return cls.table
Пример #4
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         cls.table = sql_tables.Table(cls.__name__, None, [
             Column(ColumnNames.Fixture_ID.name, Affinity.INTEGER),
             Column(ColumnNames.Time.name, Affinity.INTEGER),
             Column(ColumnNames.Extra_Time.name, Affinity.INTEGER),
             Column(ColumnNames.Team_ID.name, Affinity.INTEGER),
             Column(ColumnNames.Name.name, Affinity.TEXT),
             Column(ColumnNames.Left_ID.name, Affinity.INTEGER),
             Column(ColumnNames.Right_ID.name, Affinity.INTEGER),
             Column(ColumnNames.Detail.name, Affinity.TEXT)
         ])
     return cls.table
Пример #5
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         cls.table = sql_tables.Table(
             cls.__name__, sql_columns.id_column(), [
                 sql_columns.id_column(),
                 Column(ColumnNames.Year.name, Affinity.INTEGER),
                 Column(ColumnNames.Code.name, Affinity.TEXT),
                 Column(ColumnNames.Country.name, Affinity.TEXT),
                 Column(ColumnNames.Country_Code.name, Affinity.TEXT),
                 Column(ColumnNames.Flag.name, Affinity.TEXT),
                 Column(ColumnNames.Current.name, Affinity.INTEGER)
             ])
     return cls.table
Пример #6
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         cls.table = sql_tables.Table(
             cls.__name__, sql_columns.id_column(), [
                 sql_columns.id_column(),
                 Column(ColumnNames.Date.name, Affinity.TEXT),
                 Column(ColumnNames.Season_ID.name, Affinity.INTEGER),
                 Column(ColumnNames.Home_ID.name, Affinity.INTEGER),
                 Column(ColumnNames.Away_ID.name, Affinity.INTEGER),
                 Column(ColumnNames.Half_Time.name, Affinity.TEXT),
                 Column(ColumnNames.Full_Time.name, Affinity.TEXT),
                 Column(ColumnNames.Finished.name, Affinity.INTEGER),
                 Column(ColumnNames.Updated.name, Affinity.TEXT)
             ])
     return cls.table
Пример #7
0
 def sql_table(cls) -> sql_tables.Table:
     if cls.table is None:
         match_column = Column(ColumnNames.Match_ID.name, Affinity.INTEGER)
         player_column = Column(ColumnNames.Player_ID.name,
                                Affinity.INTEGER)
         team_column = Column(ColumnNames.Team_ID.name, Affinity.INTEGER)
         cls.table = sql_tables.Table(
             cls.__name__, sql_columns.id_column(), [
                 sql_columns.id_column(), match_column, player_column,
                 team_column,
                 Column(ColumnNames.Period.name, Affinity.INTEGER),
                 Column(ColumnNames.Timestamp.name, Affinity.REAL),
                 Column(ColumnNames.Event_ID.name, Affinity.INTEGER),
                 Column(ColumnNames.Sub_Event_ID.name, Affinity.INTEGER),
                 Column(ColumnNames.Tags.name, Affinity.BLOB),
                 Column(ColumnNames.From_Position.name, Affinity.BLOB),
                 Column(ColumnNames.To_Position.name, Affinity.BLOB)
             ])
         cls.table.add_foreign_key(match_column, Match.sql_table())
         cls.table.add_foreign_key(player_column, Player.sql_table())
         cls.table.add_foreign_key(team_column, Team.sql_table())
     return cls.table