diff --git a/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart b/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart index b7d8612de..48cb8f0e9 100644 --- a/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart +++ b/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart @@ -93,10 +93,10 @@ class $ChannelsTable extends Channels static const VerificationMeta _extraDataMeta = const VerificationMeta('extraData'); @override - late final GeneratedColumnWithTypeConverter?, String> + late final GeneratedColumnWithTypeConverter?, String> extraData = GeneratedColumn('extra_data', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false) - .withConverter?>( + .withConverter?>( $ChannelsTable.$converterextraDatan); @override List get $columns => [ @@ -230,9 +230,9 @@ class $ChannelsTable extends Channels NullAwareTypeConverter.wrap($converterownCapabilities); static TypeConverter, String> $converterconfig = MapConverter(); - static TypeConverter, String> $converterextraData = - MapConverter(); - static TypeConverter?, String?> $converterextraDatan = + static TypeConverter, String> $converterextraData = + MapConverter(); + static TypeConverter?, String?> $converterextraDatan = NullAwareTypeConverter.wrap($converterextraData); } @@ -274,7 +274,7 @@ class ChannelEntity extends DataClass implements Insertable { final String? createdById; /// Map of custom channel extraData - final Map? extraData; + final Map? extraData; const ChannelEntity( {required this.id, required this.type, @@ -340,7 +340,7 @@ class ChannelEntity extends DataClass implements Insertable { deletedAt: serializer.fromJson(json['deletedAt']), memberCount: serializer.fromJson(json['memberCount']), createdById: serializer.fromJson(json['createdById']), - extraData: serializer.fromJson?>(json['extraData']), + extraData: serializer.fromJson?>(json['extraData']), ); } @override @@ -359,7 +359,7 @@ class ChannelEntity extends DataClass implements Insertable { 'deletedAt': serializer.toJson(deletedAt), 'memberCount': serializer.toJson(memberCount), 'createdById': serializer.toJson(createdById), - 'extraData': serializer.toJson?>(extraData), + 'extraData': serializer.toJson?>(extraData), }; } @@ -376,7 +376,7 @@ class ChannelEntity extends DataClass implements Insertable { Value deletedAt = const Value.absent(), int? memberCount, Value createdById = const Value.absent(), - Value?> extraData = const Value.absent()}) => + Value?> extraData = const Value.absent()}) => ChannelEntity( id: id ?? this.id, type: type ?? this.type, @@ -486,7 +486,7 @@ class ChannelsCompanion extends UpdateCompanion { final Value deletedAt; final Value memberCount; final Value createdById; - final Value?> extraData; + final Value?> extraData; final Value rowid; const ChannelsCompanion({ this.id = const Value.absent(), @@ -570,7 +570,7 @@ class ChannelsCompanion extends UpdateCompanion { Value? deletedAt, Value? memberCount, Value? createdById, - Value?>? extraData, + Value?>? extraData, Value? rowid}) { return ChannelsCompanion( id: id ?? this.id, @@ -861,10 +861,10 @@ class $MessagesTable extends Messages static const VerificationMeta _extraDataMeta = const VerificationMeta('extraData'); @override - late final GeneratedColumnWithTypeConverter?, String> + late final GeneratedColumnWithTypeConverter?, String> extraData = GeneratedColumn('extra_data', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false) - .withConverter?>( + .withConverter?>( $MessagesTable.$converterextraDatan); @override List get $columns => [ @@ -1134,9 +1134,9 @@ class $MessagesTable extends Messages NullAwareTypeConverter.wrap($converterreactionScores); static TypeConverter?, String?> $converteri18n = NullableMapConverter(); - static TypeConverter, String> $converterextraData = - MapConverter(); - static TypeConverter?, String?> $converterextraDatan = + static TypeConverter, String> $converterextraData = + MapConverter(); + static TypeConverter?, String?> $converterextraDatan = NullAwareTypeConverter.wrap($converterextraData); } @@ -1227,7 +1227,7 @@ class MessageEntity extends DataClass implements Insertable { final Map? i18n; /// Message custom extraData - final Map? extraData; + final Map? extraData; const MessageEntity( {required this.id, this.messageText, @@ -1379,7 +1379,7 @@ class MessageEntity extends DataClass implements Insertable { pinnedByUserId: serializer.fromJson(json['pinnedByUserId']), channelCid: serializer.fromJson(json['channelCid']), i18n: serializer.fromJson?>(json['i18n']), - extraData: serializer.fromJson?>(json['extraData']), + extraData: serializer.fromJson?>(json['extraData']), ); } @override @@ -1415,7 +1415,7 @@ class MessageEntity extends DataClass implements Insertable { 'pinnedByUserId': serializer.toJson(pinnedByUserId), 'channelCid': serializer.toJson(channelCid), 'i18n': serializer.toJson?>(i18n), - 'extraData': serializer.toJson?>(extraData), + 'extraData': serializer.toJson?>(extraData), }; } @@ -1448,7 +1448,7 @@ class MessageEntity extends DataClass implements Insertable { Value pinnedByUserId = const Value.absent(), String? channelCid, Value?> i18n = const Value.absent(), - Value?> extraData = const Value.absent()}) => + Value?> extraData = const Value.absent()}) => MessageEntity( id: id ?? this.id, messageText: messageText.present ? messageText.value : this.messageText, @@ -1694,7 +1694,7 @@ class MessagesCompanion extends UpdateCompanion { final Value pinnedByUserId; final Value channelCid; final Value?> i18n; - final Value?> extraData; + final Value?> extraData; final Value rowid; const MessagesCompanion({ this.id = const Value.absent(), @@ -1860,7 +1860,7 @@ class MessagesCompanion extends UpdateCompanion { Value? pinnedByUserId, Value? channelCid, Value?>? i18n, - Value?>? extraData, + Value?>? extraData, Value? rowid}) { return MessagesCompanion( id: id ?? this.id, @@ -2234,10 +2234,10 @@ class $PinnedMessagesTable extends PinnedMessages static const VerificationMeta _extraDataMeta = const VerificationMeta('extraData'); @override - late final GeneratedColumnWithTypeConverter?, String> + late final GeneratedColumnWithTypeConverter?, String> extraData = GeneratedColumn('extra_data', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false) - .withConverter?>( + .withConverter?>( $PinnedMessagesTable.$converterextraDatan); @override List get $columns => [ @@ -2509,9 +2509,9 @@ class $PinnedMessagesTable extends PinnedMessages NullAwareTypeConverter.wrap($converterreactionScores); static TypeConverter?, String?> $converteri18n = NullableMapConverter(); - static TypeConverter, String> $converterextraData = - MapConverter(); - static TypeConverter?, String?> $converterextraDatan = + static TypeConverter, String> $converterextraData = + MapConverter(); + static TypeConverter?, String?> $converterextraDatan = NullAwareTypeConverter.wrap($converterextraData); } @@ -2603,7 +2603,7 @@ class PinnedMessageEntity extends DataClass final Map? i18n; /// Message custom extraData - final Map? extraData; + final Map? extraData; const PinnedMessageEntity( {required this.id, this.messageText, @@ -2756,7 +2756,7 @@ class PinnedMessageEntity extends DataClass pinnedByUserId: serializer.fromJson(json['pinnedByUserId']), channelCid: serializer.fromJson(json['channelCid']), i18n: serializer.fromJson?>(json['i18n']), - extraData: serializer.fromJson?>(json['extraData']), + extraData: serializer.fromJson?>(json['extraData']), ); } @override @@ -2792,7 +2792,7 @@ class PinnedMessageEntity extends DataClass 'pinnedByUserId': serializer.toJson(pinnedByUserId), 'channelCid': serializer.toJson(channelCid), 'i18n': serializer.toJson?>(i18n), - 'extraData': serializer.toJson?>(extraData), + 'extraData': serializer.toJson?>(extraData), }; } @@ -2825,7 +2825,7 @@ class PinnedMessageEntity extends DataClass Value pinnedByUserId = const Value.absent(), String? channelCid, Value?> i18n = const Value.absent(), - Value?> extraData = const Value.absent()}) => + Value?> extraData = const Value.absent()}) => PinnedMessageEntity( id: id ?? this.id, messageText: messageText.present ? messageText.value : this.messageText, @@ -3071,7 +3071,7 @@ class PinnedMessagesCompanion extends UpdateCompanion { final Value pinnedByUserId; final Value channelCid; final Value?> i18n; - final Value?> extraData; + final Value?> extraData; final Value rowid; const PinnedMessagesCompanion({ this.id = const Value.absent(), @@ -3237,7 +3237,7 @@ class PinnedMessagesCompanion extends UpdateCompanion { Value? pinnedByUserId, Value? channelCid, Value?>? i18n, - Value?>? extraData, + Value?>? extraData, Value? rowid}) { return PinnedMessagesCompanion( id: id ?? this.id, @@ -3460,10 +3460,10 @@ class $PinnedMessageReactionsTable extends PinnedMessageReactions static const VerificationMeta _extraDataMeta = const VerificationMeta('extraData'); @override - late final GeneratedColumnWithTypeConverter?, String> + late final GeneratedColumnWithTypeConverter?, String> extraData = GeneratedColumn('extra_data', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false) - .withConverter?>( + .withConverter?>( $PinnedMessageReactionsTable.$converterextraDatan); @override List get $columns => @@ -3537,9 +3537,9 @@ class $PinnedMessageReactionsTable extends PinnedMessageReactions return $PinnedMessageReactionsTable(attachedDatabase, alias); } - static TypeConverter, String> $converterextraData = - MapConverter(); - static TypeConverter?, String?> $converterextraDatan = + static TypeConverter, String> $converterextraData = + MapConverter(); + static TypeConverter?, String?> $converterextraDatan = NullAwareTypeConverter.wrap($converterextraData); } @@ -3561,7 +3561,7 @@ class PinnedMessageReactionEntity extends DataClass final int score; /// Reaction custom extraData - final Map? extraData; + final Map? extraData; const PinnedMessageReactionEntity( {required this.userId, required this.messageId, @@ -3593,7 +3593,7 @@ class PinnedMessageReactionEntity extends DataClass type: serializer.fromJson(json['type']), createdAt: serializer.fromJson(json['createdAt']), score: serializer.fromJson(json['score']), - extraData: serializer.fromJson?>(json['extraData']), + extraData: serializer.fromJson?>(json['extraData']), ); } @override @@ -3605,7 +3605,7 @@ class PinnedMessageReactionEntity extends DataClass 'type': serializer.toJson(type), 'createdAt': serializer.toJson(createdAt), 'score': serializer.toJson(score), - 'extraData': serializer.toJson?>(extraData), + 'extraData': serializer.toJson?>(extraData), }; } @@ -3615,7 +3615,7 @@ class PinnedMessageReactionEntity extends DataClass String? type, DateTime? createdAt, int? score, - Value?> extraData = const Value.absent()}) => + Value?> extraData = const Value.absent()}) => PinnedMessageReactionEntity( userId: userId ?? this.userId, messageId: messageId ?? this.messageId, @@ -3671,7 +3671,7 @@ class PinnedMessageReactionsCompanion final Value type; final Value createdAt; final Value score; - final Value?> extraData; + final Value?> extraData; final Value rowid; const PinnedMessageReactionsCompanion({ this.userId = const Value.absent(), @@ -3719,7 +3719,7 @@ class PinnedMessageReactionsCompanion Value? type, Value? createdAt, Value? score, - Value?>? extraData, + Value?>? extraData, Value? rowid}) { return PinnedMessageReactionsCompanion( userId: userId ?? this.userId, @@ -3819,10 +3819,10 @@ class $ReactionsTable extends Reactions static const VerificationMeta _extraDataMeta = const VerificationMeta('extraData'); @override - late final GeneratedColumnWithTypeConverter?, String> + late final GeneratedColumnWithTypeConverter?, String> extraData = GeneratedColumn('extra_data', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false) - .withConverter?>( + .withConverter?>( $ReactionsTable.$converterextraDatan); @override List get $columns => @@ -3894,9 +3894,9 @@ class $ReactionsTable extends Reactions return $ReactionsTable(attachedDatabase, alias); } - static TypeConverter, String> $converterextraData = - MapConverter(); - static TypeConverter?, String?> $converterextraDatan = + static TypeConverter, String> $converterextraData = + MapConverter(); + static TypeConverter?, String?> $converterextraDatan = NullAwareTypeConverter.wrap($converterextraData); } @@ -3917,7 +3917,7 @@ class ReactionEntity extends DataClass implements Insertable { final int score; /// Reaction custom extraData - final Map? extraData; + final Map? extraData; const ReactionEntity( {required this.userId, required this.messageId, @@ -3949,7 +3949,7 @@ class ReactionEntity extends DataClass implements Insertable { type: serializer.fromJson(json['type']), createdAt: serializer.fromJson(json['createdAt']), score: serializer.fromJson(json['score']), - extraData: serializer.fromJson?>(json['extraData']), + extraData: serializer.fromJson?>(json['extraData']), ); } @override @@ -3961,7 +3961,7 @@ class ReactionEntity extends DataClass implements Insertable { 'type': serializer.toJson(type), 'createdAt': serializer.toJson(createdAt), 'score': serializer.toJson(score), - 'extraData': serializer.toJson?>(extraData), + 'extraData': serializer.toJson?>(extraData), }; } @@ -3971,7 +3971,7 @@ class ReactionEntity extends DataClass implements Insertable { String? type, DateTime? createdAt, int? score, - Value?> extraData = const Value.absent()}) => + Value?> extraData = const Value.absent()}) => ReactionEntity( userId: userId ?? this.userId, messageId: messageId ?? this.messageId, @@ -4025,7 +4025,7 @@ class ReactionsCompanion extends UpdateCompanion { final Value type; final Value createdAt; final Value score; - final Value?> extraData; + final Value?> extraData; final Value rowid; const ReactionsCompanion({ this.userId = const Value.absent(), @@ -4073,7 +4073,7 @@ class ReactionsCompanion extends UpdateCompanion { Value? type, Value? createdAt, Value? score, - Value?>? extraData, + Value?>? extraData, Value? rowid}) { return ReactionsCompanion( userId: userId ?? this.userId, @@ -4189,10 +4189,10 @@ class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> { static const VerificationMeta _extraDataMeta = const VerificationMeta('extraData'); @override - late final GeneratedColumnWithTypeConverter, String> + late final GeneratedColumnWithTypeConverter, String> extraData = GeneratedColumn('extra_data', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true) - .withConverter>($UsersTable.$converterextraData); + .withConverter>($UsersTable.$converterextraData); @override List get $columns => [ id, @@ -4287,8 +4287,8 @@ class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> { return $UsersTable(attachedDatabase, alias); } - static TypeConverter, String> $converterextraData = - MapConverter(); + static TypeConverter, String> $converterextraData = + MapConverter(); } class UserEntity extends DataClass implements Insertable { @@ -4317,7 +4317,7 @@ class UserEntity extends DataClass implements Insertable { final bool banned; /// Map of custom user extraData - final Map extraData; + final Map extraData; const UserEntity( {required this.id, this.role, @@ -4368,7 +4368,7 @@ class UserEntity extends DataClass implements Insertable { lastActive: serializer.fromJson(json['lastActive']), online: serializer.fromJson(json['online']), banned: serializer.fromJson(json['banned']), - extraData: serializer.fromJson>(json['extraData']), + extraData: serializer.fromJson>(json['extraData']), ); } @override @@ -4383,7 +4383,7 @@ class UserEntity extends DataClass implements Insertable { 'lastActive': serializer.toJson(lastActive), 'online': serializer.toJson(online), 'banned': serializer.toJson(banned), - 'extraData': serializer.toJson>(extraData), + 'extraData': serializer.toJson>(extraData), }; } @@ -4396,7 +4396,7 @@ class UserEntity extends DataClass implements Insertable { Value lastActive = const Value.absent(), bool? online, bool? banned, - Map? extraData}) => + Map? extraData}) => UserEntity( id: id ?? this.id, role: role.present ? role.value : this.role, @@ -4466,7 +4466,7 @@ class UsersCompanion extends UpdateCompanion { final Value lastActive; final Value online; final Value banned; - final Value> extraData; + final Value> extraData; final Value rowid; const UsersCompanion({ this.id = const Value.absent(), @@ -4489,7 +4489,7 @@ class UsersCompanion extends UpdateCompanion { this.lastActive = const Value.absent(), this.online = const Value.absent(), this.banned = const Value.absent(), - required Map extraData, + required Map extraData, this.rowid = const Value.absent(), }) : id = Value(id), extraData = Value(extraData); @@ -4528,7 +4528,7 @@ class UsersCompanion extends UpdateCompanion { Value? lastActive, Value? online, Value? banned, - Value>? extraData, + Value>? extraData, Value? rowid}) { return UsersCompanion( id: id ?? this.id, @@ -6203,7 +6203,7 @@ typedef $$ChannelsTableCreateCompanionBuilder = ChannelsCompanion Function({ Value deletedAt, Value memberCount, Value createdById, - Value?> extraData, + Value?> extraData, Value rowid, }); typedef $$ChannelsTableUpdateCompanionBuilder = ChannelsCompanion Function({ @@ -6219,7 +6219,7 @@ typedef $$ChannelsTableUpdateCompanionBuilder = ChannelsCompanion Function({ Value deletedAt, Value memberCount, Value createdById, - Value?> extraData, + Value?> extraData, Value rowid, }); @@ -6323,7 +6323,7 @@ class $$ChannelsTableFilterComposer ColumnFilters get createdById => $composableBuilder( column: $table.createdById, builder: (column) => ColumnFilters(column)); - ColumnWithTypeConverterFilters?, Map?, + ColumnWithTypeConverterFilters?, Map, String> get extraData => $composableBuilder( column: $table.extraData, @@ -6490,7 +6490,7 @@ class $$ChannelsTableAnnotationComposer GeneratedColumn get createdById => $composableBuilder( column: $table.createdById, builder: (column) => column); - GeneratedColumnWithTypeConverter?, String> + GeneratedColumnWithTypeConverter?, String> get extraData => $composableBuilder( column: $table.extraData, builder: (column) => column); @@ -6594,7 +6594,7 @@ class $$ChannelsTableTableManager extends RootTableManager< Value deletedAt = const Value.absent(), Value memberCount = const Value.absent(), Value createdById = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => ChannelsCompanion( @@ -6626,7 +6626,7 @@ class $$ChannelsTableTableManager extends RootTableManager< Value deletedAt = const Value.absent(), Value memberCount = const Value.absent(), Value createdById = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => ChannelsCompanion.insert( @@ -6745,7 +6745,7 @@ typedef $$MessagesTableCreateCompanionBuilder = MessagesCompanion Function({ Value pinnedByUserId, required String channelCid, Value?> i18n, - Value?> extraData, + Value?> extraData, Value rowid, }); typedef $$MessagesTableUpdateCompanionBuilder = MessagesCompanion Function({ @@ -6777,7 +6777,7 @@ typedef $$MessagesTableUpdateCompanionBuilder = MessagesCompanion Function({ Value pinnedByUserId, Value channelCid, Value?> i18n, - Value?> extraData, + Value?> extraData, Value rowid, }); @@ -6925,7 +6925,7 @@ class $$MessagesTableFilterComposer column: $table.i18n, builder: (column) => ColumnWithTypeConverterFilters(column)); - ColumnWithTypeConverterFilters?, Map?, + ColumnWithTypeConverterFilters?, Map, String> get extraData => $composableBuilder( column: $table.extraData, @@ -7194,7 +7194,7 @@ class $$MessagesTableAnnotationComposer GeneratedColumnWithTypeConverter?, String> get i18n => $composableBuilder(column: $table.i18n, builder: (column) => column); - GeneratedColumnWithTypeConverter?, String> + GeneratedColumnWithTypeConverter?, String> get extraData => $composableBuilder( column: $table.extraData, builder: (column) => column); @@ -7291,7 +7291,7 @@ class $$MessagesTableTableManager extends RootTableManager< Value pinnedByUserId = const Value.absent(), Value channelCid = const Value.absent(), Value?> i18n = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => MessagesCompanion( @@ -7355,7 +7355,7 @@ class $$MessagesTableTableManager extends RootTableManager< Value pinnedByUserId = const Value.absent(), required String channelCid, Value?> i18n = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => MessagesCompanion.insert( @@ -7487,7 +7487,7 @@ typedef $$PinnedMessagesTableCreateCompanionBuilder = PinnedMessagesCompanion Value pinnedByUserId, required String channelCid, Value?> i18n, - Value?> extraData, + Value?> extraData, Value rowid, }); typedef $$PinnedMessagesTableUpdateCompanionBuilder = PinnedMessagesCompanion @@ -7520,7 +7520,7 @@ typedef $$PinnedMessagesTableUpdateCompanionBuilder = PinnedMessagesCompanion Value pinnedByUserId, Value channelCid, Value?> i18n, - Value?> extraData, + Value?> extraData, Value rowid, }); @@ -7662,7 +7662,7 @@ class $$PinnedMessagesTableFilterComposer column: $table.i18n, builder: (column) => ColumnWithTypeConverterFilters(column)); - ColumnWithTypeConverterFilters?, Map?, + ColumnWithTypeConverterFilters?, Map, String> get extraData => $composableBuilder( column: $table.extraData, @@ -7899,7 +7899,7 @@ class $$PinnedMessagesTableAnnotationComposer GeneratedColumnWithTypeConverter?, String> get i18n => $composableBuilder(column: $table.i18n, builder: (column) => column); - GeneratedColumnWithTypeConverter?, String> + GeneratedColumnWithTypeConverter?, String> get extraData => $composableBuilder( column: $table.extraData, builder: (column) => column); @@ -7979,7 +7979,7 @@ class $$PinnedMessagesTableTableManager extends RootTableManager< Value pinnedByUserId = const Value.absent(), Value channelCid = const Value.absent(), Value?> i18n = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => PinnedMessagesCompanion( @@ -8043,7 +8043,7 @@ class $$PinnedMessagesTableTableManager extends RootTableManager< Value pinnedByUserId = const Value.absent(), required String channelCid, Value?> i18n = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => PinnedMessagesCompanion.insert( @@ -8131,7 +8131,7 @@ typedef $$PinnedMessageReactionsTableCreateCompanionBuilder required String type, Value createdAt, Value score, - Value?> extraData, + Value?> extraData, Value rowid, }); typedef $$PinnedMessageReactionsTableUpdateCompanionBuilder @@ -8141,7 +8141,7 @@ typedef $$PinnedMessageReactionsTableUpdateCompanionBuilder Value type, Value createdAt, Value score, - Value?> extraData, + Value?> extraData, Value rowid, }); @@ -8188,7 +8188,7 @@ class $$PinnedMessageReactionsTableFilterComposer ColumnFilters get score => $composableBuilder( column: $table.score, builder: (column) => ColumnFilters(column)); - ColumnWithTypeConverterFilters?, Map?, + ColumnWithTypeConverterFilters?, Map, String> get extraData => $composableBuilder( column: $table.extraData, @@ -8281,7 +8281,7 @@ class $$PinnedMessageReactionsTableAnnotationComposer GeneratedColumn get score => $composableBuilder(column: $table.score, builder: (column) => column); - GeneratedColumnWithTypeConverter?, String> + GeneratedColumnWithTypeConverter?, String> get extraData => $composableBuilder( column: $table.extraData, builder: (column) => column); @@ -8338,7 +8338,7 @@ class $$PinnedMessageReactionsTableTableManager extends RootTableManager< Value type = const Value.absent(), Value createdAt = const Value.absent(), Value score = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => PinnedMessageReactionsCompanion( @@ -8356,7 +8356,7 @@ class $$PinnedMessageReactionsTableTableManager extends RootTableManager< required String type, Value createdAt = const Value.absent(), Value score = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => PinnedMessageReactionsCompanion.insert( @@ -8432,7 +8432,7 @@ typedef $$ReactionsTableCreateCompanionBuilder = ReactionsCompanion Function({ required String type, Value createdAt, Value score, - Value?> extraData, + Value?> extraData, Value rowid, }); typedef $$ReactionsTableUpdateCompanionBuilder = ReactionsCompanion Function({ @@ -8441,7 +8441,7 @@ typedef $$ReactionsTableUpdateCompanionBuilder = ReactionsCompanion Function({ Value type, Value createdAt, Value score, - Value?> extraData, + Value?> extraData, Value rowid, }); @@ -8485,7 +8485,7 @@ class $$ReactionsTableFilterComposer ColumnFilters get score => $composableBuilder( column: $table.score, builder: (column) => ColumnFilters(column)); - ColumnWithTypeConverterFilters?, Map?, + ColumnWithTypeConverterFilters?, Map, String> get extraData => $composableBuilder( column: $table.extraData, @@ -8578,7 +8578,7 @@ class $$ReactionsTableAnnotationComposer GeneratedColumn get score => $composableBuilder(column: $table.score, builder: (column) => column); - GeneratedColumnWithTypeConverter?, String> + GeneratedColumnWithTypeConverter?, String> get extraData => $composableBuilder( column: $table.extraData, builder: (column) => column); @@ -8631,7 +8631,7 @@ class $$ReactionsTableTableManager extends RootTableManager< Value type = const Value.absent(), Value createdAt = const Value.absent(), Value score = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => ReactionsCompanion( @@ -8649,7 +8649,7 @@ class $$ReactionsTableTableManager extends RootTableManager< required String type, Value createdAt = const Value.absent(), Value score = const Value.absent(), - Value?> extraData = const Value.absent(), + Value?> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => ReactionsCompanion.insert( @@ -8726,7 +8726,7 @@ typedef $$UsersTableCreateCompanionBuilder = UsersCompanion Function({ Value lastActive, Value online, Value banned, - required Map extraData, + required Map extraData, Value rowid, }); typedef $$UsersTableUpdateCompanionBuilder = UsersCompanion Function({ @@ -8738,7 +8738,7 @@ typedef $$UsersTableUpdateCompanionBuilder = UsersCompanion Function({ Value lastActive, Value online, Value banned, - Value> extraData, + Value> extraData, Value rowid, }); @@ -8775,7 +8775,7 @@ class $$UsersTableFilterComposer ColumnFilters get banned => $composableBuilder( column: $table.banned, builder: (column) => ColumnFilters(column)); - ColumnWithTypeConverterFilters, Map, + ColumnWithTypeConverterFilters, Map, String> get extraData => $composableBuilder( column: $table.extraData, @@ -8852,7 +8852,7 @@ class $$UsersTableAnnotationComposer GeneratedColumn get banned => $composableBuilder(column: $table.banned, builder: (column) => column); - GeneratedColumnWithTypeConverter, String> + GeneratedColumnWithTypeConverter, String> get extraData => $composableBuilder( column: $table.extraData, builder: (column) => column); } @@ -8888,7 +8888,7 @@ class $$UsersTableTableManager extends RootTableManager< Value lastActive = const Value.absent(), Value online = const Value.absent(), Value banned = const Value.absent(), - Value> extraData = const Value.absent(), + Value> extraData = const Value.absent(), Value rowid = const Value.absent(), }) => UsersCompanion( @@ -8912,7 +8912,7 @@ class $$UsersTableTableManager extends RootTableManager< Value lastActive = const Value.absent(), Value online = const Value.absent(), Value banned = const Value.absent(), - required Map extraData, + required Map extraData, Value rowid = const Value.absent(), }) => UsersCompanion.insert( diff --git a/packages/stream_chat_persistence/lib/src/entity/channels.dart b/packages/stream_chat_persistence/lib/src/entity/channels.dart index 84b16fe64..351883578 100644 --- a/packages/stream_chat_persistence/lib/src/entity/channels.dart +++ b/packages/stream_chat_persistence/lib/src/entity/channels.dart @@ -43,7 +43,7 @@ class Channels extends Table { TextColumn get createdById => text().nullable()(); /// Map of custom channel extraData - TextColumn get extraData => text().nullable().map(MapConverter())(); + TextColumn get extraData => text().nullable().map(MapConverter())(); @override Set get primaryKey => {cid}; diff --git a/packages/stream_chat_persistence/lib/src/entity/messages.dart b/packages/stream_chat_persistence/lib/src/entity/messages.dart index 834d5b3c5..fb60d9151 100644 --- a/packages/stream_chat_persistence/lib/src/entity/messages.dart +++ b/packages/stream_chat_persistence/lib/src/entity/messages.dart @@ -124,7 +124,7 @@ class Messages extends Table { text().nullable().map(NullableMapConverter())(); /// Message custom extraData - TextColumn get extraData => text().nullable().map(MapConverter())(); + TextColumn get extraData => text().nullable().map(MapConverter())(); @override Set get primaryKey => {id}; diff --git a/packages/stream_chat_persistence/lib/src/entity/reactions.dart b/packages/stream_chat_persistence/lib/src/entity/reactions.dart index 5ea81b6d1..39bf42589 100644 --- a/packages/stream_chat_persistence/lib/src/entity/reactions.dart +++ b/packages/stream_chat_persistence/lib/src/entity/reactions.dart @@ -23,7 +23,7 @@ class Reactions extends Table { IntColumn get score => integer().withDefault(const Constant(0))(); /// Reaction custom extraData - TextColumn get extraData => text().nullable().map(MapConverter())(); + TextColumn get extraData => text().nullable().map(MapConverter())(); @override Set get primaryKey => { diff --git a/packages/stream_chat_persistence/lib/src/entity/users.dart b/packages/stream_chat_persistence/lib/src/entity/users.dart index 56b22e70a..4245c02e6 100644 --- a/packages/stream_chat_persistence/lib/src/entity/users.dart +++ b/packages/stream_chat_persistence/lib/src/entity/users.dart @@ -30,7 +30,7 @@ class Users extends Table { BoolColumn get banned => boolean().withDefault(const Constant(false))(); /// Map of custom user extraData - TextColumn get extraData => text().map(MapConverter())(); + TextColumn get extraData => text().map(MapConverter())(); @override Set get primaryKey => {id}; diff --git a/packages/stream_chat_persistence/lib/src/mapper/pinned_message_mapper.dart b/packages/stream_chat_persistence/lib/src/mapper/pinned_message_mapper.dart index 77ee78541..1993218f3 100644 --- a/packages/stream_chat_persistence/lib/src/mapper/pinned_message_mapper.dart +++ b/packages/stream_chat_persistence/lib/src/mapper/pinned_message_mapper.dart @@ -28,6 +28,7 @@ extension PinnedMessageEntityX on PinnedMessageEntity { localUpdatedAt: localUpdatedAt, deletedAt: remoteDeletedAt, localDeletedAt: localDeletedAt, + messageTextUpdatedAt: messageTextUpdatedAt, id: id, type: type, state: MessageState.fromJson(jsonDecode(state)), @@ -78,6 +79,7 @@ extension PMessageX on Message { userId: user?.id, remoteDeletedAt: remoteDeletedAt, localDeletedAt: localDeletedAt, + messageTextUpdatedAt: messageTextUpdatedAt, messageText: text, pinned: pinned, pinnedAt: pinnedAt, diff --git a/packages/stream_chat_persistence/test/src/mapper/message_mapper_test.dart b/packages/stream_chat_persistence/test/src/mapper/message_mapper_test.dart index 1134d0ee7..b81fbe038 100644 --- a/packages/stream_chat_persistence/test/src/mapper/message_mapper_test.dart +++ b/packages/stream_chat_persistence/test/src/mapper/message_mapper_test.dart @@ -55,6 +55,7 @@ void main() { state: jsonEncode(MessageState.sent), localUpdatedAt: DateTime.now(), remoteUpdatedAt: DateTime.now().add(const Duration(seconds: 1)), + messageTextUpdatedAt: DateTime.now().add(const Duration(minutes: 5)), extraData: {'extra_test_data': 'extraData'}, userId: user.id, localDeletedAt: DateTime.now(), @@ -99,6 +100,10 @@ void main() { expect(message.state, MessageState.fromJson(jsonDecode(entity.state))); expect(message.localUpdatedAt, isSameDateAs(entity.localUpdatedAt)); expect(message.remoteUpdatedAt, isSameDateAs(entity.remoteUpdatedAt)); + expect( + message.messageTextUpdatedAt, + isSameDateAs(entity.messageTextUpdatedAt), + ); expect(message.extraData, entity.extraData); expect(message.user!.id, entity.userId); expect(message.localDeletedAt, isSameDateAs(entity.localDeletedAt)); @@ -166,6 +171,7 @@ void main() { ), localUpdatedAt: DateTime.now(), updatedAt: DateTime.now().add(const Duration(seconds: 1)), + messageTextUpdatedAt: DateTime.now().add(const Duration(minutes: 5)), extraData: const {'extra_test_data': 'extraData'}, user: user, localDeletedAt: DateTime.now(), @@ -200,6 +206,10 @@ void main() { expect(entity.state, jsonEncode(message.state)); expect(entity.localUpdatedAt, isSameDateAs(message.localUpdatedAt)); expect(entity.remoteUpdatedAt, isSameDateAs(message.remoteUpdatedAt)); + expect( + entity.messageTextUpdatedAt, + isSameDateAs(message.messageTextUpdatedAt), + ); expect(entity.extraData, message.extraData); expect(entity.userId, message.user!.id); expect(entity.localDeletedAt, isSameDateAs(message.localDeletedAt)); diff --git a/packages/stream_chat_persistence/test/src/mapper/pinned_message_mapper_test.dart b/packages/stream_chat_persistence/test/src/mapper/pinned_message_mapper_test.dart index 569b75e0c..d5d3debef 100644 --- a/packages/stream_chat_persistence/test/src/mapper/pinned_message_mapper_test.dart +++ b/packages/stream_chat_persistence/test/src/mapper/pinned_message_mapper_test.dart @@ -55,6 +55,7 @@ void main() { state: jsonEncode(MessageState.sent), localUpdatedAt: DateTime.now(), remoteUpdatedAt: DateTime.now().add(const Duration(seconds: 1)), + messageTextUpdatedAt: DateTime.now().add(const Duration(minutes: 5)), extraData: {'extra_test_data': 'extraData'}, userId: user.id, localDeletedAt: DateTime.now(), @@ -99,6 +100,10 @@ void main() { expect(message.state, MessageState.fromJson(jsonDecode(entity.state))); expect(message.localUpdatedAt, isSameDateAs(entity.localUpdatedAt)); expect(message.remoteUpdatedAt, isSameDateAs(entity.remoteUpdatedAt)); + expect( + message.messageTextUpdatedAt, + isSameDateAs(entity.messageTextUpdatedAt), + ); expect(message.extraData, entity.extraData); expect(message.user!.id, entity.userId); expect(message.localDeletedAt, isSameDateAs(entity.localDeletedAt)); @@ -166,6 +171,7 @@ void main() { ), localUpdatedAt: DateTime.now(), updatedAt: DateTime.now().add(const Duration(seconds: 1)), + messageTextUpdatedAt: DateTime.now().add(const Duration(minutes: 5)), extraData: const {'extra_test_data': 'extraData'}, user: user, localDeletedAt: DateTime.now(), @@ -200,6 +206,10 @@ void main() { expect(entity.state, jsonEncode(message.state)); expect(entity.localUpdatedAt, isSameDateAs(message.localUpdatedAt)); expect(entity.remoteUpdatedAt, isSameDateAs(message.remoteUpdatedAt)); + expect( + message.messageTextUpdatedAt, + isSameDateAs(entity.messageTextUpdatedAt), + ); expect(entity.extraData, message.extraData); expect(entity.userId, message.user!.id); expect(entity.localDeletedAt, isSameDateAs(message.localDeletedAt));