diff --git a/Match-DB.md b/Match-DB.md new file mode 100644 index 0000000..fbfe9bd --- /dev/null +++ b/Match-DB.md @@ -0,0 +1,33 @@ + id INTEGER PRIMARY KEY AUTOINCREMENT, + gamesystem_id INTEGER, + player1_id INTEGER, + score_player1 INTEGER, + player2_id INTEGER, + score_player2 INTEGER, + played_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + + player1_base_change INTEGER, + player1_khorne INTEGER, + player1_slaanesh INTEGER, + player1_tzeentch INTEGER, + player1_mmr_change INTEGER, + + player2_base_change INTEGER, + player2_khorne INTEGER, + player2_slaanesh INTEGER, + player2_tzeentch INTEGER, + player2_mmr_change INTEGER, + + player2_check INTEGER DEFAULT 0, + match_is_counted INTEGER DEFAULT 0, + FOREIGN KEY (gamesystem_id) REFERENCES gamesystems (id), + FOREIGN KEY (player1_id) REFERENCES players (id), + FOREIGN KEY (player2_id) REFERENCES players (id) + + +Jep. Die Match DB ist ziemlich groß geworde. + +Erklärung: +Der Erste Block sind die einfachen Match Daten die beim Eingeben zustande kommen. Wer, Wann und wie viele Punkte. Der Player 1 und Player 2 Block sind die MMR Punkte änderungen die nach dem Bestätigen vom System errechnet werden. Damit die Berechnung transparent und Nachvollziehbar ist, werden die einzelnen Punkte gespeichert und hier dargestellt. + +Check und MatchCounted ist für die Bestätigung des Gegners (Player2) und für das System ob das Match schon berechnet wurde. \ No newline at end of file