[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,19 @@
import 'package:moor/moor.dart';
@DataClassName('ReadEntity')
class Reads extends Table {
DateTimeColumn get lastRead => dateTime()();
TextColumn get userId => text()();
TextColumn get channelCid =>
text().customConstraint('REFERENCES channels(cid) ON DELETE CASCADE')();
IntColumn get unreadMessages => integer().nullable()();
@override
Set<Column> get primaryKey => {
userId,
channelCid,
};
}