Feat: Fügt Entities für account, transaction und recurring_transaction hinzu
This commit is contained in:
11
lib/Entities/account.dart
Normal file
11
lib/Entities/account.dart
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
/// Die Klasse stellt ein Konto dar.
|
||||||
|
@collection
|
||||||
|
class Account {
|
||||||
|
/// Die Id des Kontos
|
||||||
|
Id id = Isar.autoIncrement;
|
||||||
|
|
||||||
|
/// Der Name des Kontos
|
||||||
|
String name = '';
|
||||||
|
}
|
||||||
22
lib/Entities/recurring_transaction.dart
Normal file
22
lib/Entities/recurring_transaction.dart
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
import 'time_frame_enum.dart';
|
||||||
|
|
||||||
|
/// Stellt eine wiederkehrende Transaktion dar
|
||||||
|
@collection
|
||||||
|
class RecurringTransaction {
|
||||||
|
/// Die Id der wiederkehrenden Transaktion
|
||||||
|
Id id = Isar.autoIncrement;
|
||||||
|
|
||||||
|
/// Der Name der wiederkehrenden Transaktion
|
||||||
|
String name = '';
|
||||||
|
|
||||||
|
/// Das Startdatum ab wann diese wiederkehrende Transaktion belastet wird
|
||||||
|
DateTime? startDate;
|
||||||
|
|
||||||
|
/// Der Zeitraum der wiederkehrenden Transaktion
|
||||||
|
TimeFrameEnum? timeFrame;
|
||||||
|
|
||||||
|
/// Die Höhe der wiederkehrenden Transaktion
|
||||||
|
double amount = 0;
|
||||||
|
}
|
||||||
14
lib/Entities/time_frame_enum.dart
Normal file
14
lib/Entities/time_frame_enum.dart
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
/// Ein Enum, das bestimmte Zeitspannen darstellt
|
||||||
|
enum TimeFrameEnum {
|
||||||
|
/// Für eine tägliche Zeitspanne
|
||||||
|
daily,
|
||||||
|
|
||||||
|
/// Für eine wöchentliche Zeitspanne
|
||||||
|
weekly,
|
||||||
|
|
||||||
|
/// Für eine monatliche Zeitspanne
|
||||||
|
monthly,
|
||||||
|
|
||||||
|
/// Für eine jährliche Zeitspanne
|
||||||
|
yearly,
|
||||||
|
}
|
||||||
17
lib/Entities/transaction.dart
Normal file
17
lib/Entities/transaction.dart
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import 'package:isar/isar.dart';
|
||||||
|
|
||||||
|
/// Die Klasse stellt eine Transaktion dar.
|
||||||
|
@collection
|
||||||
|
class Transaction {
|
||||||
|
/// Die Id der Transaktion
|
||||||
|
Id id = Isar.autoIncrement;
|
||||||
|
|
||||||
|
/// Der Name der Transaktion
|
||||||
|
String name = '';
|
||||||
|
|
||||||
|
/// Der Tag an der die Transaktion getätigt wurde
|
||||||
|
DateTime? date;
|
||||||
|
|
||||||
|
/// Die Höhe der Transaktion
|
||||||
|
double amount = 0;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user