Приложение на флаторе, настройки
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import '../../../../core/errors/errors.dart';
|
||||
import '../../../../core/errors/result.dart';
|
||||
import '../../domain/entities/chat.dart';
|
||||
import '../../domain/entities/message.dart';
|
||||
import '../../domain/repositories/chat_repository.dart';
|
||||
|
||||
class ChatRepositoryImpl implements ChatRepository {
|
||||
@override
|
||||
Future<Result<void>> createChat(String title, List<String> participantIds) async {
|
||||
return const Result.success(null);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Result<void>> deleteChat(String chatId) async {
|
||||
return const Result.success(null);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Result<Chat>> getChatById(String chatId) async {
|
||||
return const Result.failure(AppError.notFound(message: 'Chat not found'));
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Result<List<Chat>>> getChats() async {
|
||||
// Return empty list for now
|
||||
return const Result.success([]);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Result<List<Message>>> getMessages(
|
||||
String chatId, {
|
||||
int? limit,
|
||||
String? lastMessageId,
|
||||
}) async {
|
||||
return const Result.success([]);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Result<void>> sendMessage(String chatId, Message message) async {
|
||||
return const Result.success(null);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Result<void>> updateChat(String chatId, String title) async {
|
||||
return const Result.success(null);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user