regenerate files
This commit is contained in:
@@ -60,31 +60,30 @@ class ChannelEntity extends DataClass implements Insertable<ChannelEntity> {
|
|||||||
Map<String, dynamic> data, GeneratedDatabase db,
|
Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final boolType = db.typeSystem.forDartType<bool>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
final intType = db.typeSystem.forDartType<int>();
|
|
||||||
return ChannelEntity(
|
return ChannelEntity(
|
||||||
id: stringType.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
id: const StringType()
|
||||||
type: stringType.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||||
cid: stringType.mapFromDatabaseResponse(data['${effectivePrefix}cid'])!,
|
type: const StringType()
|
||||||
config: $ChannelsTable.$converter0.mapToDart(stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
||||||
|
cid: const StringType()
|
||||||
|
.mapFromDatabaseResponse(data['${effectivePrefix}cid'])!,
|
||||||
|
config: $ChannelsTable.$converter0.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}config']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}config']))!,
|
||||||
frozen:
|
frozen: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}frozen'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}frozen'])!,
|
||||||
lastMessageAt: dateTimeType
|
lastMessageAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}last_message_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}last_message_at']),
|
||||||
createdAt: dateTimeType
|
createdAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
||||||
updatedAt: dateTimeType
|
updatedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
||||||
deletedAt: dateTimeType
|
deletedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}deleted_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}deleted_at']),
|
||||||
memberCount: intType
|
memberCount: const IntType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}member_count'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}member_count'])!,
|
||||||
createdById: stringType
|
createdById: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_by_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_by_id']),
|
||||||
extraData: $ChannelsTable.$converter1.mapToDart(stringType
|
extraData: $ChannelsTable.$converter1.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -226,7 +225,7 @@ class ChannelEntity extends DataClass implements Insertable<ChannelEntity> {
|
|||||||
$mrjc(createdById.hashCode,
|
$mrjc(createdById.hashCode,
|
||||||
extraData.hashCode))))))))))));
|
extraData.hashCode))))))))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is ChannelEntity &&
|
(other is ChannelEntity &&
|
||||||
other.id == this.id &&
|
other.id == this.id &&
|
||||||
@@ -742,56 +741,54 @@ class MessageEntity extends DataClass implements Insertable<MessageEntity> {
|
|||||||
Map<String, dynamic> data, GeneratedDatabase db,
|
Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final intType = db.typeSystem.forDartType<int>();
|
|
||||||
final boolType = db.typeSystem.forDartType<bool>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
return MessageEntity(
|
return MessageEntity(
|
||||||
id: stringType.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
id: const StringType()
|
||||||
messageText: stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||||
|
messageText: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}message_text']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}message_text']),
|
||||||
attachments: $MessagesTable.$converter0.mapToDart(stringType
|
attachments: $MessagesTable.$converter0.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}attachments']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}attachments']))!,
|
||||||
status: $MessagesTable.$converter1.mapToDart(
|
status: $MessagesTable.$converter1.mapToDart(const IntType()
|
||||||
intType.mapFromDatabaseResponse(data['${effectivePrefix}status']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}status']))!,
|
||||||
type: stringType.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
type: const StringType()
|
||||||
mentionedUsers: $MessagesTable.$converter2.mapToDart(stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
||||||
|
mentionedUsers: $MessagesTable.$converter2.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}mentioned_users']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}mentioned_users']))!,
|
||||||
reactionCounts: $MessagesTable.$converter3.mapToDart(stringType
|
reactionCounts: $MessagesTable.$converter3.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}reaction_counts'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}reaction_counts'])),
|
||||||
reactionScores: $MessagesTable.$converter4.mapToDart(stringType
|
reactionScores: $MessagesTable.$converter4.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}reaction_scores'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}reaction_scores'])),
|
||||||
parentId: stringType
|
parentId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}parent_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}parent_id']),
|
||||||
quotedMessageId: stringType
|
quotedMessageId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}quoted_message_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}quoted_message_id']),
|
||||||
replyCount: intType
|
replyCount: const IntType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}reply_count']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}reply_count']),
|
||||||
showInChannel: boolType
|
showInChannel: const BoolType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}show_in_channel']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}show_in_channel']),
|
||||||
shadowed:
|
shadowed: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}shadowed'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}shadowed'])!,
|
||||||
command:
|
command: const StringType()
|
||||||
stringType.mapFromDatabaseResponse(data['${effectivePrefix}command']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}command']),
|
||||||
createdAt: dateTimeType
|
createdAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
||||||
updatedAt: dateTimeType
|
updatedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
||||||
deletedAt: dateTimeType
|
deletedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}deleted_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}deleted_at']),
|
||||||
userId:
|
userId: const StringType()
|
||||||
stringType.mapFromDatabaseResponse(data['${effectivePrefix}user_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}user_id']),
|
||||||
pinned:
|
pinned: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}pinned'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}pinned'])!,
|
||||||
pinnedAt: dateTimeType
|
pinnedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_at']),
|
||||||
pinExpires: dateTimeType
|
pinExpires: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}pin_expires']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}pin_expires']),
|
||||||
pinnedByUserId: stringType
|
pinnedByUserId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_by_user_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_by_user_id']),
|
||||||
channelCid: stringType
|
channelCid: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid']),
|
||||||
extraData: $MessagesTable.$converter5.mapToDart(stringType
|
extraData: $MessagesTable.$converter5.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1066,7 +1063,7 @@ class MessageEntity extends DataClass implements Insertable<MessageEntity> {
|
|||||||
pinned.hashCode,
|
pinned.hashCode,
|
||||||
$mrjc(pinnedAt.hashCode, $mrjc(pinExpires.hashCode, $mrjc(pinnedByUserId.hashCode, $mrjc(channelCid.hashCode, extraData.hashCode))))))))))))))))))))))));
|
$mrjc(pinnedAt.hashCode, $mrjc(pinExpires.hashCode, $mrjc(pinnedByUserId.hashCode, $mrjc(channelCid.hashCode, extraData.hashCode))))))))))))))))))))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is MessageEntity &&
|
(other is MessageEntity &&
|
||||||
other.id == this.id &&
|
other.id == this.id &&
|
||||||
@@ -1923,56 +1920,57 @@ class PinnedMessageEntity extends DataClass
|
|||||||
Map<String, dynamic> data, GeneratedDatabase db,
|
Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final intType = db.typeSystem.forDartType<int>();
|
|
||||||
final boolType = db.typeSystem.forDartType<bool>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
return PinnedMessageEntity(
|
return PinnedMessageEntity(
|
||||||
id: stringType.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
id: const StringType()
|
||||||
messageText: stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||||
|
messageText: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}message_text']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}message_text']),
|
||||||
attachments: $PinnedMessagesTable.$converter0.mapToDart(stringType
|
attachments: $PinnedMessagesTable.$converter0.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}attachments']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}attachments']))!,
|
||||||
status: $PinnedMessagesTable.$converter1.mapToDart(
|
status: $PinnedMessagesTable.$converter1.mapToDart(const IntType()
|
||||||
intType.mapFromDatabaseResponse(data['${effectivePrefix}status']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}status']))!,
|
||||||
type: stringType.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
type: const StringType()
|
||||||
mentionedUsers: $PinnedMessagesTable.$converter2.mapToDart(stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}mentioned_users']))!,
|
mentionedUsers: $PinnedMessagesTable.$converter2.mapToDart(
|
||||||
reactionCounts: $PinnedMessagesTable.$converter3.mapToDart(stringType
|
const StringType().mapFromDatabaseResponse(
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}reaction_counts'])),
|
data['${effectivePrefix}mentioned_users']))!,
|
||||||
reactionScores: $PinnedMessagesTable.$converter4.mapToDart(stringType
|
reactionCounts: $PinnedMessagesTable.$converter3.mapToDart(
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}reaction_scores'])),
|
const StringType().mapFromDatabaseResponse(
|
||||||
parentId: stringType
|
data['${effectivePrefix}reaction_counts'])),
|
||||||
|
reactionScores: $PinnedMessagesTable.$converter4.mapToDart(
|
||||||
|
const StringType().mapFromDatabaseResponse(
|
||||||
|
data['${effectivePrefix}reaction_scores'])),
|
||||||
|
parentId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}parent_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}parent_id']),
|
||||||
quotedMessageId: stringType
|
quotedMessageId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}quoted_message_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}quoted_message_id']),
|
||||||
replyCount: intType
|
replyCount: const IntType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}reply_count']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}reply_count']),
|
||||||
showInChannel: boolType
|
showInChannel: const BoolType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}show_in_channel']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}show_in_channel']),
|
||||||
shadowed:
|
shadowed: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}shadowed'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}shadowed'])!,
|
||||||
command:
|
command: const StringType()
|
||||||
stringType.mapFromDatabaseResponse(data['${effectivePrefix}command']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}command']),
|
||||||
createdAt: dateTimeType
|
createdAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
||||||
updatedAt: dateTimeType
|
updatedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
||||||
deletedAt: dateTimeType
|
deletedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}deleted_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}deleted_at']),
|
||||||
userId:
|
userId: const StringType()
|
||||||
stringType.mapFromDatabaseResponse(data['${effectivePrefix}user_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}user_id']),
|
||||||
pinned:
|
pinned: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}pinned'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}pinned'])!,
|
||||||
pinnedAt: dateTimeType
|
pinnedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_at']),
|
||||||
pinExpires: dateTimeType
|
pinExpires: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}pin_expires']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}pin_expires']),
|
||||||
pinnedByUserId: stringType
|
pinnedByUserId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_by_user_id']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}pinned_by_user_id']),
|
||||||
channelCid: stringType
|
channelCid: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid']),
|
||||||
extraData: $PinnedMessagesTable.$converter5.mapToDart(stringType
|
extraData: $PinnedMessagesTable.$converter5.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -2247,7 +2245,7 @@ class PinnedMessageEntity extends DataClass
|
|||||||
pinned.hashCode,
|
pinned.hashCode,
|
||||||
$mrjc(pinnedAt.hashCode, $mrjc(pinExpires.hashCode, $mrjc(pinnedByUserId.hashCode, $mrjc(channelCid.hashCode, extraData.hashCode))))))))))))))))))))))));
|
$mrjc(pinnedAt.hashCode, $mrjc(pinExpires.hashCode, $mrjc(pinnedByUserId.hashCode, $mrjc(channelCid.hashCode, extraData.hashCode))))))))))))))))))))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is PinnedMessageEntity &&
|
(other is PinnedMessageEntity &&
|
||||||
other.id == this.id &&
|
other.id == this.id &&
|
||||||
@@ -3031,19 +3029,18 @@ class ReactionEntity extends DataClass implements Insertable<ReactionEntity> {
|
|||||||
Map<String, dynamic> data, GeneratedDatabase db,
|
Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
final intType = db.typeSystem.forDartType<int>();
|
|
||||||
return ReactionEntity(
|
return ReactionEntity(
|
||||||
userId: stringType
|
userId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}user_id'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}user_id'])!,
|
||||||
messageId: stringType
|
messageId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}message_id'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}message_id'])!,
|
||||||
type: stringType.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
type: const StringType()
|
||||||
createdAt: dateTimeType
|
.mapFromDatabaseResponse(data['${effectivePrefix}type'])!,
|
||||||
|
createdAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
||||||
score: intType.mapFromDatabaseResponse(data['${effectivePrefix}score'])!,
|
score: const IntType()
|
||||||
extraData: $ReactionsTable.$converter0.mapToDart(stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}score'])!,
|
||||||
|
extraData: $ReactionsTable.$converter0.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data'])),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3125,7 +3122,7 @@ class ReactionEntity extends DataClass implements Insertable<ReactionEntity> {
|
|||||||
$mrjc(createdAt.hashCode,
|
$mrjc(createdAt.hashCode,
|
||||||
$mrjc(score.hashCode, extraData.hashCode))))));
|
$mrjc(score.hashCode, extraData.hashCode))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is ReactionEntity &&
|
(other is ReactionEntity &&
|
||||||
other.userId == this.userId &&
|
other.userId == this.userId &&
|
||||||
@@ -3395,23 +3392,22 @@ class UserEntity extends DataClass implements Insertable<UserEntity> {
|
|||||||
factory UserEntity.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
factory UserEntity.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
final boolType = db.typeSystem.forDartType<bool>();
|
|
||||||
return UserEntity(
|
return UserEntity(
|
||||||
id: stringType.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
id: const StringType()
|
||||||
role: stringType.mapFromDatabaseResponse(data['${effectivePrefix}role']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||||
createdAt: dateTimeType
|
role: const StringType()
|
||||||
|
.mapFromDatabaseResponse(data['${effectivePrefix}role']),
|
||||||
|
createdAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
||||||
updatedAt: dateTimeType
|
updatedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
||||||
lastActive: dateTimeType
|
lastActive: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}last_active']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}last_active']),
|
||||||
online:
|
online: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}online'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}online'])!,
|
||||||
banned:
|
banned: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}banned'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}banned'])!,
|
||||||
extraData: $UsersTable.$converter0.mapToDart(stringType
|
extraData: $UsersTable.$converter0.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data']))!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}extra_data']))!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3513,7 +3509,7 @@ class UserEntity extends DataClass implements Insertable<UserEntity> {
|
|||||||
$mrjc(online.hashCode,
|
$mrjc(online.hashCode,
|
||||||
$mrjc(banned.hashCode, extraData.hashCode))))))));
|
$mrjc(banned.hashCode, extraData.hashCode))))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is UserEntity &&
|
(other is UserEntity &&
|
||||||
other.id == this.id &&
|
other.id == this.id &&
|
||||||
@@ -3554,7 +3550,7 @@ class UsersCompanion extends UpdateCompanion<UserEntity> {
|
|||||||
this.online = const Value.absent(),
|
this.online = const Value.absent(),
|
||||||
this.banned = const Value.absent(),
|
this.banned = const Value.absent(),
|
||||||
required Map<String, Object?> extraData,
|
required Map<String, Object?> extraData,
|
||||||
}) : id = Value(id),
|
}) : id = Value(id),
|
||||||
extraData = Value(extraData);
|
extraData = Value(extraData);
|
||||||
static Insertable<UserEntity> custom({
|
static Insertable<UserEntity> custom({
|
||||||
Expression<String>? id,
|
Expression<String>? id,
|
||||||
@@ -3841,30 +3837,28 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|||||||
factory MemberEntity.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
factory MemberEntity.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
final boolType = db.typeSystem.forDartType<bool>();
|
|
||||||
return MemberEntity(
|
return MemberEntity(
|
||||||
userId: stringType
|
userId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}user_id'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}user_id'])!,
|
||||||
channelCid: stringType
|
channelCid: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
||||||
role: stringType.mapFromDatabaseResponse(data['${effectivePrefix}role']),
|
role: const StringType()
|
||||||
inviteAcceptedAt: dateTimeType.mapFromDatabaseResponse(
|
.mapFromDatabaseResponse(data['${effectivePrefix}role']),
|
||||||
|
inviteAcceptedAt: const DateTimeType().mapFromDatabaseResponse(
|
||||||
data['${effectivePrefix}invite_accepted_at']),
|
data['${effectivePrefix}invite_accepted_at']),
|
||||||
inviteRejectedAt: dateTimeType.mapFromDatabaseResponse(
|
inviteRejectedAt: const DateTimeType().mapFromDatabaseResponse(
|
||||||
data['${effectivePrefix}invite_rejected_at']),
|
data['${effectivePrefix}invite_rejected_at']),
|
||||||
invited:
|
invited: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}invited'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}invited'])!,
|
||||||
banned:
|
banned: const BoolType()
|
||||||
boolType.mapFromDatabaseResponse(data['${effectivePrefix}banned'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}banned'])!,
|
||||||
shadowBanned: boolType
|
shadowBanned: const BoolType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}shadow_banned'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}shadow_banned'])!,
|
||||||
isModerator: boolType
|
isModerator: const BoolType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}is_moderator'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}is_moderator'])!,
|
||||||
createdAt: dateTimeType
|
createdAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}created_at'])!,
|
||||||
updatedAt: dateTimeType
|
updatedAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}updated_at'])!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -3997,7 +3991,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|||||||
$mrjc(createdAt.hashCode,
|
$mrjc(createdAt.hashCode,
|
||||||
updatedAt.hashCode)))))))))));
|
updatedAt.hashCode)))))))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is MemberEntity &&
|
(other is MemberEntity &&
|
||||||
other.userId == this.userId &&
|
other.userId == this.userId &&
|
||||||
@@ -4396,17 +4390,14 @@ class ReadEntity extends DataClass implements Insertable<ReadEntity> {
|
|||||||
factory ReadEntity.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
factory ReadEntity.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final intType = db.typeSystem.forDartType<int>();
|
|
||||||
return ReadEntity(
|
return ReadEntity(
|
||||||
lastRead: dateTimeType
|
lastRead: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}last_read'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}last_read'])!,
|
||||||
userId: stringType
|
userId: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}user_id'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}user_id'])!,
|
||||||
channelCid: stringType
|
channelCid: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
||||||
unreadMessages: intType
|
unreadMessages: const IntType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}unread_messages'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}unread_messages'])!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -4469,7 +4460,7 @@ class ReadEntity extends DataClass implements Insertable<ReadEntity> {
|
|||||||
$mrjc(userId.hashCode,
|
$mrjc(userId.hashCode,
|
||||||
$mrjc(channelCid.hashCode, unreadMessages.hashCode))));
|
$mrjc(channelCid.hashCode, unreadMessages.hashCode))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is ReadEntity &&
|
(other is ReadEntity &&
|
||||||
other.lastRead == this.lastRead &&
|
other.lastRead == this.lastRead &&
|
||||||
@@ -4666,11 +4657,10 @@ class ChannelQueryEntity extends DataClass
|
|||||||
Map<String, dynamic> data, GeneratedDatabase db,
|
Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
return ChannelQueryEntity(
|
return ChannelQueryEntity(
|
||||||
queryHash: stringType
|
queryHash: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}query_hash'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}query_hash'])!,
|
||||||
channelCid: stringType
|
channelCid: const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -4716,7 +4706,7 @@ class ChannelQueryEntity extends DataClass
|
|||||||
@override
|
@override
|
||||||
int get hashCode => $mrjf($mrjc(queryHash.hashCode, channelCid.hashCode));
|
int get hashCode => $mrjf($mrjc(queryHash.hashCode, channelCid.hashCode));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is ChannelQueryEntity &&
|
(other is ChannelQueryEntity &&
|
||||||
other.queryHash == this.queryHash &&
|
other.queryHash == this.queryHash &&
|
||||||
@@ -4733,7 +4723,7 @@ class ChannelQueriesCompanion extends UpdateCompanion<ChannelQueryEntity> {
|
|||||||
ChannelQueriesCompanion.insert({
|
ChannelQueriesCompanion.insert({
|
||||||
required String queryHash,
|
required String queryHash,
|
||||||
required String channelCid,
|
required String channelCid,
|
||||||
}) : queryHash = Value(queryHash),
|
}) : queryHash = Value(queryHash),
|
||||||
channelCid = Value(channelCid);
|
channelCid = Value(channelCid);
|
||||||
static Insertable<ChannelQueryEntity> custom({
|
static Insertable<ChannelQueryEntity> custom({
|
||||||
Expression<String>? queryHash,
|
Expression<String>? queryHash,
|
||||||
@@ -4876,20 +4866,18 @@ class ConnectionEventEntity extends DataClass
|
|||||||
Map<String, dynamic> data, GeneratedDatabase db,
|
Map<String, dynamic> data, GeneratedDatabase db,
|
||||||
{String? prefix}) {
|
{String? prefix}) {
|
||||||
final effectivePrefix = prefix ?? '';
|
final effectivePrefix = prefix ?? '';
|
||||||
final intType = db.typeSystem.forDartType<int>();
|
|
||||||
final stringType = db.typeSystem.forDartType<String>();
|
|
||||||
final dateTimeType = db.typeSystem.forDartType<DateTime>();
|
|
||||||
return ConnectionEventEntity(
|
return ConnectionEventEntity(
|
||||||
id: intType.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
id: const IntType()
|
||||||
ownUser: $ConnectionEventsTable.$converter0.mapToDart(stringType
|
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||||
|
ownUser: $ConnectionEventsTable.$converter0.mapToDart(const StringType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}own_user'])),
|
.mapFromDatabaseResponse(data['${effectivePrefix}own_user'])),
|
||||||
totalUnreadCount: intType.mapFromDatabaseResponse(
|
totalUnreadCount: const IntType().mapFromDatabaseResponse(
|
||||||
data['${effectivePrefix}total_unread_count']),
|
data['${effectivePrefix}total_unread_count']),
|
||||||
unreadChannels: intType
|
unreadChannels: const IntType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}unread_channels']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}unread_channels']),
|
||||||
lastEventAt: dateTimeType
|
lastEventAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}last_event_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}last_event_at']),
|
||||||
lastSyncAt: dateTimeType
|
lastSyncAt: const DateTimeType()
|
||||||
.mapFromDatabaseResponse(data['${effectivePrefix}last_sync_at']),
|
.mapFromDatabaseResponse(data['${effectivePrefix}last_sync_at']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -4982,7 +4970,7 @@ class ConnectionEventEntity extends DataClass
|
|||||||
$mrjc(unreadChannels.hashCode,
|
$mrjc(unreadChannels.hashCode,
|
||||||
$mrjc(lastEventAt.hashCode, lastSyncAt.hashCode))))));
|
$mrjc(lastEventAt.hashCode, lastSyncAt.hashCode))))));
|
||||||
@override
|
@override
|
||||||
bool operator ==(dynamic other) =>
|
bool operator ==(Object other) =>
|
||||||
identical(this, other) ||
|
identical(this, other) ||
|
||||||
(other is ConnectionEventEntity &&
|
(other is ConnectionEventEntity &&
|
||||||
other.id == this.id &&
|
other.id == this.id &&
|
||||||
|
|||||||
Reference in New Issue
Block a user