from flask_table import Table, Col, LinkCol, ButtonCol class Results(Table): matchNumber = Col('Match Number') matchDate = Col('Date') matchTime = Col('Time') matchHomeClub = Col('Home Club') matchHomeTeam = Col('Home Team') matchHomeScore = Col('Score') matchAwayScore = Col('Score') matchAwayClub = Col('Away Club') matchAwayTeam = Col('Away Team') matchUmpire1 = Col('Umpire 1') matchUmpire2 = Col('Umpire 2') matchOfficial = Col('Match Official') id = Col('id', show=False) class matchCardHome(Table): playerNumber = Col('Player Number') playerName = Col('Player Name') class matchCardAway(Table): playerNumber = Col('Player Number') playerName = Col('Player Name') class playerResults(Table): playerNumber = Col('Player Number') playerName = Col('Player Name') appearances = Col('Appearances') goals = Col('Goals') class teamResults(Table): opposition = Col('Opponent') played = Col('Played') matchesWon = Col('Won') matchesDrawn = Col('Drawn') matchesLost = Col('Lost') goalsFor = Col('For') goalsAgainst = Col('Against') class clubPlayingRecord(Table): playerNumber = Col('Player Number') playerName = Col('Player Name') appearances_A = Col('A Team Appearances') appearances_B = Col('B Team Appearances') appearances_C = Col('C Team Appearances') appearances_D = Col('D Team Appearances') appearances_E = Col('E Team Appearances') appearances_F = Col('F Team Appearances') appearances_G = Col('G Team Appearances') appearances_H = Col('H Team Appearances') class clubList(Table): club = Col('Club Name') team = Col('Team') league = Col('Division') class convenorSquadListTable(Table): playerNumber = Col('Shirt Number') playerForenames = Col('Forenames') playerSurname = Col('Surname') playerNickname = Col('Nickname') playerChineseName = Col('Chinese Name') playerEmail = Col('Email') playerDob = Col('Date of Birth') playerHkid = Col('HK ID Number') playerTelNumber = Col('Contact Number') edit = ButtonCol('Edit', 'routes.convenorEditPlayer', url_kwargs=dict(playerNumber='playerNumber'), button_attrs={"type" : "submit", "class" : "btn btn-primary"}) delete = ButtonCol('Delete', 'routes.convenorDeletePlayer', url_kwargs=dict(playerNumber='playerNumber'), button_attrs={"type" : "submit", "class" : "btn btn-danger"}) class matchSquadTable(Table): playerNumber = Col('Player Number') playerNickname = Col('Nickname') playerSurname = Col('Surname') playerForenames = Col('Forenames') delete = ButtonCol('Delete', 'routes.delPlayerFromSquad', url_kwargs=dict(playerNumber='playerNumber'), button_attrs={"type" : "submit", "class" : "btn btn-danger"}) class convenorFixtureList(Table): date = Col('Date') division = Col('Division') homeTeam = Col('Home Team') awayTeam = Col('Away Team') venue = Col('Venue') time = Col('Time') umpire1 = Col('Umpire 1') umpire2 = Col('Umpire 2')