[LLC, Persistence] Add doc comments

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-28 19:48:54 +05:30
parent 6e5894eebe
commit 86a122aa23
30 changed files with 154 additions and 68 deletions
@@ -1,19 +1,26 @@
import 'package:moor/moor.dart';
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
/// Represents a [Reactions] table in [MoorChatDatabase].
@DataClassName('ReactionEntity')
class Reactions extends Table {
/// The id of the user that sent the reaction
TextColumn get userId => text()();
/// The messageId to which the reaction belongs
TextColumn get messageId =>
text().customConstraint('REFERENCES messages(id) ON DELETE CASCADE')();
/// The type of the reaction
TextColumn get type => text()();
/// The DateTime on which the reaction is created
DateTimeColumn get createdAt => dateTime()();
/// The score of the reaction (ie. number of reactions sent)
IntColumn get score => integer().nullable()();
/// Reaction custom extraData
TextColumn get extraData => text().nullable().map(MapConverter<Object>())();
@override