|
|
|
@@ -3888,6 +3888,9 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
/// The role of the user in the channel
|
|
|
|
|
final String? role;
|
|
|
|
|
|
|
|
|
|
/// The role of the user in the channel
|
|
|
|
|
final String? channelRole;
|
|
|
|
|
|
|
|
|
|
/// The date on which the user accepted the invite to the channel
|
|
|
|
|
final DateTime? inviteAcceptedAt;
|
|
|
|
|
|
|
|
|
@@ -3915,6 +3918,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
{required this.userId,
|
|
|
|
|
required this.channelCid,
|
|
|
|
|
this.role,
|
|
|
|
|
this.channelRole,
|
|
|
|
|
this.inviteAcceptedAt,
|
|
|
|
|
this.inviteRejectedAt,
|
|
|
|
|
required this.invited,
|
|
|
|
@@ -3932,6 +3936,8 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_cid'])!,
|
|
|
|
|
role: const StringType()
|
|
|
|
|
.mapFromDatabaseResponse(data['${effectivePrefix}role']),
|
|
|
|
|
channelRole: const StringType()
|
|
|
|
|
.mapFromDatabaseResponse(data['${effectivePrefix}channel_role']),
|
|
|
|
|
inviteAcceptedAt: const DateTimeType().mapFromDatabaseResponse(
|
|
|
|
|
data['${effectivePrefix}invite_accepted_at']),
|
|
|
|
|
inviteRejectedAt: const DateTimeType().mapFromDatabaseResponse(
|
|
|
|
@@ -3958,6 +3964,9 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
if (!nullToAbsent || role != null) {
|
|
|
|
|
map['role'] = Variable<String?>(role);
|
|
|
|
|
}
|
|
|
|
|
if (!nullToAbsent || channelRole != null) {
|
|
|
|
|
map['channel_role'] = Variable<String?>(channelRole);
|
|
|
|
|
}
|
|
|
|
|
if (!nullToAbsent || inviteAcceptedAt != null) {
|
|
|
|
|
map['invite_accepted_at'] = Variable<DateTime?>(inviteAcceptedAt);
|
|
|
|
|
}
|
|
|
|
@@ -3980,6 +3989,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
userId: serializer.fromJson<String>(json['userId']),
|
|
|
|
|
channelCid: serializer.fromJson<String>(json['channelCid']),
|
|
|
|
|
role: serializer.fromJson<String?>(json['role']),
|
|
|
|
|
channelRole: serializer.fromJson<String?>(json['channelRole']),
|
|
|
|
|
inviteAcceptedAt:
|
|
|
|
|
serializer.fromJson<DateTime?>(json['inviteAcceptedAt']),
|
|
|
|
|
inviteRejectedAt:
|
|
|
|
@@ -3999,6 +4009,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
'userId': serializer.toJson<String>(userId),
|
|
|
|
|
'channelCid': serializer.toJson<String>(channelCid),
|
|
|
|
|
'role': serializer.toJson<String?>(role),
|
|
|
|
|
'channelRole': serializer.toJson<String?>(channelRole),
|
|
|
|
|
'inviteAcceptedAt': serializer.toJson<DateTime?>(inviteAcceptedAt),
|
|
|
|
|
'inviteRejectedAt': serializer.toJson<DateTime?>(inviteRejectedAt),
|
|
|
|
|
'invited': serializer.toJson<bool>(invited),
|
|
|
|
@@ -4014,6 +4025,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
{String? userId,
|
|
|
|
|
String? channelCid,
|
|
|
|
|
Value<String?> role = const Value.absent(),
|
|
|
|
|
Value<String?> channelRole = const Value.absent(),
|
|
|
|
|
Value<DateTime?> inviteAcceptedAt = const Value.absent(),
|
|
|
|
|
Value<DateTime?> inviteRejectedAt = const Value.absent(),
|
|
|
|
|
bool? invited,
|
|
|
|
@@ -4026,6 +4038,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
userId: userId ?? this.userId,
|
|
|
|
|
channelCid: channelCid ?? this.channelCid,
|
|
|
|
|
role: role.present ? role.value : this.role,
|
|
|
|
|
channelRole: channelRole.present ? channelRole.value : this.channelRole,
|
|
|
|
|
inviteAcceptedAt: inviteAcceptedAt.present
|
|
|
|
|
? inviteAcceptedAt.value
|
|
|
|
|
: this.inviteAcceptedAt,
|
|
|
|
@@ -4045,6 +4058,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
..write('userId: $userId, ')
|
|
|
|
|
..write('channelCid: $channelCid, ')
|
|
|
|
|
..write('role: $role, ')
|
|
|
|
|
..write('channelRole: $channelRole, ')
|
|
|
|
|
..write('inviteAcceptedAt: $inviteAcceptedAt, ')
|
|
|
|
|
..write('inviteRejectedAt: $inviteRejectedAt, ')
|
|
|
|
|
..write('invited: $invited, ')
|
|
|
|
@@ -4062,6 +4076,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
userId,
|
|
|
|
|
channelCid,
|
|
|
|
|
role,
|
|
|
|
|
channelRole,
|
|
|
|
|
inviteAcceptedAt,
|
|
|
|
|
inviteRejectedAt,
|
|
|
|
|
invited,
|
|
|
|
@@ -4077,6 +4092,7 @@ class MemberEntity extends DataClass implements Insertable<MemberEntity> {
|
|
|
|
|
other.userId == this.userId &&
|
|
|
|
|
other.channelCid == this.channelCid &&
|
|
|
|
|
other.role == this.role &&
|
|
|
|
|
other.channelRole == this.channelRole &&
|
|
|
|
|
other.inviteAcceptedAt == this.inviteAcceptedAt &&
|
|
|
|
|
other.inviteRejectedAt == this.inviteRejectedAt &&
|
|
|
|
|
other.invited == this.invited &&
|
|
|
|
@@ -4091,6 +4107,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
final Value<String> userId;
|
|
|
|
|
final Value<String> channelCid;
|
|
|
|
|
final Value<String?> role;
|
|
|
|
|
final Value<String?> channelRole;
|
|
|
|
|
final Value<DateTime?> inviteAcceptedAt;
|
|
|
|
|
final Value<DateTime?> inviteRejectedAt;
|
|
|
|
|
final Value<bool> invited;
|
|
|
|
@@ -4103,6 +4120,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
this.userId = const Value.absent(),
|
|
|
|
|
this.channelCid = const Value.absent(),
|
|
|
|
|
this.role = const Value.absent(),
|
|
|
|
|
this.channelRole = const Value.absent(),
|
|
|
|
|
this.inviteAcceptedAt = const Value.absent(),
|
|
|
|
|
this.inviteRejectedAt = const Value.absent(),
|
|
|
|
|
this.invited = const Value.absent(),
|
|
|
|
@@ -4116,6 +4134,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
required String userId,
|
|
|
|
|
required String channelCid,
|
|
|
|
|
this.role = const Value.absent(),
|
|
|
|
|
this.channelRole = const Value.absent(),
|
|
|
|
|
this.inviteAcceptedAt = const Value.absent(),
|
|
|
|
|
this.inviteRejectedAt = const Value.absent(),
|
|
|
|
|
this.invited = const Value.absent(),
|
|
|
|
@@ -4130,6 +4149,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
Expression<String>? userId,
|
|
|
|
|
Expression<String>? channelCid,
|
|
|
|
|
Expression<String?>? role,
|
|
|
|
|
Expression<String?>? channelRole,
|
|
|
|
|
Expression<DateTime?>? inviteAcceptedAt,
|
|
|
|
|
Expression<DateTime?>? inviteRejectedAt,
|
|
|
|
|
Expression<bool>? invited,
|
|
|
|
@@ -4143,6 +4163,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
if (userId != null) 'user_id': userId,
|
|
|
|
|
if (channelCid != null) 'channel_cid': channelCid,
|
|
|
|
|
if (role != null) 'role': role,
|
|
|
|
|
if (channelRole != null) 'channel_role': channelRole,
|
|
|
|
|
if (inviteAcceptedAt != null) 'invite_accepted_at': inviteAcceptedAt,
|
|
|
|
|
if (inviteRejectedAt != null) 'invite_rejected_at': inviteRejectedAt,
|
|
|
|
|
if (invited != null) 'invited': invited,
|
|
|
|
@@ -4158,6 +4179,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
{Value<String>? userId,
|
|
|
|
|
Value<String>? channelCid,
|
|
|
|
|
Value<String?>? role,
|
|
|
|
|
Value<String?>? channelRole,
|
|
|
|
|
Value<DateTime?>? inviteAcceptedAt,
|
|
|
|
|
Value<DateTime?>? inviteRejectedAt,
|
|
|
|
|
Value<bool>? invited,
|
|
|
|
@@ -4170,6 +4192,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
userId: userId ?? this.userId,
|
|
|
|
|
channelCid: channelCid ?? this.channelCid,
|
|
|
|
|
role: role ?? this.role,
|
|
|
|
|
channelRole: channelRole ?? this.channelRole,
|
|
|
|
|
inviteAcceptedAt: inviteAcceptedAt ?? this.inviteAcceptedAt,
|
|
|
|
|
inviteRejectedAt: inviteRejectedAt ?? this.inviteRejectedAt,
|
|
|
|
|
invited: invited ?? this.invited,
|
|
|
|
@@ -4193,6 +4216,9 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
if (role.present) {
|
|
|
|
|
map['role'] = Variable<String?>(role.value);
|
|
|
|
|
}
|
|
|
|
|
if (channelRole.present) {
|
|
|
|
|
map['channel_role'] = Variable<String?>(channelRole.value);
|
|
|
|
|
}
|
|
|
|
|
if (inviteAcceptedAt.present) {
|
|
|
|
|
map['invite_accepted_at'] = Variable<DateTime?>(inviteAcceptedAt.value);
|
|
|
|
|
}
|
|
|
|
@@ -4226,6 +4252,7 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
|
|
|
|
|
..write('userId: $userId, ')
|
|
|
|
|
..write('channelCid: $channelCid, ')
|
|
|
|
|
..write('role: $role, ')
|
|
|
|
|
..write('channelRole: $channelRole, ')
|
|
|
|
|
..write('inviteAcceptedAt: $inviteAcceptedAt, ')
|
|
|
|
|
..write('inviteRejectedAt: $inviteRejectedAt, ')
|
|
|
|
|
..write('invited: $invited, ')
|
|
|
|
@@ -4262,6 +4289,12 @@ class $MembersTable extends Members
|
|
|
|
|
late final GeneratedColumn<String?> role = GeneratedColumn<String?>(
|
|
|
|
|
'role', aliasedName, true,
|
|
|
|
|
type: const StringType(), requiredDuringInsert: false);
|
|
|
|
|
final VerificationMeta _channelRoleMeta =
|
|
|
|
|
const VerificationMeta('channelRole');
|
|
|
|
|
@override
|
|
|
|
|
late final GeneratedColumn<String?> channelRole = GeneratedColumn<String?>(
|
|
|
|
|
'channel_role', aliasedName, true,
|
|
|
|
|
type: const StringType(), requiredDuringInsert: false);
|
|
|
|
|
final VerificationMeta _inviteAcceptedAtMeta =
|
|
|
|
|
const VerificationMeta('inviteAcceptedAt');
|
|
|
|
|
@override
|
|
|
|
@@ -4327,6 +4360,7 @@ class $MembersTable extends Members
|
|
|
|
|
userId,
|
|
|
|
|
channelCid,
|
|
|
|
|
role,
|
|
|
|
|
channelRole,
|
|
|
|
|
inviteAcceptedAt,
|
|
|
|
|
inviteRejectedAt,
|
|
|
|
|
invited,
|
|
|
|
@@ -4363,6 +4397,12 @@ class $MembersTable extends Members
|
|
|
|
|
context.handle(
|
|
|
|
|
_roleMeta, role.isAcceptableOrUnknown(data['role']!, _roleMeta));
|
|
|
|
|
}
|
|
|
|
|
if (data.containsKey('channel_role')) {
|
|
|
|
|
context.handle(
|
|
|
|
|
_channelRoleMeta,
|
|
|
|
|
channelRole.isAcceptableOrUnknown(
|
|
|
|
|
data['channel_role']!, _channelRoleMeta));
|
|
|
|
|
}
|
|
|
|
|
if (data.containsKey('invite_accepted_at')) {
|
|
|
|
|
context.handle(
|
|
|
|
|
_inviteAcceptedAtMeta,
|
|
|
|
|