let AI comment everything because well... yeah...

This commit is contained in:
Nico
2025-06-06 21:00:32 +02:00
parent 9c84d0c375
commit cc110ac104
44 changed files with 1230 additions and 646 deletions

View File

@@ -1,11 +1,20 @@
// * Shared methods for deleting templates from the database
// * Provides functionality for:
// * - Deleting all templates of a specific type
// * - Deleting a single template by ID
import 'package:fforte/enums/databases.dart';
import 'package:fforte/interfaces/i_db.dart';
import 'package:fforte/methods/excursion_db_helper.dart';
import 'package:fforte/methods/place_db_helper.dart';
/// Helper class for deleting templates from the database
class DeleteTemplates {
/// Delete a single template by ID
/// @param dbType The type of database (place/excursion)
/// @param id ID of the template to delete
static Future<void> deleteSingle(DatabasesEnum dbType, String id) async {
// Select appropriate database helper
IDb? db;
if (dbType == DatabasesEnum.place) {
@@ -17,7 +26,10 @@ class DeleteTemplates {
await db!.deleteTemplateById(id);
}
/// Delete all templates of a specific type
/// @param dbType The type of database (place/excursion)
static Future<void> deleteAll(DatabasesEnum dbType) async {
// Select appropriate database helper
IDb? db;
if (dbType == DatabasesEnum.place) {