Initial commit

This commit is contained in:
Kazimierz Ciołek
2026-02-19 02:49:29 +01:00
commit 782986a632
148 changed files with 29230 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
import 'package:drift/drift.dart';
import 'package:trainhub_flutter/data/database/app_database.dart';
import 'package:trainhub_flutter/domain/entities/exercise.dart';
class ExerciseMapper {
ExerciseMapper._();
static ExerciseEntity toEntity(Exercise row) {
return ExerciseEntity(
id: row.id,
name: row.name,
instructions: row.instructions,
enrichment: row.enrichment,
tags: row.tags,
videoUrl: row.videoUrl,
);
}
static ExercisesCompanion toCompanion(ExerciseEntity entity) {
return ExercisesCompanion(
id: Value(entity.id),
name: Value(entity.name),
instructions: Value(entity.instructions),
enrichment: Value(entity.enrichment),
tags: Value(entity.tags),
videoUrl: Value(entity.videoUrl),
);
}
static ExercisesCompanion toUpdateCompanion(ExerciseEntity entity) {
return ExercisesCompanion(
name: Value(entity.name),
instructions: Value(entity.instructions),
enrichment: Value(entity.enrichment),
tags: Value(entity.tags),
videoUrl: Value(entity.videoUrl),
);
}
}