// dart format width=80 // ignore_for_file: type=lint import 'package:drift/drift.dart' as i0; import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart' as i1; import 'package:immich_mobile/domain/models/user_metadata.model.dart' as i2; import 'package:immich_mobile/infrastructure/entities/auth_user.entity.dart' as i3; import 'package:drift/src/runtime/query_builder/query_builder.dart' as i4; typedef $$AuthUserEntityTableCreateCompanionBuilder = i1.AuthUserEntityCompanion Function({ required String id, required String name, required String email, i0.Value deletedAt, i0.Value avatarColor, i0.Value isAdmin, i0.Value oauthId, i0.Value pinCode, i0.Value hasProfileImage, i0.Value profileChangedAt, i0.Value quotaSizeInBytes, i0.Value quotaUsageInBytes, i0.Value storageLabel, }); typedef $$AuthUserEntityTableUpdateCompanionBuilder = i1.AuthUserEntityCompanion Function({ i0.Value id, i0.Value name, i0.Value email, i0.Value deletedAt, i0.Value avatarColor, i0.Value isAdmin, i0.Value oauthId, i0.Value pinCode, i0.Value hasProfileImage, i0.Value profileChangedAt, i0.Value quotaSizeInBytes, i0.Value quotaUsageInBytes, i0.Value storageLabel, }); class $$AuthUserEntityTableFilterComposer extends i0.Composer { $$AuthUserEntityTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); i0.ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get name => $composableBuilder( column: $table.name, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get email => $composableBuilder( column: $table.email, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get deletedAt => $composableBuilder( column: $table.deletedAt, builder: (column) => i0.ColumnFilters(column)); i0.ColumnWithTypeConverterFilters get avatarColor => $composableBuilder( column: $table.avatarColor, builder: (column) => i0.ColumnWithTypeConverterFilters(column)); i0.ColumnFilters get isAdmin => $composableBuilder( column: $table.isAdmin, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get oauthId => $composableBuilder( column: $table.oauthId, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get pinCode => $composableBuilder( column: $table.pinCode, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get hasProfileImage => $composableBuilder( column: $table.hasProfileImage, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get profileChangedAt => $composableBuilder( column: $table.profileChangedAt, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get quotaSizeInBytes => $composableBuilder( column: $table.quotaSizeInBytes, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get quotaUsageInBytes => $composableBuilder( column: $table.quotaUsageInBytes, builder: (column) => i0.ColumnFilters(column)); i0.ColumnFilters get storageLabel => $composableBuilder( column: $table.storageLabel, builder: (column) => i0.ColumnFilters(column)); } class $$AuthUserEntityTableOrderingComposer extends i0.Composer { $$AuthUserEntityTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); i0.ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get name => $composableBuilder( column: $table.name, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get email => $composableBuilder( column: $table.email, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get deletedAt => $composableBuilder( column: $table.deletedAt, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get avatarColor => $composableBuilder( column: $table.avatarColor, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get isAdmin => $composableBuilder( column: $table.isAdmin, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get oauthId => $composableBuilder( column: $table.oauthId, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get pinCode => $composableBuilder( column: $table.pinCode, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get hasProfileImage => $composableBuilder( column: $table.hasProfileImage, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get profileChangedAt => $composableBuilder( column: $table.profileChangedAt, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get quotaSizeInBytes => $composableBuilder( column: $table.quotaSizeInBytes, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get quotaUsageInBytes => $composableBuilder( column: $table.quotaUsageInBytes, builder: (column) => i0.ColumnOrderings(column)); i0.ColumnOrderings get storageLabel => $composableBuilder( column: $table.storageLabel, builder: (column) => i0.ColumnOrderings(column)); } class $$AuthUserEntityTableAnnotationComposer extends i0.Composer { $$AuthUserEntityTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); i0.GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); i0.GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); i0.GeneratedColumn get email => $composableBuilder(column: $table.email, builder: (column) => column); i0.GeneratedColumn get deletedAt => $composableBuilder(column: $table.deletedAt, builder: (column) => column); i0.GeneratedColumnWithTypeConverter get avatarColor => $composableBuilder( column: $table.avatarColor, builder: (column) => column); i0.GeneratedColumn get isAdmin => $composableBuilder(column: $table.isAdmin, builder: (column) => column); i0.GeneratedColumn get oauthId => $composableBuilder(column: $table.oauthId, builder: (column) => column); i0.GeneratedColumn get pinCode => $composableBuilder(column: $table.pinCode, builder: (column) => column); i0.GeneratedColumn get hasProfileImage => $composableBuilder( column: $table.hasProfileImage, builder: (column) => column); i0.GeneratedColumn get profileChangedAt => $composableBuilder( column: $table.profileChangedAt, builder: (column) => column); i0.GeneratedColumn get quotaSizeInBytes => $composableBuilder( column: $table.quotaSizeInBytes, builder: (column) => column); i0.GeneratedColumn get quotaUsageInBytes => $composableBuilder( column: $table.quotaUsageInBytes, builder: (column) => column); i0.GeneratedColumn get storageLabel => $composableBuilder( column: $table.storageLabel, builder: (column) => column); } class $$AuthUserEntityTableTableManager extends i0.RootTableManager< i0.GeneratedDatabase, i1.$AuthUserEntityTable, i1.AuthUserEntityData, i1.$$AuthUserEntityTableFilterComposer, i1.$$AuthUserEntityTableOrderingComposer, i1.$$AuthUserEntityTableAnnotationComposer, $$AuthUserEntityTableCreateCompanionBuilder, $$AuthUserEntityTableUpdateCompanionBuilder, ( i1.AuthUserEntityData, i0.BaseReferences ), i1.AuthUserEntityData, i0.PrefetchHooks Function()> { $$AuthUserEntityTableTableManager( i0.GeneratedDatabase db, i1.$AuthUserEntityTable table) : super(i0.TableManagerState( db: db, table: table, createFilteringComposer: () => i1.$$AuthUserEntityTableFilterComposer($db: db, $table: table), createOrderingComposer: () => i1.$$AuthUserEntityTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => i1 .$$AuthUserEntityTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ i0.Value id = const i0.Value.absent(), i0.Value name = const i0.Value.absent(), i0.Value email = const i0.Value.absent(), i0.Value deletedAt = const i0.Value.absent(), i0.Value avatarColor = const i0.Value.absent(), i0.Value isAdmin = const i0.Value.absent(), i0.Value oauthId = const i0.Value.absent(), i0.Value pinCode = const i0.Value.absent(), i0.Value hasProfileImage = const i0.Value.absent(), i0.Value profileChangedAt = const i0.Value.absent(), i0.Value quotaSizeInBytes = const i0.Value.absent(), i0.Value quotaUsageInBytes = const i0.Value.absent(), i0.Value storageLabel = const i0.Value.absent(), }) => i1.AuthUserEntityCompanion( id: id, name: name, email: email, deletedAt: deletedAt, avatarColor: avatarColor, isAdmin: isAdmin, oauthId: oauthId, pinCode: pinCode, hasProfileImage: hasProfileImage, profileChangedAt: profileChangedAt, quotaSizeInBytes: quotaSizeInBytes, quotaUsageInBytes: quotaUsageInBytes, storageLabel: storageLabel, ), createCompanionCallback: ({ required String id, required String name, required String email, i0.Value deletedAt = const i0.Value.absent(), i0.Value avatarColor = const i0.Value.absent(), i0.Value isAdmin = const i0.Value.absent(), i0.Value oauthId = const i0.Value.absent(), i0.Value pinCode = const i0.Value.absent(), i0.Value hasProfileImage = const i0.Value.absent(), i0.Value profileChangedAt = const i0.Value.absent(), i0.Value quotaSizeInBytes = const i0.Value.absent(), i0.Value quotaUsageInBytes = const i0.Value.absent(), i0.Value storageLabel = const i0.Value.absent(), }) => i1.AuthUserEntityCompanion.insert( id: id, name: name, email: email, deletedAt: deletedAt, avatarColor: avatarColor, isAdmin: isAdmin, oauthId: oauthId, pinCode: pinCode, hasProfileImage: hasProfileImage, profileChangedAt: profileChangedAt, quotaSizeInBytes: quotaSizeInBytes, quotaUsageInBytes: quotaUsageInBytes, storageLabel: storageLabel, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), i0.BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, )); } typedef $$AuthUserEntityTableProcessedTableManager = i0.ProcessedTableManager< i0.GeneratedDatabase, i1.$AuthUserEntityTable, i1.AuthUserEntityData, i1.$$AuthUserEntityTableFilterComposer, i1.$$AuthUserEntityTableOrderingComposer, i1.$$AuthUserEntityTableAnnotationComposer, $$AuthUserEntityTableCreateCompanionBuilder, $$AuthUserEntityTableUpdateCompanionBuilder, ( i1.AuthUserEntityData, i0.BaseReferences ), i1.AuthUserEntityData, i0.PrefetchHooks Function()>; class $AuthUserEntityTable extends i3.AuthUserEntity with i0.TableInfo<$AuthUserEntityTable, i1.AuthUserEntityData> { @override final i0.GeneratedDatabase attachedDatabase; final String? _alias; $AuthUserEntityTable(this.attachedDatabase, [this._alias]); static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id'); @override late final i0.GeneratedColumn id = i0.GeneratedColumn( 'id', aliasedName, false, type: i0.DriftSqlType.string, requiredDuringInsert: true); static const i0.VerificationMeta _nameMeta = const i0.VerificationMeta('name'); @override late final i0.GeneratedColumn name = i0.GeneratedColumn( 'name', aliasedName, false, type: i0.DriftSqlType.string, requiredDuringInsert: true); static const i0.VerificationMeta _emailMeta = const i0.VerificationMeta('email'); @override late final i0.GeneratedColumn email = i0.GeneratedColumn( 'email', aliasedName, false, type: i0.DriftSqlType.string, requiredDuringInsert: true); static const i0.VerificationMeta _deletedAtMeta = const i0.VerificationMeta('deletedAt'); @override late final i0.GeneratedColumn deletedAt = i0.GeneratedColumn('deleted_at', aliasedName, true, type: i0.DriftSqlType.dateTime, requiredDuringInsert: false); @override late final i0.GeneratedColumnWithTypeConverter avatarColor = i0.GeneratedColumn('avatar_color', aliasedName, true, type: i0.DriftSqlType.int, requiredDuringInsert: false) .withConverter( i1.$AuthUserEntityTable.$converteravatarColorn); static const i0.VerificationMeta _isAdminMeta = const i0.VerificationMeta('isAdmin'); @override late final i0.GeneratedColumn isAdmin = i0.GeneratedColumn( 'is_admin', aliasedName, false, type: i0.DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: i0.GeneratedColumn.constraintIsAlways('CHECK ("is_admin" IN (0, 1))'), defaultValue: const i4.Constant(false)); static const i0.VerificationMeta _oauthIdMeta = const i0.VerificationMeta('oauthId'); @override late final i0.GeneratedColumn oauthId = i0.GeneratedColumn( 'oauth_id', aliasedName, false, type: i0.DriftSqlType.string, requiredDuringInsert: false, defaultValue: const i4.Constant('')); static const i0.VerificationMeta _pinCodeMeta = const i0.VerificationMeta('pinCode'); @override late final i0.GeneratedColumn pinCode = i0.GeneratedColumn( 'pin_code', aliasedName, true, type: i0.DriftSqlType.string, requiredDuringInsert: false); static const i0.VerificationMeta _hasProfileImageMeta = const i0.VerificationMeta('hasProfileImage'); @override late final i0.GeneratedColumn hasProfileImage = i0.GeneratedColumn('has_profile_image', aliasedName, false, type: i0.DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: i0.GeneratedColumn.constraintIsAlways( 'CHECK ("has_profile_image" IN (0, 1))'), defaultValue: const i4.Constant(false)); static const i0.VerificationMeta _profileChangedAtMeta = const i0.VerificationMeta('profileChangedAt'); @override late final i0.GeneratedColumn profileChangedAt = i0.GeneratedColumn('profile_changed_at', aliasedName, false, type: i0.DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: i4.currentDateAndTime); static const i0.VerificationMeta _quotaSizeInBytesMeta = const i0.VerificationMeta('quotaSizeInBytes'); @override late final i0.GeneratedColumn quotaSizeInBytes = i0.GeneratedColumn( 'quota_size_in_bytes', aliasedName, true, type: i0.DriftSqlType.int, requiredDuringInsert: false); static const i0.VerificationMeta _quotaUsageInBytesMeta = const i0.VerificationMeta('quotaUsageInBytes'); @override late final i0.GeneratedColumn quotaUsageInBytes = i0.GeneratedColumn('quota_usage_in_bytes', aliasedName, false, type: i0.DriftSqlType.int, requiredDuringInsert: false, defaultValue: const i4.Constant(0)); static const i0.VerificationMeta _storageLabelMeta = const i0.VerificationMeta('storageLabel'); @override late final i0.GeneratedColumn storageLabel = i0.GeneratedColumn('storage_label', aliasedName, true, type: i0.DriftSqlType.string, requiredDuringInsert: false); @override List get $columns => [ id, name, email, deletedAt, avatarColor, isAdmin, oauthId, pinCode, hasProfileImage, profileChangedAt, quotaSizeInBytes, quotaUsageInBytes, storageLabel ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'auth_user_entity'; @override i0.VerificationContext validateIntegrity( i0.Insertable instance, {bool isInserting = false}) { final context = i0.VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta)); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('email')) { context.handle( _emailMeta, email.isAcceptableOrUnknown(data['email']!, _emailMeta)); } else if (isInserting) { context.missing(_emailMeta); } if (data.containsKey('deleted_at')) { context.handle(_deletedAtMeta, deletedAt.isAcceptableOrUnknown(data['deleted_at']!, _deletedAtMeta)); } if (data.containsKey('is_admin')) { context.handle(_isAdminMeta, isAdmin.isAcceptableOrUnknown(data['is_admin']!, _isAdminMeta)); } if (data.containsKey('oauth_id')) { context.handle(_oauthIdMeta, oauthId.isAcceptableOrUnknown(data['oauth_id']!, _oauthIdMeta)); } if (data.containsKey('pin_code')) { context.handle(_pinCodeMeta, pinCode.isAcceptableOrUnknown(data['pin_code']!, _pinCodeMeta)); } if (data.containsKey('has_profile_image')) { context.handle( _hasProfileImageMeta, hasProfileImage.isAcceptableOrUnknown( data['has_profile_image']!, _hasProfileImageMeta)); } if (data.containsKey('profile_changed_at')) { context.handle( _profileChangedAtMeta, profileChangedAt.isAcceptableOrUnknown( data['profile_changed_at']!, _profileChangedAtMeta)); } if (data.containsKey('quota_size_in_bytes')) { context.handle( _quotaSizeInBytesMeta, quotaSizeInBytes.isAcceptableOrUnknown( data['quota_size_in_bytes']!, _quotaSizeInBytesMeta)); } if (data.containsKey('quota_usage_in_bytes')) { context.handle( _quotaUsageInBytesMeta, quotaUsageInBytes.isAcceptableOrUnknown( data['quota_usage_in_bytes']!, _quotaUsageInBytesMeta)); } if (data.containsKey('storage_label')) { context.handle( _storageLabelMeta, storageLabel.isAcceptableOrUnknown( data['storage_label']!, _storageLabelMeta)); } return context; } @override Set get $primaryKey => {id}; @override i1.AuthUserEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return i1.AuthUserEntityData( id: attachedDatabase.typeMapping .read(i0.DriftSqlType.string, data['${effectivePrefix}id'])!, name: attachedDatabase.typeMapping .read(i0.DriftSqlType.string, data['${effectivePrefix}name'])!, email: attachedDatabase.typeMapping .read(i0.DriftSqlType.string, data['${effectivePrefix}email'])!, deletedAt: attachedDatabase.typeMapping .read(i0.DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']), avatarColor: i1.$AuthUserEntityTable.$converteravatarColorn.fromSql( attachedDatabase.typeMapping.read( i0.DriftSqlType.int, data['${effectivePrefix}avatar_color'])), isAdmin: attachedDatabase.typeMapping .read(i0.DriftSqlType.bool, data['${effectivePrefix}is_admin'])!, oauthId: attachedDatabase.typeMapping .read(i0.DriftSqlType.string, data['${effectivePrefix}oauth_id'])!, pinCode: attachedDatabase.typeMapping .read(i0.DriftSqlType.string, data['${effectivePrefix}pin_code']), hasProfileImage: attachedDatabase.typeMapping.read( i0.DriftSqlType.bool, data['${effectivePrefix}has_profile_image'])!, profileChangedAt: attachedDatabase.typeMapping.read( i0.DriftSqlType.dateTime, data['${effectivePrefix}profile_changed_at'])!, quotaSizeInBytes: attachedDatabase.typeMapping.read( i0.DriftSqlType.int, data['${effectivePrefix}quota_size_in_bytes']), quotaUsageInBytes: attachedDatabase.typeMapping.read( i0.DriftSqlType.int, data['${effectivePrefix}quota_usage_in_bytes'])!, storageLabel: attachedDatabase.typeMapping.read( i0.DriftSqlType.string, data['${effectivePrefix}storage_label']), ); } @override $AuthUserEntityTable createAlias(String alias) { return $AuthUserEntityTable(attachedDatabase, alias); } static i0.JsonTypeConverter2 $converteravatarColor = const i0.EnumIndexConverter(i2.AvatarColor.values); static i0.JsonTypeConverter2 $converteravatarColorn = i0.JsonTypeConverter2.asNullable($converteravatarColor); @override bool get withoutRowId => true; @override bool get isStrict => true; } class AuthUserEntityData extends i0.DataClass implements i0.Insertable { final String id; final String name; final String email; final DateTime? deletedAt; final i2.AvatarColor? avatarColor; final bool isAdmin; final String oauthId; final String? pinCode; final bool hasProfileImage; final DateTime profileChangedAt; final int? quotaSizeInBytes; final int quotaUsageInBytes; final String? storageLabel; const AuthUserEntityData( {required this.id, required this.name, required this.email, this.deletedAt, this.avatarColor, required this.isAdmin, required this.oauthId, this.pinCode, required this.hasProfileImage, required this.profileChangedAt, this.quotaSizeInBytes, required this.quotaUsageInBytes, this.storageLabel}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = i0.Variable(id); map['name'] = i0.Variable(name); map['email'] = i0.Variable(email); if (!nullToAbsent || deletedAt != null) { map['deleted_at'] = i0.Variable(deletedAt); } if (!nullToAbsent || avatarColor != null) { map['avatar_color'] = i0.Variable( i1.$AuthUserEntityTable.$converteravatarColorn.toSql(avatarColor)); } map['is_admin'] = i0.Variable(isAdmin); map['oauth_id'] = i0.Variable(oauthId); if (!nullToAbsent || pinCode != null) { map['pin_code'] = i0.Variable(pinCode); } map['has_profile_image'] = i0.Variable(hasProfileImage); map['profile_changed_at'] = i0.Variable(profileChangedAt); if (!nullToAbsent || quotaSizeInBytes != null) { map['quota_size_in_bytes'] = i0.Variable(quotaSizeInBytes); } map['quota_usage_in_bytes'] = i0.Variable(quotaUsageInBytes); if (!nullToAbsent || storageLabel != null) { map['storage_label'] = i0.Variable(storageLabel); } return map; } factory AuthUserEntityData.fromJson(Map json, {i0.ValueSerializer? serializer}) { serializer ??= i0.driftRuntimeOptions.defaultSerializer; return AuthUserEntityData( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), email: serializer.fromJson(json['email']), deletedAt: serializer.fromJson(json['deletedAt']), avatarColor: i1.$AuthUserEntityTable.$converteravatarColorn .fromJson(serializer.fromJson(json['avatarColor'])), isAdmin: serializer.fromJson(json['isAdmin']), oauthId: serializer.fromJson(json['oauthId']), pinCode: serializer.fromJson(json['pinCode']), hasProfileImage: serializer.fromJson(json['hasProfileImage']), profileChangedAt: serializer.fromJson(json['profileChangedAt']), quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), storageLabel: serializer.fromJson(json['storageLabel']), ); } @override Map toJson({i0.ValueSerializer? serializer}) { serializer ??= i0.driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'email': serializer.toJson(email), 'deletedAt': serializer.toJson(deletedAt), 'avatarColor': serializer.toJson( i1.$AuthUserEntityTable.$converteravatarColorn.toJson(avatarColor)), 'isAdmin': serializer.toJson(isAdmin), 'oauthId': serializer.toJson(oauthId), 'pinCode': serializer.toJson(pinCode), 'hasProfileImage': serializer.toJson(hasProfileImage), 'profileChangedAt': serializer.toJson(profileChangedAt), 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), 'storageLabel': serializer.toJson(storageLabel), }; } i1.AuthUserEntityData copyWith( {String? id, String? name, String? email, i0.Value deletedAt = const i0.Value.absent(), i0.Value avatarColor = const i0.Value.absent(), bool? isAdmin, String? oauthId, i0.Value pinCode = const i0.Value.absent(), bool? hasProfileImage, DateTime? profileChangedAt, i0.Value quotaSizeInBytes = const i0.Value.absent(), int? quotaUsageInBytes, i0.Value storageLabel = const i0.Value.absent()}) => i1.AuthUserEntityData( id: id ?? this.id, name: name ?? this.name, email: email ?? this.email, deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, avatarColor: avatarColor.present ? avatarColor.value : this.avatarColor, isAdmin: isAdmin ?? this.isAdmin, oauthId: oauthId ?? this.oauthId, pinCode: pinCode.present ? pinCode.value : this.pinCode, hasProfileImage: hasProfileImage ?? this.hasProfileImage, profileChangedAt: profileChangedAt ?? this.profileChangedAt, quotaSizeInBytes: quotaSizeInBytes.present ? quotaSizeInBytes.value : this.quotaSizeInBytes, quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, storageLabel: storageLabel.present ? storageLabel.value : this.storageLabel, ); AuthUserEntityData copyWithCompanion(i1.AuthUserEntityCompanion data) { return AuthUserEntityData( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, email: data.email.present ? data.email.value : this.email, deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, avatarColor: data.avatarColor.present ? data.avatarColor.value : this.avatarColor, isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, oauthId: data.oauthId.present ? data.oauthId.value : this.oauthId, pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode, hasProfileImage: data.hasProfileImage.present ? data.hasProfileImage.value : this.hasProfileImage, profileChangedAt: data.profileChangedAt.present ? data.profileChangedAt.value : this.profileChangedAt, quotaSizeInBytes: data.quotaSizeInBytes.present ? data.quotaSizeInBytes.value : this.quotaSizeInBytes, quotaUsageInBytes: data.quotaUsageInBytes.present ? data.quotaUsageInBytes.value : this.quotaUsageInBytes, storageLabel: data.storageLabel.present ? data.storageLabel.value : this.storageLabel, ); } @override String toString() { return (StringBuffer('AuthUserEntityData(') ..write('id: $id, ') ..write('name: $name, ') ..write('email: $email, ') ..write('deletedAt: $deletedAt, ') ..write('avatarColor: $avatarColor, ') ..write('isAdmin: $isAdmin, ') ..write('oauthId: $oauthId, ') ..write('pinCode: $pinCode, ') ..write('hasProfileImage: $hasProfileImage, ') ..write('profileChangedAt: $profileChangedAt, ') ..write('quotaSizeInBytes: $quotaSizeInBytes, ') ..write('quotaUsageInBytes: $quotaUsageInBytes, ') ..write('storageLabel: $storageLabel') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, name, email, deletedAt, avatarColor, isAdmin, oauthId, pinCode, hasProfileImage, profileChangedAt, quotaSizeInBytes, quotaUsageInBytes, storageLabel); @override bool operator ==(Object other) => identical(this, other) || (other is i1.AuthUserEntityData && other.id == this.id && other.name == this.name && other.email == this.email && other.deletedAt == this.deletedAt && other.avatarColor == this.avatarColor && other.isAdmin == this.isAdmin && other.oauthId == this.oauthId && other.pinCode == this.pinCode && other.hasProfileImage == this.hasProfileImage && other.profileChangedAt == this.profileChangedAt && other.quotaSizeInBytes == this.quotaSizeInBytes && other.quotaUsageInBytes == this.quotaUsageInBytes && other.storageLabel == this.storageLabel); } class AuthUserEntityCompanion extends i0.UpdateCompanion { final i0.Value id; final i0.Value name; final i0.Value email; final i0.Value deletedAt; final i0.Value avatarColor; final i0.Value isAdmin; final i0.Value oauthId; final i0.Value pinCode; final i0.Value hasProfileImage; final i0.Value profileChangedAt; final i0.Value quotaSizeInBytes; final i0.Value quotaUsageInBytes; final i0.Value storageLabel; const AuthUserEntityCompanion({ this.id = const i0.Value.absent(), this.name = const i0.Value.absent(), this.email = const i0.Value.absent(), this.deletedAt = const i0.Value.absent(), this.avatarColor = const i0.Value.absent(), this.isAdmin = const i0.Value.absent(), this.oauthId = const i0.Value.absent(), this.pinCode = const i0.Value.absent(), this.hasProfileImage = const i0.Value.absent(), this.profileChangedAt = const i0.Value.absent(), this.quotaSizeInBytes = const i0.Value.absent(), this.quotaUsageInBytes = const i0.Value.absent(), this.storageLabel = const i0.Value.absent(), }); AuthUserEntityCompanion.insert({ required String id, required String name, required String email, this.deletedAt = const i0.Value.absent(), this.avatarColor = const i0.Value.absent(), this.isAdmin = const i0.Value.absent(), this.oauthId = const i0.Value.absent(), this.pinCode = const i0.Value.absent(), this.hasProfileImage = const i0.Value.absent(), this.profileChangedAt = const i0.Value.absent(), this.quotaSizeInBytes = const i0.Value.absent(), this.quotaUsageInBytes = const i0.Value.absent(), this.storageLabel = const i0.Value.absent(), }) : id = i0.Value(id), name = i0.Value(name), email = i0.Value(email); static i0.Insertable custom({ i0.Expression? id, i0.Expression? name, i0.Expression? email, i0.Expression? deletedAt, i0.Expression? avatarColor, i0.Expression? isAdmin, i0.Expression? oauthId, i0.Expression? pinCode, i0.Expression? hasProfileImage, i0.Expression? profileChangedAt, i0.Expression? quotaSizeInBytes, i0.Expression? quotaUsageInBytes, i0.Expression? storageLabel, }) { return i0.RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (email != null) 'email': email, if (deletedAt != null) 'deleted_at': deletedAt, if (avatarColor != null) 'avatar_color': avatarColor, if (isAdmin != null) 'is_admin': isAdmin, if (oauthId != null) 'oauth_id': oauthId, if (pinCode != null) 'pin_code': pinCode, if (hasProfileImage != null) 'has_profile_image': hasProfileImage, if (profileChangedAt != null) 'profile_changed_at': profileChangedAt, if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, if (storageLabel != null) 'storage_label': storageLabel, }); } i1.AuthUserEntityCompanion copyWith( {i0.Value? id, i0.Value? name, i0.Value? email, i0.Value? deletedAt, i0.Value? avatarColor, i0.Value? isAdmin, i0.Value? oauthId, i0.Value? pinCode, i0.Value? hasProfileImage, i0.Value? profileChangedAt, i0.Value? quotaSizeInBytes, i0.Value? quotaUsageInBytes, i0.Value? storageLabel}) { return i1.AuthUserEntityCompanion( id: id ?? this.id, name: name ?? this.name, email: email ?? this.email, deletedAt: deletedAt ?? this.deletedAt, avatarColor: avatarColor ?? this.avatarColor, isAdmin: isAdmin ?? this.isAdmin, oauthId: oauthId ?? this.oauthId, pinCode: pinCode ?? this.pinCode, hasProfileImage: hasProfileImage ?? this.hasProfileImage, profileChangedAt: profileChangedAt ?? this.profileChangedAt, quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, storageLabel: storageLabel ?? this.storageLabel, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = i0.Variable(id.value); } if (name.present) { map['name'] = i0.Variable(name.value); } if (email.present) { map['email'] = i0.Variable(email.value); } if (deletedAt.present) { map['deleted_at'] = i0.Variable(deletedAt.value); } if (avatarColor.present) { map['avatar_color'] = i0.Variable(i1 .$AuthUserEntityTable.$converteravatarColorn .toSql(avatarColor.value)); } if (isAdmin.present) { map['is_admin'] = i0.Variable(isAdmin.value); } if (oauthId.present) { map['oauth_id'] = i0.Variable(oauthId.value); } if (pinCode.present) { map['pin_code'] = i0.Variable(pinCode.value); } if (hasProfileImage.present) { map['has_profile_image'] = i0.Variable(hasProfileImage.value); } if (profileChangedAt.present) { map['profile_changed_at'] = i0.Variable(profileChangedAt.value); } if (quotaSizeInBytes.present) { map['quota_size_in_bytes'] = i0.Variable(quotaSizeInBytes.value); } if (quotaUsageInBytes.present) { map['quota_usage_in_bytes'] = i0.Variable(quotaUsageInBytes.value); } if (storageLabel.present) { map['storage_label'] = i0.Variable(storageLabel.value); } return map; } @override String toString() { return (StringBuffer('AuthUserEntityCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('email: $email, ') ..write('deletedAt: $deletedAt, ') ..write('avatarColor: $avatarColor, ') ..write('isAdmin: $isAdmin, ') ..write('oauthId: $oauthId, ') ..write('pinCode: $pinCode, ') ..write('hasProfileImage: $hasProfileImage, ') ..write('profileChangedAt: $profileChangedAt, ') ..write('quotaSizeInBytes: $quotaSizeInBytes, ') ..write('quotaUsageInBytes: $quotaUsageInBytes, ') ..write('storageLabel: $storageLabel') ..write(')')) .toString(); } }