[StreamChatPersistence] Add initial implementation

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-25 19:14:55 +05:30
parent 1021814a75
commit 657b58af8b
47 changed files with 1878 additions and 1 deletions
@@ -0,0 +1,24 @@
import 'package:moor/moor.dart';
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
@DataClassName('UserEntity')
class Users extends Table {
TextColumn get id => text()();
TextColumn get role => text().nullable()();
DateTimeColumn get createdAt => dateTime().nullable()();
DateTimeColumn get updatedAt => dateTime().nullable()();
DateTimeColumn get lastActive => dateTime().nullable()();
BoolColumn get online => boolean().nullable()();
BoolColumn get banned => boolean().nullable()();
TextColumn get extraData => text().nullable().map(MapConverter<Object>())();
@override
Set<Column> get primaryKey => {id};
}