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
63 lines
1.2 KiB
Dart
63 lines
1.2 KiB
Dart
import 'package:equatable/equatable.dart';
|
|
import '../../models/account.dart';
|
|
import '../../models/group_member.dart';
|
|
|
|
abstract class AccountEvent extends Equatable {
|
|
const AccountEvent();
|
|
|
|
@override
|
|
List<Object?> get props => [];
|
|
}
|
|
|
|
class LoadAccountsByUserId extends AccountEvent {
|
|
final String userId;
|
|
|
|
const LoadAccountsByUserId(this.userId);
|
|
|
|
@override
|
|
List<Object?> get props => [userId];
|
|
}
|
|
|
|
class LoadAccountsByTrip extends AccountEvent {
|
|
final String tripId;
|
|
|
|
const LoadAccountsByTrip(this.tripId);
|
|
|
|
@override
|
|
List<Object?> get props => [tripId];
|
|
}
|
|
|
|
class CreateAccount extends AccountEvent {
|
|
final Account account;
|
|
|
|
const CreateAccount(this.account);
|
|
|
|
@override
|
|
List<Object?> get props => [account];
|
|
}
|
|
|
|
class UpdateAccount extends AccountEvent {
|
|
final String accountId;
|
|
final Account account;
|
|
|
|
const UpdateAccount({
|
|
required this.accountId,
|
|
required this.account,
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [accountId, account];
|
|
}
|
|
|
|
class CreateAccountWithMembers extends AccountEvent {
|
|
final Account account;
|
|
final List<GroupMember> members;
|
|
|
|
const CreateAccountWithMembers({
|
|
required this.account,
|
|
required this.members,
|
|
});
|
|
|
|
@override
|
|
List<Object?> get props => [account, members];
|
|
} |