m3mo cb308bbf68 Initial project setup with Clean Architecture
- Flutter frontend with Provider state management
- FastAPI backend with SQLAlchemy ORM
- Internationalization support (EN/DE)
- Clean Architecture folder structure
- GoRouter for navigation
- GetIt for dependency injection
2026-02-02 16:43:37 +01:00

59 lines
1.3 KiB
Dart

import '../enums/priority.dart';
class TaskEntity {
final String id;
final String title;
final String? description;
final DateTime date;
final String? time;
final Priority priority;
final bool isDone;
final DateTime? createdAt;
final DateTime? updatedAt;
const TaskEntity({
required this.id,
required this.title,
this.description,
required this.date,
this.time,
this.priority = Priority.medium,
this.isDone = false,
this.createdAt,
this.updatedAt,
});
TaskEntity copyWith({
String? id,
String? title,
String? description,
DateTime? date,
String? time,
Priority? priority,
bool? isDone,
DateTime? createdAt,
DateTime? updatedAt,
}) {
return TaskEntity(
id: id ?? this.id,
title: title ?? this.title,
description: description ?? this.description,
date: date ?? this.date,
time: time ?? this.time,
priority: priority ?? this.priority,
isDone: isDone ?? this.isDone,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}
@override
bool operator ==(Object other) {
if (identical(this, other)) return true;
return other is TaskEntity && other.id == id;
}
@override
int get hashCode => id.hashCode;
}