mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-23 05:19:22 +00:00
29 lines
762 B
Dart
29 lines
762 B
Dart
import 'package:comunic/helpers/database/database_contract.dart';
|
|
import 'package:comunic/helpers/database/model_database_helper.dart';
|
|
import 'package:comunic/lists/conversations_list.dart';
|
|
import 'package:comunic/models/conversation.dart';
|
|
|
|
/// Conversations database helper
|
|
///
|
|
/// @author Pierre HUBERT
|
|
|
|
class ConversationsDatabaseHelper extends ModelDatabaseHelper<Conversation> {
|
|
@override
|
|
Conversation initializeFromMap(Map<String, dynamic> map) {
|
|
return Conversation.fromMap(map);
|
|
}
|
|
|
|
@override
|
|
String tableName() {
|
|
return ConversationTableContract.TABLE_NAME;
|
|
}
|
|
|
|
@override
|
|
Future<ConversationsList> getAll() async {
|
|
ConversationsList list = ConversationsList();
|
|
list.addAll(await super.getAll());
|
|
return list;
|
|
}
|
|
|
|
|
|
} |