feat: Implementiere Quoten- und Einsatzverwaltung für Saisons

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
torsten 2026-10-04 18:14:46 +02:00
parent d571121200
commit 362966e0cd
4 changed files with 77 additions and 28 deletions

View file

@ -75,11 +75,12 @@ class Season {
try {
$stmt = $db->prepare(
"INSERT INTO seasons (name, rounds, created_at, updated_at) VALUES (:name, :rounds, NOW(), NOW())"
"INSERT INTO seasons (name, rounds, stake, created_at, updated_at) VALUES (:name, :rounds, :stake, NOW(), NOW())"
);
$stmt->execute([
':name' => $data['name'],
':rounds' => $data['rounds'],
':stake' => $data['stake'],
]);
$seasonId = $db->lastInsertId();
@ -110,12 +111,13 @@ class Season {
public static function update($id, $data) {
$db = Database::getConnection();
$stmt = $db->prepare(
"UPDATE seasons SET name = :name, rounds = :rounds, updated_at = NOW() WHERE id = :id"
"UPDATE seasons SET name = :name, rounds = :rounds, stake = :stake, updated_at = NOW() WHERE id = :id"
);
return $stmt->execute([
':id' => $id,
':name' => $data['name'],
':rounds' => $data['rounds'],
':stake' => $data['stake'],
]);
}