comments in models hinzugefügt

This commit is contained in:
arslandevelopments
2026-08-19 13:55:51 +02:00
parent b4811f4bd0
commit 6e1dcd9d1c
2 changed files with 5 additions and 2 deletions
Regular → Executable
+2 -1
View File
@@ -49,6 +49,7 @@ class Habit
return $habit ?: null;
}
// Legt einen neuen Habit an
public static function create(int $userId, array $data): bool
{
$sql = 'INSERT INTO habits (user_id, category_id, title, description, target_per_week)
@@ -111,4 +112,4 @@ class Habit
$insert = $db->prepare('INSERT INTO habit_logs (habit_id, completed_on) VALUES (:habit_id, CURRENT_DATE)');
return $insert->execute(['habit_id' => $id]);
}
}
}