Module:FrontpageMatches/Settings

From VALORANT Esports Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:FrontpageMatches/Settings/doc

-- TournamentSectionSettings
return {
	sections = { 'Events', 'Matches', 'Results' },
	cargo = {
		tables = 'MatchSchedule',
		fields = {
			'Team1',
			'Team2',
			'Player1',
			'Player2',
			'Tab=Round',
			'DateTime_UTC=DateTime',
			'HasTime=TimeEntered',
			'OverviewPage=Tournament',
			'ShownName',
			'Winner',
			'Stream'
		},
		types = {
			TimeEntered = 'boolean'
		}
	},
	classes = {
		tournamentLinks = 'fpml-schedule-links',
		tournament = 'fpml-tournament',
	},
	Matches = {
		sentence = "''This list displays up to the next %s series from any available event.''",
		title = 'Upcoming Matches',
		cargo = {
			where = 'DateTime_UTC > NOW()',
			orderBy = 'DateTime_UTC ASC,OverviewPage ASC, N_Page ASC, N_MatchInPage ASC',
			groupBy = 'Team1, Team2, DateTime_UTC, Tab, OverviewPage'
		},
		fields = {
			'tournament',
			'tournamentLinks',
			'teams',
			'countdown',
		},
	},
	Events = {
		sentence = "''For each available event, this list displays only the earliest series and no further games.''",
		title = 'Upcoming Events',
		cargo = {
			where = 'MatchSchedule.DateTime_UTC > NOW()',
			orderBy = 'MatchSchedule.DateTime_UTC ASC, MatchSchedule.OverviewPage ASC',
			groupBy = 'MatchSchedule.OverviewPage',
		},
		fields = {
			'tournament',
			'tournamentLinks',
			'teams',
			'countdown'
		},
		min_max_query = true,
	},
	Results = {
		sentence = "",
		title = 'Recent Results',
		cargo = {
			where = 'MatchSchedule.Winner > -1 AND MatchSchedule.DateTime_UTC < NOW()',
			orderBy = 'MatchSchedule.DateTime_UTC DESC, MatchSchedule.OverviewPage ASC',
			groupBy = 'MatchSchedule.UniqueMatch'
		},
		fields = {
			'tournament',
			'teams',
			'winner'
		},
	}
}