feat(persistence): save channel.ownCapabilities in db

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2022-06-09 14:10:01 +05:30
committed by xsahil03x
parent c40580c3a7
commit c6eb075cee
5 changed files with 83 additions and 15 deletions
@@ -1,6 +1,6 @@
// coverage:ignore-file
import 'package:drift/drift.dart';
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
import 'package:stream_chat_persistence/src/converter/converter.dart';
/// Represents a [Channels] table in [MoorChatDatabase].
@DataClassName('ChannelEntity')
@@ -14,6 +14,10 @@ class Channels extends Table {
/// The cid of this channel
TextColumn get cid => text()();
/// List of user permissions on this channel
TextColumn get ownCapabilities =>
text().nullable().map(ListConverter<String>())();
/// The channel configuration data
TextColumn get config => text().map(MapConverter())();