feat: Add User and UserBalance models with serialization methods
feat: Implement BalanceRepository for group balance calculations feat: Create ExpenseRepository for managing expenses feat: Add services for handling expenses and storage operations fix: Update import paths for models in repositories and services refactor: Rename CountContent to AccountContent in HomePage chore: Add StorageService for image upload and management
This commit is contained in:
25
lib/models/group_statistics.dart
Normal file
25
lib/models/group_statistics.dart
Normal file
@@ -0,0 +1,25 @@
|
||||
class GroupStatistics {
|
||||
final double totalExpenses;
|
||||
final int expenseCount;
|
||||
final double averageExpense;
|
||||
final String topCategory;
|
||||
final Map<String, double> categoryBreakdown;
|
||||
|
||||
const GroupStatistics({
|
||||
required this.totalExpenses,
|
||||
required this.expenseCount,
|
||||
required this.averageExpense,
|
||||
required this.topCategory,
|
||||
required this.categoryBreakdown,
|
||||
});
|
||||
|
||||
factory GroupStatistics.empty() {
|
||||
return const GroupStatistics(
|
||||
totalExpenses: 0.0,
|
||||
expenseCount: 0,
|
||||
averageExpense: 0.0,
|
||||
topCategory: '',
|
||||
categoryBreakdown: {},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user