// dart format width=80 // GENERATED CODE, DO NOT EDIT BY HAND. // ignore_for_file: type=lint import 'package:drift/drift.dart'; class UserEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; UserEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn name = GeneratedColumn('name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn isAdmin = GeneratedColumn('is_admin', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_admin" IN (0, 1))'), defaultValue: const CustomExpression('0')); late final GeneratedColumn email = GeneratedColumn('email', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn profileImagePath = GeneratedColumn('profile_image_path', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn quotaSizeInBytes = GeneratedColumn('quota_size_in_bytes', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn quotaUsageInBytes = GeneratedColumn('quota_usage_in_bytes', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const CustomExpression('0')); @override List get $columns => [id, name, isAdmin, email, profileImagePath, updatedAt, quotaSizeInBytes, quotaUsageInBytes]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'user_entity'; @override Set get $primaryKey => {id}; @override UserEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return UserEntityData( id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, name: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}name'])!, isAdmin: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_admin'])!, email: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}email'])!, profileImagePath: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}profile_image_path']), updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, quotaSizeInBytes: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}quota_size_in_bytes']), quotaUsageInBytes: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}quota_usage_in_bytes'])!, ); } @override UserEntity createAlias(String alias) { return UserEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class UserEntityData extends DataClass implements Insertable { final String id; final String name; final bool isAdmin; final String email; final String? profileImagePath; final DateTime updatedAt; final int? quotaSizeInBytes; final int quotaUsageInBytes; const UserEntityData( {required this.id, required this.name, required this.isAdmin, required this.email, this.profileImagePath, required this.updatedAt, this.quotaSizeInBytes, required this.quotaUsageInBytes}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); map['is_admin'] = Variable(isAdmin); map['email'] = Variable(email); if (!nullToAbsent || profileImagePath != null) { map['profile_image_path'] = Variable(profileImagePath); } map['updated_at'] = Variable(updatedAt); if (!nullToAbsent || quotaSizeInBytes != null) { map['quota_size_in_bytes'] = Variable(quotaSizeInBytes); } map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes); return map; } factory UserEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return UserEntityData( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), isAdmin: serializer.fromJson(json['isAdmin']), email: serializer.fromJson(json['email']), profileImagePath: serializer.fromJson(json['profileImagePath']), updatedAt: serializer.fromJson(json['updatedAt']), quotaSizeInBytes: serializer.fromJson(json['quotaSizeInBytes']), quotaUsageInBytes: serializer.fromJson(json['quotaUsageInBytes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'isAdmin': serializer.toJson(isAdmin), 'email': serializer.toJson(email), 'profileImagePath': serializer.toJson(profileImagePath), 'updatedAt': serializer.toJson(updatedAt), 'quotaSizeInBytes': serializer.toJson(quotaSizeInBytes), 'quotaUsageInBytes': serializer.toJson(quotaUsageInBytes), }; } UserEntityData copyWith( {String? id, String? name, bool? isAdmin, String? email, Value profileImagePath = const Value.absent(), DateTime? updatedAt, Value quotaSizeInBytes = const Value.absent(), int? quotaUsageInBytes}) => UserEntityData( id: id ?? this.id, name: name ?? this.name, isAdmin: isAdmin ?? this.isAdmin, email: email ?? this.email, profileImagePath: profileImagePath.present ? profileImagePath.value : this.profileImagePath, updatedAt: updatedAt ?? this.updatedAt, quotaSizeInBytes: quotaSizeInBytes.present ? quotaSizeInBytes.value : this.quotaSizeInBytes, quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, ); UserEntityData copyWithCompanion(UserEntityCompanion data) { return UserEntityData( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin, email: data.email.present ? data.email.value : this.email, profileImagePath: data.profileImagePath.present ? data.profileImagePath.value : this.profileImagePath, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, quotaSizeInBytes: data.quotaSizeInBytes.present ? data.quotaSizeInBytes.value : this.quotaSizeInBytes, quotaUsageInBytes: data.quotaUsageInBytes.present ? data.quotaUsageInBytes.value : this.quotaUsageInBytes, ); } @override String toString() { return (StringBuffer('UserEntityData(') ..write('id: $id, ') ..write('name: $name, ') ..write('isAdmin: $isAdmin, ') ..write('email: $email, ') ..write('profileImagePath: $profileImagePath, ') ..write('updatedAt: $updatedAt, ') ..write('quotaSizeInBytes: $quotaSizeInBytes, ') ..write('quotaUsageInBytes: $quotaUsageInBytes') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, name, isAdmin, email, profileImagePath, updatedAt, quotaSizeInBytes, quotaUsageInBytes); @override bool operator ==(Object other) => identical(this, other) || (other is UserEntityData && other.id == this.id && other.name == this.name && other.isAdmin == this.isAdmin && other.email == this.email && other.profileImagePath == this.profileImagePath && other.updatedAt == this.updatedAt && other.quotaSizeInBytes == this.quotaSizeInBytes && other.quotaUsageInBytes == this.quotaUsageInBytes); } class UserEntityCompanion extends UpdateCompanion { final Value id; final Value name; final Value isAdmin; final Value email; final Value profileImagePath; final Value updatedAt; final Value quotaSizeInBytes; final Value quotaUsageInBytes; const UserEntityCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.isAdmin = const Value.absent(), this.email = const Value.absent(), this.profileImagePath = const Value.absent(), this.updatedAt = const Value.absent(), this.quotaSizeInBytes = const Value.absent(), this.quotaUsageInBytes = const Value.absent(), }); UserEntityCompanion.insert({ required String id, required String name, this.isAdmin = const Value.absent(), required String email, this.profileImagePath = const Value.absent(), this.updatedAt = const Value.absent(), this.quotaSizeInBytes = const Value.absent(), this.quotaUsageInBytes = const Value.absent(), }) : id = Value(id), name = Value(name), email = Value(email); static Insertable custom({ Expression? id, Expression? name, Expression? isAdmin, Expression? email, Expression? profileImagePath, Expression? updatedAt, Expression? quotaSizeInBytes, Expression? quotaUsageInBytes, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (isAdmin != null) 'is_admin': isAdmin, if (email != null) 'email': email, if (profileImagePath != null) 'profile_image_path': profileImagePath, if (updatedAt != null) 'updated_at': updatedAt, if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes, if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes, }); } UserEntityCompanion copyWith( {Value? id, Value? name, Value? isAdmin, Value? email, Value? profileImagePath, Value? updatedAt, Value? quotaSizeInBytes, Value? quotaUsageInBytes}) { return UserEntityCompanion( id: id ?? this.id, name: name ?? this.name, isAdmin: isAdmin ?? this.isAdmin, email: email ?? this.email, profileImagePath: profileImagePath ?? this.profileImagePath, updatedAt: updatedAt ?? this.updatedAt, quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes, quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (isAdmin.present) { map['is_admin'] = Variable(isAdmin.value); } if (email.present) { map['email'] = Variable(email.value); } if (profileImagePath.present) { map['profile_image_path'] = Variable(profileImagePath.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (quotaSizeInBytes.present) { map['quota_size_in_bytes'] = Variable(quotaSizeInBytes.value); } if (quotaUsageInBytes.present) { map['quota_usage_in_bytes'] = Variable(quotaUsageInBytes.value); } return map; } @override String toString() { return (StringBuffer('UserEntityCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('isAdmin: $isAdmin, ') ..write('email: $email, ') ..write('profileImagePath: $profileImagePath, ') ..write('updatedAt: $updatedAt, ') ..write('quotaSizeInBytes: $quotaSizeInBytes, ') ..write('quotaUsageInBytes: $quotaUsageInBytes') ..write(')')) .toString(); } } class RemoteAssetEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; RemoteAssetEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn name = GeneratedColumn('name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn type = GeneratedColumn('type', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn('created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn width = GeneratedColumn('width', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn height = GeneratedColumn('height', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn durationInSeconds = GeneratedColumn('duration_in_seconds', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn checksum = GeneratedColumn('checksum', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn isFavorite = GeneratedColumn('is_favorite', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))'), defaultValue: const CustomExpression('0')); late final GeneratedColumn ownerId = GeneratedColumn('owner_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn localDateTime = GeneratedColumn('local_date_time', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn thumbHash = GeneratedColumn('thumb_hash', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn deletedAt = GeneratedColumn('deleted_at', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn livePhotoVideoId = GeneratedColumn( 'live_photo_video_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn visibility = GeneratedColumn('visibility', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn stackId = GeneratedColumn('stack_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); @override List get $columns => [ name, type, createdAt, updatedAt, width, height, durationInSeconds, id, checksum, isFavorite, ownerId, localDateTime, thumbHash, deletedAt, livePhotoVideoId, visibility, stackId ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'remote_asset_entity'; @override Set get $primaryKey => {id}; @override RemoteAssetEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return RemoteAssetEntityData( name: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}name'])!, type: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}type'])!, createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, width: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}width']), height: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}height']), durationInSeconds: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}duration_in_seconds']), id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, checksum: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}checksum'])!, isFavorite: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!, ownerId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!, localDateTime: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}local_date_time']), thumbHash: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}thumb_hash']), deletedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']), livePhotoVideoId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}live_photo_video_id']), visibility: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}visibility'])!, stackId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}stack_id']), ); } @override RemoteAssetEntity createAlias(String alias) { return RemoteAssetEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class RemoteAssetEntityData extends DataClass implements Insertable { final String name; final int type; final DateTime createdAt; final DateTime updatedAt; final int? width; final int? height; final int? durationInSeconds; final String id; final String checksum; final bool isFavorite; final String ownerId; final DateTime? localDateTime; final String? thumbHash; final DateTime? deletedAt; final String? livePhotoVideoId; final int visibility; final String? stackId; const RemoteAssetEntityData( {required this.name, required this.type, required this.createdAt, required this.updatedAt, this.width, this.height, this.durationInSeconds, required this.id, required this.checksum, required this.isFavorite, required this.ownerId, this.localDateTime, this.thumbHash, this.deletedAt, this.livePhotoVideoId, required this.visibility, this.stackId}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['name'] = Variable(name); map['type'] = Variable(type); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); if (!nullToAbsent || width != null) { map['width'] = Variable(width); } if (!nullToAbsent || height != null) { map['height'] = Variable(height); } if (!nullToAbsent || durationInSeconds != null) { map['duration_in_seconds'] = Variable(durationInSeconds); } map['id'] = Variable(id); map['checksum'] = Variable(checksum); map['is_favorite'] = Variable(isFavorite); map['owner_id'] = Variable(ownerId); if (!nullToAbsent || localDateTime != null) { map['local_date_time'] = Variable(localDateTime); } if (!nullToAbsent || thumbHash != null) { map['thumb_hash'] = Variable(thumbHash); } if (!nullToAbsent || deletedAt != null) { map['deleted_at'] = Variable(deletedAt); } if (!nullToAbsent || livePhotoVideoId != null) { map['live_photo_video_id'] = Variable(livePhotoVideoId); } map['visibility'] = Variable(visibility); if (!nullToAbsent || stackId != null) { map['stack_id'] = Variable(stackId); } return map; } factory RemoteAssetEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return RemoteAssetEntityData( name: serializer.fromJson(json['name']), type: serializer.fromJson(json['type']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), width: serializer.fromJson(json['width']), height: serializer.fromJson(json['height']), durationInSeconds: serializer.fromJson(json['durationInSeconds']), id: serializer.fromJson(json['id']), checksum: serializer.fromJson(json['checksum']), isFavorite: serializer.fromJson(json['isFavorite']), ownerId: serializer.fromJson(json['ownerId']), localDateTime: serializer.fromJson(json['localDateTime']), thumbHash: serializer.fromJson(json['thumbHash']), deletedAt: serializer.fromJson(json['deletedAt']), livePhotoVideoId: serializer.fromJson(json['livePhotoVideoId']), visibility: serializer.fromJson(json['visibility']), stackId: serializer.fromJson(json['stackId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'name': serializer.toJson(name), 'type': serializer.toJson(type), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'width': serializer.toJson(width), 'height': serializer.toJson(height), 'durationInSeconds': serializer.toJson(durationInSeconds), 'id': serializer.toJson(id), 'checksum': serializer.toJson(checksum), 'isFavorite': serializer.toJson(isFavorite), 'ownerId': serializer.toJson(ownerId), 'localDateTime': serializer.toJson(localDateTime), 'thumbHash': serializer.toJson(thumbHash), 'deletedAt': serializer.toJson(deletedAt), 'livePhotoVideoId': serializer.toJson(livePhotoVideoId), 'visibility': serializer.toJson(visibility), 'stackId': serializer.toJson(stackId), }; } RemoteAssetEntityData copyWith( {String? name, int? type, DateTime? createdAt, DateTime? updatedAt, Value width = const Value.absent(), Value height = const Value.absent(), Value durationInSeconds = const Value.absent(), String? id, String? checksum, bool? isFavorite, String? ownerId, Value localDateTime = const Value.absent(), Value thumbHash = const Value.absent(), Value deletedAt = const Value.absent(), Value livePhotoVideoId = const Value.absent(), int? visibility, Value stackId = const Value.absent()}) => RemoteAssetEntityData( name: name ?? this.name, type: type ?? this.type, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, width: width.present ? width.value : this.width, height: height.present ? height.value : this.height, durationInSeconds: durationInSeconds.present ? durationInSeconds.value : this.durationInSeconds, id: id ?? this.id, checksum: checksum ?? this.checksum, isFavorite: isFavorite ?? this.isFavorite, ownerId: ownerId ?? this.ownerId, localDateTime: localDateTime.present ? localDateTime.value : this.localDateTime, thumbHash: thumbHash.present ? thumbHash.value : this.thumbHash, deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, livePhotoVideoId: livePhotoVideoId.present ? livePhotoVideoId.value : this.livePhotoVideoId, visibility: visibility ?? this.visibility, stackId: stackId.present ? stackId.value : this.stackId, ); RemoteAssetEntityData copyWithCompanion(RemoteAssetEntityCompanion data) { return RemoteAssetEntityData( name: data.name.present ? data.name.value : this.name, type: data.type.present ? data.type.value : this.type, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, width: data.width.present ? data.width.value : this.width, height: data.height.present ? data.height.value : this.height, durationInSeconds: data.durationInSeconds.present ? data.durationInSeconds.value : this.durationInSeconds, id: data.id.present ? data.id.value : this.id, checksum: data.checksum.present ? data.checksum.value : this.checksum, isFavorite: data.isFavorite.present ? data.isFavorite.value : this.isFavorite, ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, localDateTime: data.localDateTime.present ? data.localDateTime.value : this.localDateTime, thumbHash: data.thumbHash.present ? data.thumbHash.value : this.thumbHash, deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, livePhotoVideoId: data.livePhotoVideoId.present ? data.livePhotoVideoId.value : this.livePhotoVideoId, visibility: data.visibility.present ? data.visibility.value : this.visibility, stackId: data.stackId.present ? data.stackId.value : this.stackId, ); } @override String toString() { return (StringBuffer('RemoteAssetEntityData(') ..write('name: $name, ') ..write('type: $type, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('width: $width, ') ..write('height: $height, ') ..write('durationInSeconds: $durationInSeconds, ') ..write('id: $id, ') ..write('checksum: $checksum, ') ..write('isFavorite: $isFavorite, ') ..write('ownerId: $ownerId, ') ..write('localDateTime: $localDateTime, ') ..write('thumbHash: $thumbHash, ') ..write('deletedAt: $deletedAt, ') ..write('livePhotoVideoId: $livePhotoVideoId, ') ..write('visibility: $visibility, ') ..write('stackId: $stackId') ..write(')')) .toString(); } @override int get hashCode => Object.hash(name, type, createdAt, updatedAt, width, height, durationInSeconds, id, checksum, isFavorite, ownerId, localDateTime, thumbHash, deletedAt, livePhotoVideoId, visibility, stackId); @override bool operator ==(Object other) => identical(this, other) || (other is RemoteAssetEntityData && other.name == this.name && other.type == this.type && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.width == this.width && other.height == this.height && other.durationInSeconds == this.durationInSeconds && other.id == this.id && other.checksum == this.checksum && other.isFavorite == this.isFavorite && other.ownerId == this.ownerId && other.localDateTime == this.localDateTime && other.thumbHash == this.thumbHash && other.deletedAt == this.deletedAt && other.livePhotoVideoId == this.livePhotoVideoId && other.visibility == this.visibility && other.stackId == this.stackId); } class RemoteAssetEntityCompanion extends UpdateCompanion { final Value name; final Value type; final Value createdAt; final Value updatedAt; final Value width; final Value height; final Value durationInSeconds; final Value id; final Value checksum; final Value isFavorite; final Value ownerId; final Value localDateTime; final Value thumbHash; final Value deletedAt; final Value livePhotoVideoId; final Value visibility; final Value stackId; const RemoteAssetEntityCompanion({ this.name = const Value.absent(), this.type = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.width = const Value.absent(), this.height = const Value.absent(), this.durationInSeconds = const Value.absent(), this.id = const Value.absent(), this.checksum = const Value.absent(), this.isFavorite = const Value.absent(), this.ownerId = const Value.absent(), this.localDateTime = const Value.absent(), this.thumbHash = const Value.absent(), this.deletedAt = const Value.absent(), this.livePhotoVideoId = const Value.absent(), this.visibility = const Value.absent(), this.stackId = const Value.absent(), }); RemoteAssetEntityCompanion.insert({ required String name, required int type, this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.width = const Value.absent(), this.height = const Value.absent(), this.durationInSeconds = const Value.absent(), required String id, required String checksum, this.isFavorite = const Value.absent(), required String ownerId, this.localDateTime = const Value.absent(), this.thumbHash = const Value.absent(), this.deletedAt = const Value.absent(), this.livePhotoVideoId = const Value.absent(), required int visibility, this.stackId = const Value.absent(), }) : name = Value(name), type = Value(type), id = Value(id), checksum = Value(checksum), ownerId = Value(ownerId), visibility = Value(visibility); static Insertable custom({ Expression? name, Expression? type, Expression? createdAt, Expression? updatedAt, Expression? width, Expression? height, Expression? durationInSeconds, Expression? id, Expression? checksum, Expression? isFavorite, Expression? ownerId, Expression? localDateTime, Expression? thumbHash, Expression? deletedAt, Expression? livePhotoVideoId, Expression? visibility, Expression? stackId, }) { return RawValuesInsertable({ if (name != null) 'name': name, if (type != null) 'type': type, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (width != null) 'width': width, if (height != null) 'height': height, if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, if (id != null) 'id': id, if (checksum != null) 'checksum': checksum, if (isFavorite != null) 'is_favorite': isFavorite, if (ownerId != null) 'owner_id': ownerId, if (localDateTime != null) 'local_date_time': localDateTime, if (thumbHash != null) 'thumb_hash': thumbHash, if (deletedAt != null) 'deleted_at': deletedAt, if (livePhotoVideoId != null) 'live_photo_video_id': livePhotoVideoId, if (visibility != null) 'visibility': visibility, if (stackId != null) 'stack_id': stackId, }); } RemoteAssetEntityCompanion copyWith( {Value? name, Value? type, Value? createdAt, Value? updatedAt, Value? width, Value? height, Value? durationInSeconds, Value? id, Value? checksum, Value? isFavorite, Value? ownerId, Value? localDateTime, Value? thumbHash, Value? deletedAt, Value? livePhotoVideoId, Value? visibility, Value? stackId}) { return RemoteAssetEntityCompanion( name: name ?? this.name, type: type ?? this.type, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, width: width ?? this.width, height: height ?? this.height, durationInSeconds: durationInSeconds ?? this.durationInSeconds, id: id ?? this.id, checksum: checksum ?? this.checksum, isFavorite: isFavorite ?? this.isFavorite, ownerId: ownerId ?? this.ownerId, localDateTime: localDateTime ?? this.localDateTime, thumbHash: thumbHash ?? this.thumbHash, deletedAt: deletedAt ?? this.deletedAt, livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId, visibility: visibility ?? this.visibility, stackId: stackId ?? this.stackId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (name.present) { map['name'] = Variable(name.value); } if (type.present) { map['type'] = Variable(type.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (width.present) { map['width'] = Variable(width.value); } if (height.present) { map['height'] = Variable(height.value); } if (durationInSeconds.present) { map['duration_in_seconds'] = Variable(durationInSeconds.value); } if (id.present) { map['id'] = Variable(id.value); } if (checksum.present) { map['checksum'] = Variable(checksum.value); } if (isFavorite.present) { map['is_favorite'] = Variable(isFavorite.value); } if (ownerId.present) { map['owner_id'] = Variable(ownerId.value); } if (localDateTime.present) { map['local_date_time'] = Variable(localDateTime.value); } if (thumbHash.present) { map['thumb_hash'] = Variable(thumbHash.value); } if (deletedAt.present) { map['deleted_at'] = Variable(deletedAt.value); } if (livePhotoVideoId.present) { map['live_photo_video_id'] = Variable(livePhotoVideoId.value); } if (visibility.present) { map['visibility'] = Variable(visibility.value); } if (stackId.present) { map['stack_id'] = Variable(stackId.value); } return map; } @override String toString() { return (StringBuffer('RemoteAssetEntityCompanion(') ..write('name: $name, ') ..write('type: $type, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('width: $width, ') ..write('height: $height, ') ..write('durationInSeconds: $durationInSeconds, ') ..write('id: $id, ') ..write('checksum: $checksum, ') ..write('isFavorite: $isFavorite, ') ..write('ownerId: $ownerId, ') ..write('localDateTime: $localDateTime, ') ..write('thumbHash: $thumbHash, ') ..write('deletedAt: $deletedAt, ') ..write('livePhotoVideoId: $livePhotoVideoId, ') ..write('visibility: $visibility, ') ..write('stackId: $stackId') ..write(')')) .toString(); } } class LocalAssetEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; LocalAssetEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn name = GeneratedColumn('name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn type = GeneratedColumn('type', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn('created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn width = GeneratedColumn('width', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn height = GeneratedColumn('height', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn durationInSeconds = GeneratedColumn('duration_in_seconds', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn checksum = GeneratedColumn('checksum', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn isFavorite = GeneratedColumn('is_favorite', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))'), defaultValue: const CustomExpression('0')); late final GeneratedColumn orientation = GeneratedColumn('orientation', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const CustomExpression('0')); @override List get $columns => [name, type, createdAt, updatedAt, width, height, durationInSeconds, id, checksum, isFavorite, orientation]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'local_asset_entity'; @override Set get $primaryKey => {id}; @override LocalAssetEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return LocalAssetEntityData( name: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}name'])!, type: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}type'])!, createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, width: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}width']), height: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}height']), durationInSeconds: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}duration_in_seconds']), id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, checksum: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}checksum']), isFavorite: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!, orientation: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}orientation'])!, ); } @override LocalAssetEntity createAlias(String alias) { return LocalAssetEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class LocalAssetEntityData extends DataClass implements Insertable { final String name; final int type; final DateTime createdAt; final DateTime updatedAt; final int? width; final int? height; final int? durationInSeconds; final String id; final String? checksum; final bool isFavorite; final int orientation; const LocalAssetEntityData( {required this.name, required this.type, required this.createdAt, required this.updatedAt, this.width, this.height, this.durationInSeconds, required this.id, this.checksum, required this.isFavorite, required this.orientation}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['name'] = Variable(name); map['type'] = Variable(type); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); if (!nullToAbsent || width != null) { map['width'] = Variable(width); } if (!nullToAbsent || height != null) { map['height'] = Variable(height); } if (!nullToAbsent || durationInSeconds != null) { map['duration_in_seconds'] = Variable(durationInSeconds); } map['id'] = Variable(id); if (!nullToAbsent || checksum != null) { map['checksum'] = Variable(checksum); } map['is_favorite'] = Variable(isFavorite); map['orientation'] = Variable(orientation); return map; } factory LocalAssetEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return LocalAssetEntityData( name: serializer.fromJson(json['name']), type: serializer.fromJson(json['type']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), width: serializer.fromJson(json['width']), height: serializer.fromJson(json['height']), durationInSeconds: serializer.fromJson(json['durationInSeconds']), id: serializer.fromJson(json['id']), checksum: serializer.fromJson(json['checksum']), isFavorite: serializer.fromJson(json['isFavorite']), orientation: serializer.fromJson(json['orientation']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'name': serializer.toJson(name), 'type': serializer.toJson(type), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'width': serializer.toJson(width), 'height': serializer.toJson(height), 'durationInSeconds': serializer.toJson(durationInSeconds), 'id': serializer.toJson(id), 'checksum': serializer.toJson(checksum), 'isFavorite': serializer.toJson(isFavorite), 'orientation': serializer.toJson(orientation), }; } LocalAssetEntityData copyWith( {String? name, int? type, DateTime? createdAt, DateTime? updatedAt, Value width = const Value.absent(), Value height = const Value.absent(), Value durationInSeconds = const Value.absent(), String? id, Value checksum = const Value.absent(), bool? isFavorite, int? orientation}) => LocalAssetEntityData( name: name ?? this.name, type: type ?? this.type, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, width: width.present ? width.value : this.width, height: height.present ? height.value : this.height, durationInSeconds: durationInSeconds.present ? durationInSeconds.value : this.durationInSeconds, id: id ?? this.id, checksum: checksum.present ? checksum.value : this.checksum, isFavorite: isFavorite ?? this.isFavorite, orientation: orientation ?? this.orientation, ); LocalAssetEntityData copyWithCompanion(LocalAssetEntityCompanion data) { return LocalAssetEntityData( name: data.name.present ? data.name.value : this.name, type: data.type.present ? data.type.value : this.type, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, width: data.width.present ? data.width.value : this.width, height: data.height.present ? data.height.value : this.height, durationInSeconds: data.durationInSeconds.present ? data.durationInSeconds.value : this.durationInSeconds, id: data.id.present ? data.id.value : this.id, checksum: data.checksum.present ? data.checksum.value : this.checksum, isFavorite: data.isFavorite.present ? data.isFavorite.value : this.isFavorite, orientation: data.orientation.present ? data.orientation.value : this.orientation, ); } @override String toString() { return (StringBuffer('LocalAssetEntityData(') ..write('name: $name, ') ..write('type: $type, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('width: $width, ') ..write('height: $height, ') ..write('durationInSeconds: $durationInSeconds, ') ..write('id: $id, ') ..write('checksum: $checksum, ') ..write('isFavorite: $isFavorite, ') ..write('orientation: $orientation') ..write(')')) .toString(); } @override int get hashCode => Object.hash( name, type, createdAt, updatedAt, width, height, durationInSeconds, id, checksum, isFavorite, orientation); @override bool operator ==(Object other) => identical(this, other) || (other is LocalAssetEntityData && other.name == this.name && other.type == this.type && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.width == this.width && other.height == this.height && other.durationInSeconds == this.durationInSeconds && other.id == this.id && other.checksum == this.checksum && other.isFavorite == this.isFavorite && other.orientation == this.orientation); } class LocalAssetEntityCompanion extends UpdateCompanion { final Value name; final Value type; final Value createdAt; final Value updatedAt; final Value width; final Value height; final Value durationInSeconds; final Value id; final Value checksum; final Value isFavorite; final Value orientation; const LocalAssetEntityCompanion({ this.name = const Value.absent(), this.type = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.width = const Value.absent(), this.height = const Value.absent(), this.durationInSeconds = const Value.absent(), this.id = const Value.absent(), this.checksum = const Value.absent(), this.isFavorite = const Value.absent(), this.orientation = const Value.absent(), }); LocalAssetEntityCompanion.insert({ required String name, required int type, this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.width = const Value.absent(), this.height = const Value.absent(), this.durationInSeconds = const Value.absent(), required String id, this.checksum = const Value.absent(), this.isFavorite = const Value.absent(), this.orientation = const Value.absent(), }) : name = Value(name), type = Value(type), id = Value(id); static Insertable custom({ Expression? name, Expression? type, Expression? createdAt, Expression? updatedAt, Expression? width, Expression? height, Expression? durationInSeconds, Expression? id, Expression? checksum, Expression? isFavorite, Expression? orientation, }) { return RawValuesInsertable({ if (name != null) 'name': name, if (type != null) 'type': type, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (width != null) 'width': width, if (height != null) 'height': height, if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds, if (id != null) 'id': id, if (checksum != null) 'checksum': checksum, if (isFavorite != null) 'is_favorite': isFavorite, if (orientation != null) 'orientation': orientation, }); } LocalAssetEntityCompanion copyWith( {Value? name, Value? type, Value? createdAt, Value? updatedAt, Value? width, Value? height, Value? durationInSeconds, Value? id, Value? checksum, Value? isFavorite, Value? orientation}) { return LocalAssetEntityCompanion( name: name ?? this.name, type: type ?? this.type, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, width: width ?? this.width, height: height ?? this.height, durationInSeconds: durationInSeconds ?? this.durationInSeconds, id: id ?? this.id, checksum: checksum ?? this.checksum, isFavorite: isFavorite ?? this.isFavorite, orientation: orientation ?? this.orientation, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (name.present) { map['name'] = Variable(name.value); } if (type.present) { map['type'] = Variable(type.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (width.present) { map['width'] = Variable(width.value); } if (height.present) { map['height'] = Variable(height.value); } if (durationInSeconds.present) { map['duration_in_seconds'] = Variable(durationInSeconds.value); } if (id.present) { map['id'] = Variable(id.value); } if (checksum.present) { map['checksum'] = Variable(checksum.value); } if (isFavorite.present) { map['is_favorite'] = Variable(isFavorite.value); } if (orientation.present) { map['orientation'] = Variable(orientation.value); } return map; } @override String toString() { return (StringBuffer('LocalAssetEntityCompanion(') ..write('name: $name, ') ..write('type: $type, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('width: $width, ') ..write('height: $height, ') ..write('durationInSeconds: $durationInSeconds, ') ..write('id: $id, ') ..write('checksum: $checksum, ') ..write('isFavorite: $isFavorite, ') ..write('orientation: $orientation') ..write(')')) .toString(); } } class StackEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; StackEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn('created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn ownerId = GeneratedColumn('owner_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn primaryAssetId = GeneratedColumn('primary_asset_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); @override List get $columns => [id, createdAt, updatedAt, ownerId, primaryAssetId]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'stack_entity'; @override Set get $primaryKey => {id}; @override StackEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return StackEntityData( id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, ownerId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!, primaryAssetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}primary_asset_id'])!, ); } @override StackEntity createAlias(String alias) { return StackEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class StackEntityData extends DataClass implements Insertable { final String id; final DateTime createdAt; final DateTime updatedAt; final String ownerId; final String primaryAssetId; const StackEntityData( {required this.id, required this.createdAt, required this.updatedAt, required this.ownerId, required this.primaryAssetId}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['owner_id'] = Variable(ownerId); map['primary_asset_id'] = Variable(primaryAssetId); return map; } factory StackEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return StackEntityData( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), ownerId: serializer.fromJson(json['ownerId']), primaryAssetId: serializer.fromJson(json['primaryAssetId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'ownerId': serializer.toJson(ownerId), 'primaryAssetId': serializer.toJson(primaryAssetId), }; } StackEntityData copyWith( {String? id, DateTime? createdAt, DateTime? updatedAt, String? ownerId, String? primaryAssetId}) => StackEntityData( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ownerId: ownerId ?? this.ownerId, primaryAssetId: primaryAssetId ?? this.primaryAssetId, ); StackEntityData copyWithCompanion(StackEntityCompanion data) { return StackEntityData( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, primaryAssetId: data.primaryAssetId.present ? data.primaryAssetId.value : this.primaryAssetId, ); } @override String toString() { return (StringBuffer('StackEntityData(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('ownerId: $ownerId, ') ..write('primaryAssetId: $primaryAssetId') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, createdAt, updatedAt, ownerId, primaryAssetId); @override bool operator ==(Object other) => identical(this, other) || (other is StackEntityData && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.ownerId == this.ownerId && other.primaryAssetId == this.primaryAssetId); } class StackEntityCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value ownerId; final Value primaryAssetId; const StackEntityCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.ownerId = const Value.absent(), this.primaryAssetId = const Value.absent(), }); StackEntityCompanion.insert({ required String id, this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), required String ownerId, required String primaryAssetId, }) : id = Value(id), ownerId = Value(ownerId), primaryAssetId = Value(primaryAssetId); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? ownerId, Expression? primaryAssetId, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (ownerId != null) 'owner_id': ownerId, if (primaryAssetId != null) 'primary_asset_id': primaryAssetId, }); } StackEntityCompanion copyWith( {Value? id, Value? createdAt, Value? updatedAt, Value? ownerId, Value? primaryAssetId}) { return StackEntityCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ownerId: ownerId ?? this.ownerId, primaryAssetId: primaryAssetId ?? this.primaryAssetId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (ownerId.present) { map['owner_id'] = Variable(ownerId.value); } if (primaryAssetId.present) { map['primary_asset_id'] = Variable(primaryAssetId.value); } return map; } @override String toString() { return (StringBuffer('StackEntityCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('ownerId: $ownerId, ') ..write('primaryAssetId: $primaryAssetId') ..write(')')) .toString(); } } class UserMetadataEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; UserMetadataEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn userId = GeneratedColumn('user_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn key = GeneratedColumn('key', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn value = GeneratedColumn('value', aliasedName, false, type: DriftSqlType.blob, requiredDuringInsert: true); @override List get $columns => [userId, key, value]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'user_metadata_entity'; @override Set get $primaryKey => {userId, key}; @override UserMetadataEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return UserMetadataEntityData( userId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}user_id'])!, key: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}key'])!, value: attachedDatabase.typeMapping.read(DriftSqlType.blob, data['${effectivePrefix}value'])!, ); } @override UserMetadataEntity createAlias(String alias) { return UserMetadataEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class UserMetadataEntityData extends DataClass implements Insertable { final String userId; final int key; final Uint8List value; const UserMetadataEntityData({required this.userId, required this.key, required this.value}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['user_id'] = Variable(userId); map['key'] = Variable(key); map['value'] = Variable(value); return map; } factory UserMetadataEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return UserMetadataEntityData( userId: serializer.fromJson(json['userId']), key: serializer.fromJson(json['key']), value: serializer.fromJson(json['value']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'userId': serializer.toJson(userId), 'key': serializer.toJson(key), 'value': serializer.toJson(value), }; } UserMetadataEntityData copyWith({String? userId, int? key, Uint8List? value}) => UserMetadataEntityData( userId: userId ?? this.userId, key: key ?? this.key, value: value ?? this.value, ); UserMetadataEntityData copyWithCompanion(UserMetadataEntityCompanion data) { return UserMetadataEntityData( userId: data.userId.present ? data.userId.value : this.userId, key: data.key.present ? data.key.value : this.key, value: data.value.present ? data.value.value : this.value, ); } @override String toString() { return (StringBuffer('UserMetadataEntityData(') ..write('userId: $userId, ') ..write('key: $key, ') ..write('value: $value') ..write(')')) .toString(); } @override int get hashCode => Object.hash(userId, key, $driftBlobEquality.hash(value)); @override bool operator ==(Object other) => identical(this, other) || (other is UserMetadataEntityData && other.userId == this.userId && other.key == this.key && $driftBlobEquality.equals(other.value, this.value)); } class UserMetadataEntityCompanion extends UpdateCompanion { final Value userId; final Value key; final Value value; const UserMetadataEntityCompanion({ this.userId = const Value.absent(), this.key = const Value.absent(), this.value = const Value.absent(), }); UserMetadataEntityCompanion.insert({ required String userId, required int key, required Uint8List value, }) : userId = Value(userId), key = Value(key), value = Value(value); static Insertable custom({ Expression? userId, Expression? key, Expression? value, }) { return RawValuesInsertable({ if (userId != null) 'user_id': userId, if (key != null) 'key': key, if (value != null) 'value': value, }); } UserMetadataEntityCompanion copyWith({Value? userId, Value? key, Value? value}) { return UserMetadataEntityCompanion( userId: userId ?? this.userId, key: key ?? this.key, value: value ?? this.value, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (userId.present) { map['user_id'] = Variable(userId.value); } if (key.present) { map['key'] = Variable(key.value); } if (value.present) { map['value'] = Variable(value.value); } return map; } @override String toString() { return (StringBuffer('UserMetadataEntityCompanion(') ..write('userId: $userId, ') ..write('key: $key, ') ..write('value: $value') ..write(')')) .toString(); } } class PartnerEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; PartnerEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn sharedById = GeneratedColumn('shared_by_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn sharedWithId = GeneratedColumn('shared_with_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn inTimeline = GeneratedColumn('in_timeline', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("in_timeline" IN (0, 1))'), defaultValue: const CustomExpression('0')); @override List get $columns => [sharedById, sharedWithId, inTimeline]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'partner_entity'; @override Set get $primaryKey => {sharedById, sharedWithId}; @override PartnerEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return PartnerEntityData( sharedById: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}shared_by_id'])!, sharedWithId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}shared_with_id'])!, inTimeline: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}in_timeline'])!, ); } @override PartnerEntity createAlias(String alias) { return PartnerEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class PartnerEntityData extends DataClass implements Insertable { final String sharedById; final String sharedWithId; final bool inTimeline; const PartnerEntityData({required this.sharedById, required this.sharedWithId, required this.inTimeline}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['shared_by_id'] = Variable(sharedById); map['shared_with_id'] = Variable(sharedWithId); map['in_timeline'] = Variable(inTimeline); return map; } factory PartnerEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return PartnerEntityData( sharedById: serializer.fromJson(json['sharedById']), sharedWithId: serializer.fromJson(json['sharedWithId']), inTimeline: serializer.fromJson(json['inTimeline']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'sharedById': serializer.toJson(sharedById), 'sharedWithId': serializer.toJson(sharedWithId), 'inTimeline': serializer.toJson(inTimeline), }; } PartnerEntityData copyWith({String? sharedById, String? sharedWithId, bool? inTimeline}) => PartnerEntityData( sharedById: sharedById ?? this.sharedById, sharedWithId: sharedWithId ?? this.sharedWithId, inTimeline: inTimeline ?? this.inTimeline, ); PartnerEntityData copyWithCompanion(PartnerEntityCompanion data) { return PartnerEntityData( sharedById: data.sharedById.present ? data.sharedById.value : this.sharedById, sharedWithId: data.sharedWithId.present ? data.sharedWithId.value : this.sharedWithId, inTimeline: data.inTimeline.present ? data.inTimeline.value : this.inTimeline, ); } @override String toString() { return (StringBuffer('PartnerEntityData(') ..write('sharedById: $sharedById, ') ..write('sharedWithId: $sharedWithId, ') ..write('inTimeline: $inTimeline') ..write(')')) .toString(); } @override int get hashCode => Object.hash(sharedById, sharedWithId, inTimeline); @override bool operator ==(Object other) => identical(this, other) || (other is PartnerEntityData && other.sharedById == this.sharedById && other.sharedWithId == this.sharedWithId && other.inTimeline == this.inTimeline); } class PartnerEntityCompanion extends UpdateCompanion { final Value sharedById; final Value sharedWithId; final Value inTimeline; const PartnerEntityCompanion({ this.sharedById = const Value.absent(), this.sharedWithId = const Value.absent(), this.inTimeline = const Value.absent(), }); PartnerEntityCompanion.insert({ required String sharedById, required String sharedWithId, this.inTimeline = const Value.absent(), }) : sharedById = Value(sharedById), sharedWithId = Value(sharedWithId); static Insertable custom({ Expression? sharedById, Expression? sharedWithId, Expression? inTimeline, }) { return RawValuesInsertable({ if (sharedById != null) 'shared_by_id': sharedById, if (sharedWithId != null) 'shared_with_id': sharedWithId, if (inTimeline != null) 'in_timeline': inTimeline, }); } PartnerEntityCompanion copyWith({Value? sharedById, Value? sharedWithId, Value? inTimeline}) { return PartnerEntityCompanion( sharedById: sharedById ?? this.sharedById, sharedWithId: sharedWithId ?? this.sharedWithId, inTimeline: inTimeline ?? this.inTimeline, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (sharedById.present) { map['shared_by_id'] = Variable(sharedById.value); } if (sharedWithId.present) { map['shared_with_id'] = Variable(sharedWithId.value); } if (inTimeline.present) { map['in_timeline'] = Variable(inTimeline.value); } return map; } @override String toString() { return (StringBuffer('PartnerEntityCompanion(') ..write('sharedById: $sharedById, ') ..write('sharedWithId: $sharedWithId, ') ..write('inTimeline: $inTimeline') ..write(')')) .toString(); } } class LocalAlbumEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; LocalAlbumEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn name = GeneratedColumn('name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn backupSelection = GeneratedColumn('backup_selection', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn isIosSharedAlbum = GeneratedColumn('is_ios_shared_album', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_ios_shared_album" IN (0, 1))'), defaultValue: const CustomExpression('0')); late final GeneratedColumn marker_ = GeneratedColumn('marker', aliasedName, true, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("marker" IN (0, 1))')); @override List get $columns => [id, name, updatedAt, backupSelection, isIosSharedAlbum, marker_]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'local_album_entity'; @override Set get $primaryKey => {id}; @override LocalAlbumEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return LocalAlbumEntityData( id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, name: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}name'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, backupSelection: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}backup_selection'])!, isIosSharedAlbum: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_ios_shared_album'])!, marker_: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}marker']), ); } @override LocalAlbumEntity createAlias(String alias) { return LocalAlbumEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class LocalAlbumEntityData extends DataClass implements Insertable { final String id; final String name; final DateTime updatedAt; final int backupSelection; final bool isIosSharedAlbum; final bool? marker_; const LocalAlbumEntityData( {required this.id, required this.name, required this.updatedAt, required this.backupSelection, required this.isIosSharedAlbum, this.marker_}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); map['updated_at'] = Variable(updatedAt); map['backup_selection'] = Variable(backupSelection); map['is_ios_shared_album'] = Variable(isIosSharedAlbum); if (!nullToAbsent || marker_ != null) { map['marker'] = Variable(marker_); } return map; } factory LocalAlbumEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return LocalAlbumEntityData( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), updatedAt: serializer.fromJson(json['updatedAt']), backupSelection: serializer.fromJson(json['backupSelection']), isIosSharedAlbum: serializer.fromJson(json['isIosSharedAlbum']), marker_: serializer.fromJson(json['marker_']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'updatedAt': serializer.toJson(updatedAt), 'backupSelection': serializer.toJson(backupSelection), 'isIosSharedAlbum': serializer.toJson(isIosSharedAlbum), 'marker_': serializer.toJson(marker_), }; } LocalAlbumEntityData copyWith( {String? id, String? name, DateTime? updatedAt, int? backupSelection, bool? isIosSharedAlbum, Value marker_ = const Value.absent()}) => LocalAlbumEntityData( id: id ?? this.id, name: name ?? this.name, updatedAt: updatedAt ?? this.updatedAt, backupSelection: backupSelection ?? this.backupSelection, isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, marker_: marker_.present ? marker_.value : this.marker_, ); LocalAlbumEntityData copyWithCompanion(LocalAlbumEntityCompanion data) { return LocalAlbumEntityData( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, backupSelection: data.backupSelection.present ? data.backupSelection.value : this.backupSelection, isIosSharedAlbum: data.isIosSharedAlbum.present ? data.isIosSharedAlbum.value : this.isIosSharedAlbum, marker_: data.marker_.present ? data.marker_.value : this.marker_, ); } @override String toString() { return (StringBuffer('LocalAlbumEntityData(') ..write('id: $id, ') ..write('name: $name, ') ..write('updatedAt: $updatedAt, ') ..write('backupSelection: $backupSelection, ') ..write('isIosSharedAlbum: $isIosSharedAlbum, ') ..write('marker_: $marker_') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, name, updatedAt, backupSelection, isIosSharedAlbum, marker_); @override bool operator ==(Object other) => identical(this, other) || (other is LocalAlbumEntityData && other.id == this.id && other.name == this.name && other.updatedAt == this.updatedAt && other.backupSelection == this.backupSelection && other.isIosSharedAlbum == this.isIosSharedAlbum && other.marker_ == this.marker_); } class LocalAlbumEntityCompanion extends UpdateCompanion { final Value id; final Value name; final Value updatedAt; final Value backupSelection; final Value isIosSharedAlbum; final Value marker_; const LocalAlbumEntityCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.updatedAt = const Value.absent(), this.backupSelection = const Value.absent(), this.isIosSharedAlbum = const Value.absent(), this.marker_ = const Value.absent(), }); LocalAlbumEntityCompanion.insert({ required String id, required String name, this.updatedAt = const Value.absent(), required int backupSelection, this.isIosSharedAlbum = const Value.absent(), this.marker_ = const Value.absent(), }) : id = Value(id), name = Value(name), backupSelection = Value(backupSelection); static Insertable custom({ Expression? id, Expression? name, Expression? updatedAt, Expression? backupSelection, Expression? isIosSharedAlbum, Expression? marker_, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (updatedAt != null) 'updated_at': updatedAt, if (backupSelection != null) 'backup_selection': backupSelection, if (isIosSharedAlbum != null) 'is_ios_shared_album': isIosSharedAlbum, if (marker_ != null) 'marker': marker_, }); } LocalAlbumEntityCompanion copyWith( {Value? id, Value? name, Value? updatedAt, Value? backupSelection, Value? isIosSharedAlbum, Value? marker_}) { return LocalAlbumEntityCompanion( id: id ?? this.id, name: name ?? this.name, updatedAt: updatedAt ?? this.updatedAt, backupSelection: backupSelection ?? this.backupSelection, isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum, marker_: marker_ ?? this.marker_, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (backupSelection.present) { map['backup_selection'] = Variable(backupSelection.value); } if (isIosSharedAlbum.present) { map['is_ios_shared_album'] = Variable(isIosSharedAlbum.value); } if (marker_.present) { map['marker'] = Variable(marker_.value); } return map; } @override String toString() { return (StringBuffer('LocalAlbumEntityCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('updatedAt: $updatedAt, ') ..write('backupSelection: $backupSelection, ') ..write('isIosSharedAlbum: $isIosSharedAlbum, ') ..write('marker_: $marker_') ..write(')')) .toString(); } } class LocalAlbumAssetEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn assetId = GeneratedColumn('asset_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES local_asset_entity (id) ON DELETE CASCADE')); late final GeneratedColumn albumId = GeneratedColumn('album_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES local_album_entity (id) ON DELETE CASCADE')); @override List get $columns => [assetId, albumId]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'local_album_asset_entity'; @override Set get $primaryKey => {assetId, albumId}; @override LocalAlbumAssetEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return LocalAlbumAssetEntityData( assetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!, albumId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}album_id'])!, ); } @override LocalAlbumAssetEntity createAlias(String alias) { return LocalAlbumAssetEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class LocalAlbumAssetEntityData extends DataClass implements Insertable { final String assetId; final String albumId; const LocalAlbumAssetEntityData({required this.assetId, required this.albumId}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['asset_id'] = Variable(assetId); map['album_id'] = Variable(albumId); return map; } factory LocalAlbumAssetEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return LocalAlbumAssetEntityData( assetId: serializer.fromJson(json['assetId']), albumId: serializer.fromJson(json['albumId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'assetId': serializer.toJson(assetId), 'albumId': serializer.toJson(albumId), }; } LocalAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => LocalAlbumAssetEntityData( assetId: assetId ?? this.assetId, albumId: albumId ?? this.albumId, ); LocalAlbumAssetEntityData copyWithCompanion(LocalAlbumAssetEntityCompanion data) { return LocalAlbumAssetEntityData( assetId: data.assetId.present ? data.assetId.value : this.assetId, albumId: data.albumId.present ? data.albumId.value : this.albumId, ); } @override String toString() { return (StringBuffer('LocalAlbumAssetEntityData(') ..write('assetId: $assetId, ') ..write('albumId: $albumId') ..write(')')) .toString(); } @override int get hashCode => Object.hash(assetId, albumId); @override bool operator ==(Object other) => identical(this, other) || (other is LocalAlbumAssetEntityData && other.assetId == this.assetId && other.albumId == this.albumId); } class LocalAlbumAssetEntityCompanion extends UpdateCompanion { final Value assetId; final Value albumId; const LocalAlbumAssetEntityCompanion({ this.assetId = const Value.absent(), this.albumId = const Value.absent(), }); LocalAlbumAssetEntityCompanion.insert({ required String assetId, required String albumId, }) : assetId = Value(assetId), albumId = Value(albumId); static Insertable custom({ Expression? assetId, Expression? albumId, }) { return RawValuesInsertable({ if (assetId != null) 'asset_id': assetId, if (albumId != null) 'album_id': albumId, }); } LocalAlbumAssetEntityCompanion copyWith({Value? assetId, Value? albumId}) { return LocalAlbumAssetEntityCompanion( assetId: assetId ?? this.assetId, albumId: albumId ?? this.albumId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (assetId.present) { map['asset_id'] = Variable(assetId.value); } if (albumId.present) { map['album_id'] = Variable(albumId.value); } return map; } @override String toString() { return (StringBuffer('LocalAlbumAssetEntityCompanion(') ..write('assetId: $assetId, ') ..write('albumId: $albumId') ..write(')')) .toString(); } } class RemoteExifEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; RemoteExifEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn assetId = GeneratedColumn('asset_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES remote_asset_entity (id) ON DELETE CASCADE')); late final GeneratedColumn city = GeneratedColumn('city', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn state = GeneratedColumn('state', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn country = GeneratedColumn('country', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn dateTimeOriginal = GeneratedColumn( 'date_time_original', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn description = GeneratedColumn('description', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn height = GeneratedColumn('height', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn width = GeneratedColumn('width', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn exposureTime = GeneratedColumn('exposure_time', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn fNumber = GeneratedColumn('f_number', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false); late final GeneratedColumn fileSize = GeneratedColumn('file_size', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn focalLength = GeneratedColumn('focal_length', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false); late final GeneratedColumn latitude = GeneratedColumn('latitude', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false); late final GeneratedColumn longitude = GeneratedColumn('longitude', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false); late final GeneratedColumn iso = GeneratedColumn('iso', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn make = GeneratedColumn('make', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn model = GeneratedColumn('model', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn lens = GeneratedColumn('lens', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn orientation = GeneratedColumn('orientation', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn timeZone = GeneratedColumn('time_zone', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn rating = GeneratedColumn('rating', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false); late final GeneratedColumn projectionType = GeneratedColumn('projection_type', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); @override List get $columns => [ assetId, city, state, country, dateTimeOriginal, description, height, width, exposureTime, fNumber, fileSize, focalLength, latitude, longitude, iso, make, model, lens, orientation, timeZone, rating, projectionType ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'remote_exif_entity'; @override Set get $primaryKey => {assetId}; @override RemoteExifEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return RemoteExifEntityData( assetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!, city: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}city']), state: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}state']), country: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}country']), dateTimeOriginal: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}date_time_original']), description: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}description']), height: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}height']), width: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}width']), exposureTime: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}exposure_time']), fNumber: attachedDatabase.typeMapping.read(DriftSqlType.double, data['${effectivePrefix}f_number']), fileSize: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}file_size']), focalLength: attachedDatabase.typeMapping.read(DriftSqlType.double, data['${effectivePrefix}focal_length']), latitude: attachedDatabase.typeMapping.read(DriftSqlType.double, data['${effectivePrefix}latitude']), longitude: attachedDatabase.typeMapping.read(DriftSqlType.double, data['${effectivePrefix}longitude']), iso: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}iso']), make: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}make']), model: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}model']), lens: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}lens']), orientation: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}orientation']), timeZone: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}time_zone']), rating: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}rating']), projectionType: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}projection_type']), ); } @override RemoteExifEntity createAlias(String alias) { return RemoteExifEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class RemoteExifEntityData extends DataClass implements Insertable { final String assetId; final String? city; final String? state; final String? country; final DateTime? dateTimeOriginal; final String? description; final int? height; final int? width; final String? exposureTime; final double? fNumber; final int? fileSize; final double? focalLength; final double? latitude; final double? longitude; final int? iso; final String? make; final String? model; final String? lens; final String? orientation; final String? timeZone; final int? rating; final String? projectionType; const RemoteExifEntityData( {required this.assetId, this.city, this.state, this.country, this.dateTimeOriginal, this.description, this.height, this.width, this.exposureTime, this.fNumber, this.fileSize, this.focalLength, this.latitude, this.longitude, this.iso, this.make, this.model, this.lens, this.orientation, this.timeZone, this.rating, this.projectionType}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['asset_id'] = Variable(assetId); if (!nullToAbsent || city != null) { map['city'] = Variable(city); } if (!nullToAbsent || state != null) { map['state'] = Variable(state); } if (!nullToAbsent || country != null) { map['country'] = Variable(country); } if (!nullToAbsent || dateTimeOriginal != null) { map['date_time_original'] = Variable(dateTimeOriginal); } if (!nullToAbsent || description != null) { map['description'] = Variable(description); } if (!nullToAbsent || height != null) { map['height'] = Variable(height); } if (!nullToAbsent || width != null) { map['width'] = Variable(width); } if (!nullToAbsent || exposureTime != null) { map['exposure_time'] = Variable(exposureTime); } if (!nullToAbsent || fNumber != null) { map['f_number'] = Variable(fNumber); } if (!nullToAbsent || fileSize != null) { map['file_size'] = Variable(fileSize); } if (!nullToAbsent || focalLength != null) { map['focal_length'] = Variable(focalLength); } if (!nullToAbsent || latitude != null) { map['latitude'] = Variable(latitude); } if (!nullToAbsent || longitude != null) { map['longitude'] = Variable(longitude); } if (!nullToAbsent || iso != null) { map['iso'] = Variable(iso); } if (!nullToAbsent || make != null) { map['make'] = Variable(make); } if (!nullToAbsent || model != null) { map['model'] = Variable(model); } if (!nullToAbsent || lens != null) { map['lens'] = Variable(lens); } if (!nullToAbsent || orientation != null) { map['orientation'] = Variable(orientation); } if (!nullToAbsent || timeZone != null) { map['time_zone'] = Variable(timeZone); } if (!nullToAbsent || rating != null) { map['rating'] = Variable(rating); } if (!nullToAbsent || projectionType != null) { map['projection_type'] = Variable(projectionType); } return map; } factory RemoteExifEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return RemoteExifEntityData( assetId: serializer.fromJson(json['assetId']), city: serializer.fromJson(json['city']), state: serializer.fromJson(json['state']), country: serializer.fromJson(json['country']), dateTimeOriginal: serializer.fromJson(json['dateTimeOriginal']), description: serializer.fromJson(json['description']), height: serializer.fromJson(json['height']), width: serializer.fromJson(json['width']), exposureTime: serializer.fromJson(json['exposureTime']), fNumber: serializer.fromJson(json['fNumber']), fileSize: serializer.fromJson(json['fileSize']), focalLength: serializer.fromJson(json['focalLength']), latitude: serializer.fromJson(json['latitude']), longitude: serializer.fromJson(json['longitude']), iso: serializer.fromJson(json['iso']), make: serializer.fromJson(json['make']), model: serializer.fromJson(json['model']), lens: serializer.fromJson(json['lens']), orientation: serializer.fromJson(json['orientation']), timeZone: serializer.fromJson(json['timeZone']), rating: serializer.fromJson(json['rating']), projectionType: serializer.fromJson(json['projectionType']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'assetId': serializer.toJson(assetId), 'city': serializer.toJson(city), 'state': serializer.toJson(state), 'country': serializer.toJson(country), 'dateTimeOriginal': serializer.toJson(dateTimeOriginal), 'description': serializer.toJson(description), 'height': serializer.toJson(height), 'width': serializer.toJson(width), 'exposureTime': serializer.toJson(exposureTime), 'fNumber': serializer.toJson(fNumber), 'fileSize': serializer.toJson(fileSize), 'focalLength': serializer.toJson(focalLength), 'latitude': serializer.toJson(latitude), 'longitude': serializer.toJson(longitude), 'iso': serializer.toJson(iso), 'make': serializer.toJson(make), 'model': serializer.toJson(model), 'lens': serializer.toJson(lens), 'orientation': serializer.toJson(orientation), 'timeZone': serializer.toJson(timeZone), 'rating': serializer.toJson(rating), 'projectionType': serializer.toJson(projectionType), }; } RemoteExifEntityData copyWith( {String? assetId, Value city = const Value.absent(), Value state = const Value.absent(), Value country = const Value.absent(), Value dateTimeOriginal = const Value.absent(), Value description = const Value.absent(), Value height = const Value.absent(), Value width = const Value.absent(), Value exposureTime = const Value.absent(), Value fNumber = const Value.absent(), Value fileSize = const Value.absent(), Value focalLength = const Value.absent(), Value latitude = const Value.absent(), Value longitude = const Value.absent(), Value iso = const Value.absent(), Value make = const Value.absent(), Value model = const Value.absent(), Value lens = const Value.absent(), Value orientation = const Value.absent(), Value timeZone = const Value.absent(), Value rating = const Value.absent(), Value projectionType = const Value.absent()}) => RemoteExifEntityData( assetId: assetId ?? this.assetId, city: city.present ? city.value : this.city, state: state.present ? state.value : this.state, country: country.present ? country.value : this.country, dateTimeOriginal: dateTimeOriginal.present ? dateTimeOriginal.value : this.dateTimeOriginal, description: description.present ? description.value : this.description, height: height.present ? height.value : this.height, width: width.present ? width.value : this.width, exposureTime: exposureTime.present ? exposureTime.value : this.exposureTime, fNumber: fNumber.present ? fNumber.value : this.fNumber, fileSize: fileSize.present ? fileSize.value : this.fileSize, focalLength: focalLength.present ? focalLength.value : this.focalLength, latitude: latitude.present ? latitude.value : this.latitude, longitude: longitude.present ? longitude.value : this.longitude, iso: iso.present ? iso.value : this.iso, make: make.present ? make.value : this.make, model: model.present ? model.value : this.model, lens: lens.present ? lens.value : this.lens, orientation: orientation.present ? orientation.value : this.orientation, timeZone: timeZone.present ? timeZone.value : this.timeZone, rating: rating.present ? rating.value : this.rating, projectionType: projectionType.present ? projectionType.value : this.projectionType, ); RemoteExifEntityData copyWithCompanion(RemoteExifEntityCompanion data) { return RemoteExifEntityData( assetId: data.assetId.present ? data.assetId.value : this.assetId, city: data.city.present ? data.city.value : this.city, state: data.state.present ? data.state.value : this.state, country: data.country.present ? data.country.value : this.country, dateTimeOriginal: data.dateTimeOriginal.present ? data.dateTimeOriginal.value : this.dateTimeOriginal, description: data.description.present ? data.description.value : this.description, height: data.height.present ? data.height.value : this.height, width: data.width.present ? data.width.value : this.width, exposureTime: data.exposureTime.present ? data.exposureTime.value : this.exposureTime, fNumber: data.fNumber.present ? data.fNumber.value : this.fNumber, fileSize: data.fileSize.present ? data.fileSize.value : this.fileSize, focalLength: data.focalLength.present ? data.focalLength.value : this.focalLength, latitude: data.latitude.present ? data.latitude.value : this.latitude, longitude: data.longitude.present ? data.longitude.value : this.longitude, iso: data.iso.present ? data.iso.value : this.iso, make: data.make.present ? data.make.value : this.make, model: data.model.present ? data.model.value : this.model, lens: data.lens.present ? data.lens.value : this.lens, orientation: data.orientation.present ? data.orientation.value : this.orientation, timeZone: data.timeZone.present ? data.timeZone.value : this.timeZone, rating: data.rating.present ? data.rating.value : this.rating, projectionType: data.projectionType.present ? data.projectionType.value : this.projectionType, ); } @override String toString() { return (StringBuffer('RemoteExifEntityData(') ..write('assetId: $assetId, ') ..write('city: $city, ') ..write('state: $state, ') ..write('country: $country, ') ..write('dateTimeOriginal: $dateTimeOriginal, ') ..write('description: $description, ') ..write('height: $height, ') ..write('width: $width, ') ..write('exposureTime: $exposureTime, ') ..write('fNumber: $fNumber, ') ..write('fileSize: $fileSize, ') ..write('focalLength: $focalLength, ') ..write('latitude: $latitude, ') ..write('longitude: $longitude, ') ..write('iso: $iso, ') ..write('make: $make, ') ..write('model: $model, ') ..write('lens: $lens, ') ..write('orientation: $orientation, ') ..write('timeZone: $timeZone, ') ..write('rating: $rating, ') ..write('projectionType: $projectionType') ..write(')')) .toString(); } @override int get hashCode => Object.hashAll([ assetId, city, state, country, dateTimeOriginal, description, height, width, exposureTime, fNumber, fileSize, focalLength, latitude, longitude, iso, make, model, lens, orientation, timeZone, rating, projectionType ]); @override bool operator ==(Object other) => identical(this, other) || (other is RemoteExifEntityData && other.assetId == this.assetId && other.city == this.city && other.state == this.state && other.country == this.country && other.dateTimeOriginal == this.dateTimeOriginal && other.description == this.description && other.height == this.height && other.width == this.width && other.exposureTime == this.exposureTime && other.fNumber == this.fNumber && other.fileSize == this.fileSize && other.focalLength == this.focalLength && other.latitude == this.latitude && other.longitude == this.longitude && other.iso == this.iso && other.make == this.make && other.model == this.model && other.lens == this.lens && other.orientation == this.orientation && other.timeZone == this.timeZone && other.rating == this.rating && other.projectionType == this.projectionType); } class RemoteExifEntityCompanion extends UpdateCompanion { final Value assetId; final Value city; final Value state; final Value country; final Value dateTimeOriginal; final Value description; final Value height; final Value width; final Value exposureTime; final Value fNumber; final Value fileSize; final Value focalLength; final Value latitude; final Value longitude; final Value iso; final Value make; final Value model; final Value lens; final Value orientation; final Value timeZone; final Value rating; final Value projectionType; const RemoteExifEntityCompanion({ this.assetId = const Value.absent(), this.city = const Value.absent(), this.state = const Value.absent(), this.country = const Value.absent(), this.dateTimeOriginal = const Value.absent(), this.description = const Value.absent(), this.height = const Value.absent(), this.width = const Value.absent(), this.exposureTime = const Value.absent(), this.fNumber = const Value.absent(), this.fileSize = const Value.absent(), this.focalLength = const Value.absent(), this.latitude = const Value.absent(), this.longitude = const Value.absent(), this.iso = const Value.absent(), this.make = const Value.absent(), this.model = const Value.absent(), this.lens = const Value.absent(), this.orientation = const Value.absent(), this.timeZone = const Value.absent(), this.rating = const Value.absent(), this.projectionType = const Value.absent(), }); RemoteExifEntityCompanion.insert({ required String assetId, this.city = const Value.absent(), this.state = const Value.absent(), this.country = const Value.absent(), this.dateTimeOriginal = const Value.absent(), this.description = const Value.absent(), this.height = const Value.absent(), this.width = const Value.absent(), this.exposureTime = const Value.absent(), this.fNumber = const Value.absent(), this.fileSize = const Value.absent(), this.focalLength = const Value.absent(), this.latitude = const Value.absent(), this.longitude = const Value.absent(), this.iso = const Value.absent(), this.make = const Value.absent(), this.model = const Value.absent(), this.lens = const Value.absent(), this.orientation = const Value.absent(), this.timeZone = const Value.absent(), this.rating = const Value.absent(), this.projectionType = const Value.absent(), }) : assetId = Value(assetId); static Insertable custom({ Expression? assetId, Expression? city, Expression? state, Expression? country, Expression? dateTimeOriginal, Expression? description, Expression? height, Expression? width, Expression? exposureTime, Expression? fNumber, Expression? fileSize, Expression? focalLength, Expression? latitude, Expression? longitude, Expression? iso, Expression? make, Expression? model, Expression? lens, Expression? orientation, Expression? timeZone, Expression? rating, Expression? projectionType, }) { return RawValuesInsertable({ if (assetId != null) 'asset_id': assetId, if (city != null) 'city': city, if (state != null) 'state': state, if (country != null) 'country': country, if (dateTimeOriginal != null) 'date_time_original': dateTimeOriginal, if (description != null) 'description': description, if (height != null) 'height': height, if (width != null) 'width': width, if (exposureTime != null) 'exposure_time': exposureTime, if (fNumber != null) 'f_number': fNumber, if (fileSize != null) 'file_size': fileSize, if (focalLength != null) 'focal_length': focalLength, if (latitude != null) 'latitude': latitude, if (longitude != null) 'longitude': longitude, if (iso != null) 'iso': iso, if (make != null) 'make': make, if (model != null) 'model': model, if (lens != null) 'lens': lens, if (orientation != null) 'orientation': orientation, if (timeZone != null) 'time_zone': timeZone, if (rating != null) 'rating': rating, if (projectionType != null) 'projection_type': projectionType, }); } RemoteExifEntityCompanion copyWith( {Value? assetId, Value? city, Value? state, Value? country, Value? dateTimeOriginal, Value? description, Value? height, Value? width, Value? exposureTime, Value? fNumber, Value? fileSize, Value? focalLength, Value? latitude, Value? longitude, Value? iso, Value? make, Value? model, Value? lens, Value? orientation, Value? timeZone, Value? rating, Value? projectionType}) { return RemoteExifEntityCompanion( assetId: assetId ?? this.assetId, city: city ?? this.city, state: state ?? this.state, country: country ?? this.country, dateTimeOriginal: dateTimeOriginal ?? this.dateTimeOriginal, description: description ?? this.description, height: height ?? this.height, width: width ?? this.width, exposureTime: exposureTime ?? this.exposureTime, fNumber: fNumber ?? this.fNumber, fileSize: fileSize ?? this.fileSize, focalLength: focalLength ?? this.focalLength, latitude: latitude ?? this.latitude, longitude: longitude ?? this.longitude, iso: iso ?? this.iso, make: make ?? this.make, model: model ?? this.model, lens: lens ?? this.lens, orientation: orientation ?? this.orientation, timeZone: timeZone ?? this.timeZone, rating: rating ?? this.rating, projectionType: projectionType ?? this.projectionType, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (assetId.present) { map['asset_id'] = Variable(assetId.value); } if (city.present) { map['city'] = Variable(city.value); } if (state.present) { map['state'] = Variable(state.value); } if (country.present) { map['country'] = Variable(country.value); } if (dateTimeOriginal.present) { map['date_time_original'] = Variable(dateTimeOriginal.value); } if (description.present) { map['description'] = Variable(description.value); } if (height.present) { map['height'] = Variable(height.value); } if (width.present) { map['width'] = Variable(width.value); } if (exposureTime.present) { map['exposure_time'] = Variable(exposureTime.value); } if (fNumber.present) { map['f_number'] = Variable(fNumber.value); } if (fileSize.present) { map['file_size'] = Variable(fileSize.value); } if (focalLength.present) { map['focal_length'] = Variable(focalLength.value); } if (latitude.present) { map['latitude'] = Variable(latitude.value); } if (longitude.present) { map['longitude'] = Variable(longitude.value); } if (iso.present) { map['iso'] = Variable(iso.value); } if (make.present) { map['make'] = Variable(make.value); } if (model.present) { map['model'] = Variable(model.value); } if (lens.present) { map['lens'] = Variable(lens.value); } if (orientation.present) { map['orientation'] = Variable(orientation.value); } if (timeZone.present) { map['time_zone'] = Variable(timeZone.value); } if (rating.present) { map['rating'] = Variable(rating.value); } if (projectionType.present) { map['projection_type'] = Variable(projectionType.value); } return map; } @override String toString() { return (StringBuffer('RemoteExifEntityCompanion(') ..write('assetId: $assetId, ') ..write('city: $city, ') ..write('state: $state, ') ..write('country: $country, ') ..write('dateTimeOriginal: $dateTimeOriginal, ') ..write('description: $description, ') ..write('height: $height, ') ..write('width: $width, ') ..write('exposureTime: $exposureTime, ') ..write('fNumber: $fNumber, ') ..write('fileSize: $fileSize, ') ..write('focalLength: $focalLength, ') ..write('latitude: $latitude, ') ..write('longitude: $longitude, ') ..write('iso: $iso, ') ..write('make: $make, ') ..write('model: $model, ') ..write('lens: $lens, ') ..write('orientation: $orientation, ') ..write('timeZone: $timeZone, ') ..write('rating: $rating, ') ..write('projectionType: $projectionType') ..write(')')) .toString(); } } class RemoteAlbumEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; RemoteAlbumEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn name = GeneratedColumn('name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn description = GeneratedColumn('description', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const CustomExpression('\'\'')); late final GeneratedColumn createdAt = GeneratedColumn('created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn ownerId = GeneratedColumn('owner_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn thumbnailAssetId = GeneratedColumn('thumbnail_asset_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES remote_asset_entity (id) ON DELETE SET NULL')); late final GeneratedColumn isActivityEnabled = GeneratedColumn('is_activity_enabled', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_activity_enabled" IN (0, 1))'), defaultValue: const CustomExpression('1')); late final GeneratedColumn order = GeneratedColumn('order', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); @override List get $columns => [id, name, description, createdAt, updatedAt, ownerId, thumbnailAssetId, isActivityEnabled, order]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'remote_album_entity'; @override Set get $primaryKey => {id}; @override RemoteAlbumEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return RemoteAlbumEntityData( id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, name: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}name'])!, description: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}description'])!, createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, ownerId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!, thumbnailAssetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}thumbnail_asset_id']), isActivityEnabled: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_activity_enabled'])!, order: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}order'])!, ); } @override RemoteAlbumEntity createAlias(String alias) { return RemoteAlbumEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class RemoteAlbumEntityData extends DataClass implements Insertable { final String id; final String name; final String description; final DateTime createdAt; final DateTime updatedAt; final String ownerId; final String? thumbnailAssetId; final bool isActivityEnabled; final int order; const RemoteAlbumEntityData( {required this.id, required this.name, required this.description, required this.createdAt, required this.updatedAt, required this.ownerId, this.thumbnailAssetId, required this.isActivityEnabled, required this.order}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); map['description'] = Variable(description); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['owner_id'] = Variable(ownerId); if (!nullToAbsent || thumbnailAssetId != null) { map['thumbnail_asset_id'] = Variable(thumbnailAssetId); } map['is_activity_enabled'] = Variable(isActivityEnabled); map['order'] = Variable(order); return map; } factory RemoteAlbumEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return RemoteAlbumEntityData( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), description: serializer.fromJson(json['description']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), ownerId: serializer.fromJson(json['ownerId']), thumbnailAssetId: serializer.fromJson(json['thumbnailAssetId']), isActivityEnabled: serializer.fromJson(json['isActivityEnabled']), order: serializer.fromJson(json['order']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'description': serializer.toJson(description), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'ownerId': serializer.toJson(ownerId), 'thumbnailAssetId': serializer.toJson(thumbnailAssetId), 'isActivityEnabled': serializer.toJson(isActivityEnabled), 'order': serializer.toJson(order), }; } RemoteAlbumEntityData copyWith( {String? id, String? name, String? description, DateTime? createdAt, DateTime? updatedAt, String? ownerId, Value thumbnailAssetId = const Value.absent(), bool? isActivityEnabled, int? order}) => RemoteAlbumEntityData( id: id ?? this.id, name: name ?? this.name, description: description ?? this.description, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ownerId: ownerId ?? this.ownerId, thumbnailAssetId: thumbnailAssetId.present ? thumbnailAssetId.value : this.thumbnailAssetId, isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, order: order ?? this.order, ); RemoteAlbumEntityData copyWithCompanion(RemoteAlbumEntityCompanion data) { return RemoteAlbumEntityData( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, description: data.description.present ? data.description.value : this.description, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, thumbnailAssetId: data.thumbnailAssetId.present ? data.thumbnailAssetId.value : this.thumbnailAssetId, isActivityEnabled: data.isActivityEnabled.present ? data.isActivityEnabled.value : this.isActivityEnabled, order: data.order.present ? data.order.value : this.order, ); } @override String toString() { return (StringBuffer('RemoteAlbumEntityData(') ..write('id: $id, ') ..write('name: $name, ') ..write('description: $description, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('ownerId: $ownerId, ') ..write('thumbnailAssetId: $thumbnailAssetId, ') ..write('isActivityEnabled: $isActivityEnabled, ') ..write('order: $order') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, name, description, createdAt, updatedAt, ownerId, thumbnailAssetId, isActivityEnabled, order); @override bool operator ==(Object other) => identical(this, other) || (other is RemoteAlbumEntityData && other.id == this.id && other.name == this.name && other.description == this.description && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.ownerId == this.ownerId && other.thumbnailAssetId == this.thumbnailAssetId && other.isActivityEnabled == this.isActivityEnabled && other.order == this.order); } class RemoteAlbumEntityCompanion extends UpdateCompanion { final Value id; final Value name; final Value description; final Value createdAt; final Value updatedAt; final Value ownerId; final Value thumbnailAssetId; final Value isActivityEnabled; final Value order; const RemoteAlbumEntityCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.description = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.ownerId = const Value.absent(), this.thumbnailAssetId = const Value.absent(), this.isActivityEnabled = const Value.absent(), this.order = const Value.absent(), }); RemoteAlbumEntityCompanion.insert({ required String id, required String name, this.description = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), required String ownerId, this.thumbnailAssetId = const Value.absent(), this.isActivityEnabled = const Value.absent(), required int order, }) : id = Value(id), name = Value(name), ownerId = Value(ownerId), order = Value(order); static Insertable custom({ Expression? id, Expression? name, Expression? description, Expression? createdAt, Expression? updatedAt, Expression? ownerId, Expression? thumbnailAssetId, Expression? isActivityEnabled, Expression? order, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (description != null) 'description': description, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (ownerId != null) 'owner_id': ownerId, if (thumbnailAssetId != null) 'thumbnail_asset_id': thumbnailAssetId, if (isActivityEnabled != null) 'is_activity_enabled': isActivityEnabled, if (order != null) 'order': order, }); } RemoteAlbumEntityCompanion copyWith( {Value? id, Value? name, Value? description, Value? createdAt, Value? updatedAt, Value? ownerId, Value? thumbnailAssetId, Value? isActivityEnabled, Value? order}) { return RemoteAlbumEntityCompanion( id: id ?? this.id, name: name ?? this.name, description: description ?? this.description, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ownerId: ownerId ?? this.ownerId, thumbnailAssetId: thumbnailAssetId ?? this.thumbnailAssetId, isActivityEnabled: isActivityEnabled ?? this.isActivityEnabled, order: order ?? this.order, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (description.present) { map['description'] = Variable(description.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (ownerId.present) { map['owner_id'] = Variable(ownerId.value); } if (thumbnailAssetId.present) { map['thumbnail_asset_id'] = Variable(thumbnailAssetId.value); } if (isActivityEnabled.present) { map['is_activity_enabled'] = Variable(isActivityEnabled.value); } if (order.present) { map['order'] = Variable(order.value); } return map; } @override String toString() { return (StringBuffer('RemoteAlbumEntityCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('description: $description, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('ownerId: $ownerId, ') ..write('thumbnailAssetId: $thumbnailAssetId, ') ..write('isActivityEnabled: $isActivityEnabled, ') ..write('order: $order') ..write(')')) .toString(); } } class RemoteAlbumAssetEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn assetId = GeneratedColumn('asset_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES remote_asset_entity (id) ON DELETE CASCADE')); late final GeneratedColumn albumId = GeneratedColumn('album_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES remote_album_entity (id) ON DELETE CASCADE')); @override List get $columns => [assetId, albumId]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'remote_album_asset_entity'; @override Set get $primaryKey => {assetId, albumId}; @override RemoteAlbumAssetEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return RemoteAlbumAssetEntityData( assetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!, albumId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}album_id'])!, ); } @override RemoteAlbumAssetEntity createAlias(String alias) { return RemoteAlbumAssetEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class RemoteAlbumAssetEntityData extends DataClass implements Insertable { final String assetId; final String albumId; const RemoteAlbumAssetEntityData({required this.assetId, required this.albumId}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['asset_id'] = Variable(assetId); map['album_id'] = Variable(albumId); return map; } factory RemoteAlbumAssetEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return RemoteAlbumAssetEntityData( assetId: serializer.fromJson(json['assetId']), albumId: serializer.fromJson(json['albumId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'assetId': serializer.toJson(assetId), 'albumId': serializer.toJson(albumId), }; } RemoteAlbumAssetEntityData copyWith({String? assetId, String? albumId}) => RemoteAlbumAssetEntityData( assetId: assetId ?? this.assetId, albumId: albumId ?? this.albumId, ); RemoteAlbumAssetEntityData copyWithCompanion(RemoteAlbumAssetEntityCompanion data) { return RemoteAlbumAssetEntityData( assetId: data.assetId.present ? data.assetId.value : this.assetId, albumId: data.albumId.present ? data.albumId.value : this.albumId, ); } @override String toString() { return (StringBuffer('RemoteAlbumAssetEntityData(') ..write('assetId: $assetId, ') ..write('albumId: $albumId') ..write(')')) .toString(); } @override int get hashCode => Object.hash(assetId, albumId); @override bool operator ==(Object other) => identical(this, other) || (other is RemoteAlbumAssetEntityData && other.assetId == this.assetId && other.albumId == this.albumId); } class RemoteAlbumAssetEntityCompanion extends UpdateCompanion { final Value assetId; final Value albumId; const RemoteAlbumAssetEntityCompanion({ this.assetId = const Value.absent(), this.albumId = const Value.absent(), }); RemoteAlbumAssetEntityCompanion.insert({ required String assetId, required String albumId, }) : assetId = Value(assetId), albumId = Value(albumId); static Insertable custom({ Expression? assetId, Expression? albumId, }) { return RawValuesInsertable({ if (assetId != null) 'asset_id': assetId, if (albumId != null) 'album_id': albumId, }); } RemoteAlbumAssetEntityCompanion copyWith({Value? assetId, Value? albumId}) { return RemoteAlbumAssetEntityCompanion( assetId: assetId ?? this.assetId, albumId: albumId ?? this.albumId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (assetId.present) { map['asset_id'] = Variable(assetId.value); } if (albumId.present) { map['album_id'] = Variable(albumId.value); } return map; } @override String toString() { return (StringBuffer('RemoteAlbumAssetEntityCompanion(') ..write('assetId: $assetId, ') ..write('albumId: $albumId') ..write(')')) .toString(); } } class RemoteAlbumUserEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn albumId = GeneratedColumn('album_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES remote_album_entity (id) ON DELETE CASCADE')); late final GeneratedColumn userId = GeneratedColumn('user_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn role = GeneratedColumn('role', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); @override List get $columns => [albumId, userId, role]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'remote_album_user_entity'; @override Set get $primaryKey => {albumId, userId}; @override RemoteAlbumUserEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return RemoteAlbumUserEntityData( albumId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}album_id'])!, userId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}user_id'])!, role: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}role'])!, ); } @override RemoteAlbumUserEntity createAlias(String alias) { return RemoteAlbumUserEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class RemoteAlbumUserEntityData extends DataClass implements Insertable { final String albumId; final String userId; final int role; const RemoteAlbumUserEntityData({required this.albumId, required this.userId, required this.role}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['album_id'] = Variable(albumId); map['user_id'] = Variable(userId); map['role'] = Variable(role); return map; } factory RemoteAlbumUserEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return RemoteAlbumUserEntityData( albumId: serializer.fromJson(json['albumId']), userId: serializer.fromJson(json['userId']), role: serializer.fromJson(json['role']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'albumId': serializer.toJson(albumId), 'userId': serializer.toJson(userId), 'role': serializer.toJson(role), }; } RemoteAlbumUserEntityData copyWith({String? albumId, String? userId, int? role}) => RemoteAlbumUserEntityData( albumId: albumId ?? this.albumId, userId: userId ?? this.userId, role: role ?? this.role, ); RemoteAlbumUserEntityData copyWithCompanion(RemoteAlbumUserEntityCompanion data) { return RemoteAlbumUserEntityData( albumId: data.albumId.present ? data.albumId.value : this.albumId, userId: data.userId.present ? data.userId.value : this.userId, role: data.role.present ? data.role.value : this.role, ); } @override String toString() { return (StringBuffer('RemoteAlbumUserEntityData(') ..write('albumId: $albumId, ') ..write('userId: $userId, ') ..write('role: $role') ..write(')')) .toString(); } @override int get hashCode => Object.hash(albumId, userId, role); @override bool operator ==(Object other) => identical(this, other) || (other is RemoteAlbumUserEntityData && other.albumId == this.albumId && other.userId == this.userId && other.role == this.role); } class RemoteAlbumUserEntityCompanion extends UpdateCompanion { final Value albumId; final Value userId; final Value role; const RemoteAlbumUserEntityCompanion({ this.albumId = const Value.absent(), this.userId = const Value.absent(), this.role = const Value.absent(), }); RemoteAlbumUserEntityCompanion.insert({ required String albumId, required String userId, required int role, }) : albumId = Value(albumId), userId = Value(userId), role = Value(role); static Insertable custom({ Expression? albumId, Expression? userId, Expression? role, }) { return RawValuesInsertable({ if (albumId != null) 'album_id': albumId, if (userId != null) 'user_id': userId, if (role != null) 'role': role, }); } RemoteAlbumUserEntityCompanion copyWith({Value? albumId, Value? userId, Value? role}) { return RemoteAlbumUserEntityCompanion( albumId: albumId ?? this.albumId, userId: userId ?? this.userId, role: role ?? this.role, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (albumId.present) { map['album_id'] = Variable(albumId.value); } if (userId.present) { map['user_id'] = Variable(userId.value); } if (role.present) { map['role'] = Variable(role.value); } return map; } @override String toString() { return (StringBuffer('RemoteAlbumUserEntityCompanion(') ..write('albumId: $albumId, ') ..write('userId: $userId, ') ..write('role: $role') ..write(')')) .toString(); } } class MemoryEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; MemoryEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn('created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn deletedAt = GeneratedColumn('deleted_at', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn ownerId = GeneratedColumn('owner_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn type = GeneratedColumn('type', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true); late final GeneratedColumn data = GeneratedColumn('data', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn isSaved = GeneratedColumn('is_saved', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_saved" IN (0, 1))'), defaultValue: const CustomExpression('0')); late final GeneratedColumn memoryAt = GeneratedColumn('memory_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: true); late final GeneratedColumn seenAt = GeneratedColumn('seen_at', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn showAt = GeneratedColumn('show_at', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); late final GeneratedColumn hideAt = GeneratedColumn('hide_at', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); @override List get $columns => [id, createdAt, updatedAt, deletedAt, ownerId, type, data, isSaved, memoryAt, seenAt, showAt, hideAt]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'memory_entity'; @override Set get $primaryKey => {id}; @override MemoryEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return MemoryEntityData( id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, deletedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}deleted_at']), ownerId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!, type: attachedDatabase.typeMapping.read(DriftSqlType.int, data['${effectivePrefix}type'])!, data: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}data'])!, isSaved: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_saved'])!, memoryAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}memory_at'])!, seenAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}seen_at']), showAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}show_at']), hideAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}hide_at']), ); } @override MemoryEntity createAlias(String alias) { return MemoryEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class MemoryEntityData extends DataClass implements Insertable { final String id; final DateTime createdAt; final DateTime updatedAt; final DateTime? deletedAt; final String ownerId; final int type; final String data; final bool isSaved; final DateTime memoryAt; final DateTime? seenAt; final DateTime? showAt; final DateTime? hideAt; const MemoryEntityData( {required this.id, required this.createdAt, required this.updatedAt, this.deletedAt, required this.ownerId, required this.type, required this.data, required this.isSaved, required this.memoryAt, this.seenAt, this.showAt, this.hideAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); if (!nullToAbsent || deletedAt != null) { map['deleted_at'] = Variable(deletedAt); } map['owner_id'] = Variable(ownerId); map['type'] = Variable(type); map['data'] = Variable(data); map['is_saved'] = Variable(isSaved); map['memory_at'] = Variable(memoryAt); if (!nullToAbsent || seenAt != null) { map['seen_at'] = Variable(seenAt); } if (!nullToAbsent || showAt != null) { map['show_at'] = Variable(showAt); } if (!nullToAbsent || hideAt != null) { map['hide_at'] = Variable(hideAt); } return map; } factory MemoryEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return MemoryEntityData( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), deletedAt: serializer.fromJson(json['deletedAt']), ownerId: serializer.fromJson(json['ownerId']), type: serializer.fromJson(json['type']), data: serializer.fromJson(json['data']), isSaved: serializer.fromJson(json['isSaved']), memoryAt: serializer.fromJson(json['memoryAt']), seenAt: serializer.fromJson(json['seenAt']), showAt: serializer.fromJson(json['showAt']), hideAt: serializer.fromJson(json['hideAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'deletedAt': serializer.toJson(deletedAt), 'ownerId': serializer.toJson(ownerId), 'type': serializer.toJson(type), 'data': serializer.toJson(data), 'isSaved': serializer.toJson(isSaved), 'memoryAt': serializer.toJson(memoryAt), 'seenAt': serializer.toJson(seenAt), 'showAt': serializer.toJson(showAt), 'hideAt': serializer.toJson(hideAt), }; } MemoryEntityData copyWith( {String? id, DateTime? createdAt, DateTime? updatedAt, Value deletedAt = const Value.absent(), String? ownerId, int? type, String? data, bool? isSaved, DateTime? memoryAt, Value seenAt = const Value.absent(), Value showAt = const Value.absent(), Value hideAt = const Value.absent()}) => MemoryEntityData( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt, ownerId: ownerId ?? this.ownerId, type: type ?? this.type, data: data ?? this.data, isSaved: isSaved ?? this.isSaved, memoryAt: memoryAt ?? this.memoryAt, seenAt: seenAt.present ? seenAt.value : this.seenAt, showAt: showAt.present ? showAt.value : this.showAt, hideAt: hideAt.present ? hideAt.value : this.hideAt, ); MemoryEntityData copyWithCompanion(MemoryEntityCompanion data) { return MemoryEntityData( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt, ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, type: data.type.present ? data.type.value : this.type, data: data.data.present ? data.data.value : this.data, isSaved: data.isSaved.present ? data.isSaved.value : this.isSaved, memoryAt: data.memoryAt.present ? data.memoryAt.value : this.memoryAt, seenAt: data.seenAt.present ? data.seenAt.value : this.seenAt, showAt: data.showAt.present ? data.showAt.value : this.showAt, hideAt: data.hideAt.present ? data.hideAt.value : this.hideAt, ); } @override String toString() { return (StringBuffer('MemoryEntityData(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('deletedAt: $deletedAt, ') ..write('ownerId: $ownerId, ') ..write('type: $type, ') ..write('data: $data, ') ..write('isSaved: $isSaved, ') ..write('memoryAt: $memoryAt, ') ..write('seenAt: $seenAt, ') ..write('showAt: $showAt, ') ..write('hideAt: $hideAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, createdAt, updatedAt, deletedAt, ownerId, type, data, isSaved, memoryAt, seenAt, showAt, hideAt); @override bool operator ==(Object other) => identical(this, other) || (other is MemoryEntityData && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.deletedAt == this.deletedAt && other.ownerId == this.ownerId && other.type == this.type && other.data == this.data && other.isSaved == this.isSaved && other.memoryAt == this.memoryAt && other.seenAt == this.seenAt && other.showAt == this.showAt && other.hideAt == this.hideAt); } class MemoryEntityCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value deletedAt; final Value ownerId; final Value type; final Value data; final Value isSaved; final Value memoryAt; final Value seenAt; final Value showAt; final Value hideAt; const MemoryEntityCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.deletedAt = const Value.absent(), this.ownerId = const Value.absent(), this.type = const Value.absent(), this.data = const Value.absent(), this.isSaved = const Value.absent(), this.memoryAt = const Value.absent(), this.seenAt = const Value.absent(), this.showAt = const Value.absent(), this.hideAt = const Value.absent(), }); MemoryEntityCompanion.insert({ required String id, this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.deletedAt = const Value.absent(), required String ownerId, required int type, required String data, this.isSaved = const Value.absent(), required DateTime memoryAt, this.seenAt = const Value.absent(), this.showAt = const Value.absent(), this.hideAt = const Value.absent(), }) : id = Value(id), ownerId = Value(ownerId), type = Value(type), data = Value(data), memoryAt = Value(memoryAt); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? deletedAt, Expression? ownerId, Expression? type, Expression? data, Expression? isSaved, Expression? memoryAt, Expression? seenAt, Expression? showAt, Expression? hideAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (deletedAt != null) 'deleted_at': deletedAt, if (ownerId != null) 'owner_id': ownerId, if (type != null) 'type': type, if (data != null) 'data': data, if (isSaved != null) 'is_saved': isSaved, if (memoryAt != null) 'memory_at': memoryAt, if (seenAt != null) 'seen_at': seenAt, if (showAt != null) 'show_at': showAt, if (hideAt != null) 'hide_at': hideAt, }); } MemoryEntityCompanion copyWith( {Value? id, Value? createdAt, Value? updatedAt, Value? deletedAt, Value? ownerId, Value? type, Value? data, Value? isSaved, Value? memoryAt, Value? seenAt, Value? showAt, Value? hideAt}) { return MemoryEntityCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, deletedAt: deletedAt ?? this.deletedAt, ownerId: ownerId ?? this.ownerId, type: type ?? this.type, data: data ?? this.data, isSaved: isSaved ?? this.isSaved, memoryAt: memoryAt ?? this.memoryAt, seenAt: seenAt ?? this.seenAt, showAt: showAt ?? this.showAt, hideAt: hideAt ?? this.hideAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (deletedAt.present) { map['deleted_at'] = Variable(deletedAt.value); } if (ownerId.present) { map['owner_id'] = Variable(ownerId.value); } if (type.present) { map['type'] = Variable(type.value); } if (data.present) { map['data'] = Variable(data.value); } if (isSaved.present) { map['is_saved'] = Variable(isSaved.value); } if (memoryAt.present) { map['memory_at'] = Variable(memoryAt.value); } if (seenAt.present) { map['seen_at'] = Variable(seenAt.value); } if (showAt.present) { map['show_at'] = Variable(showAt.value); } if (hideAt.present) { map['hide_at'] = Variable(hideAt.value); } return map; } @override String toString() { return (StringBuffer('MemoryEntityCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('deletedAt: $deletedAt, ') ..write('ownerId: $ownerId, ') ..write('type: $type, ') ..write('data: $data, ') ..write('isSaved: $isSaved, ') ..write('memoryAt: $memoryAt, ') ..write('seenAt: $seenAt, ') ..write('showAt: $showAt, ') ..write('hideAt: $hideAt') ..write(')')) .toString(); } } class MemoryAssetEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; MemoryAssetEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn assetId = GeneratedColumn('asset_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES remote_asset_entity (id) ON DELETE CASCADE')); late final GeneratedColumn memoryId = GeneratedColumn('memory_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES memory_entity (id) ON DELETE CASCADE')); @override List get $columns => [assetId, memoryId]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'memory_asset_entity'; @override Set get $primaryKey => {assetId, memoryId}; @override MemoryAssetEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return MemoryAssetEntityData( assetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}asset_id'])!, memoryId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}memory_id'])!, ); } @override MemoryAssetEntity createAlias(String alias) { return MemoryAssetEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class MemoryAssetEntityData extends DataClass implements Insertable { final String assetId; final String memoryId; const MemoryAssetEntityData({required this.assetId, required this.memoryId}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['asset_id'] = Variable(assetId); map['memory_id'] = Variable(memoryId); return map; } factory MemoryAssetEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return MemoryAssetEntityData( assetId: serializer.fromJson(json['assetId']), memoryId: serializer.fromJson(json['memoryId']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'assetId': serializer.toJson(assetId), 'memoryId': serializer.toJson(memoryId), }; } MemoryAssetEntityData copyWith({String? assetId, String? memoryId}) => MemoryAssetEntityData( assetId: assetId ?? this.assetId, memoryId: memoryId ?? this.memoryId, ); MemoryAssetEntityData copyWithCompanion(MemoryAssetEntityCompanion data) { return MemoryAssetEntityData( assetId: data.assetId.present ? data.assetId.value : this.assetId, memoryId: data.memoryId.present ? data.memoryId.value : this.memoryId, ); } @override String toString() { return (StringBuffer('MemoryAssetEntityData(') ..write('assetId: $assetId, ') ..write('memoryId: $memoryId') ..write(')')) .toString(); } @override int get hashCode => Object.hash(assetId, memoryId); @override bool operator ==(Object other) => identical(this, other) || (other is MemoryAssetEntityData && other.assetId == this.assetId && other.memoryId == this.memoryId); } class MemoryAssetEntityCompanion extends UpdateCompanion { final Value assetId; final Value memoryId; const MemoryAssetEntityCompanion({ this.assetId = const Value.absent(), this.memoryId = const Value.absent(), }); MemoryAssetEntityCompanion.insert({ required String assetId, required String memoryId, }) : assetId = Value(assetId), memoryId = Value(memoryId); static Insertable custom({ Expression? assetId, Expression? memoryId, }) { return RawValuesInsertable({ if (assetId != null) 'asset_id': assetId, if (memoryId != null) 'memory_id': memoryId, }); } MemoryAssetEntityCompanion copyWith({Value? assetId, Value? memoryId}) { return MemoryAssetEntityCompanion( assetId: assetId ?? this.assetId, memoryId: memoryId ?? this.memoryId, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (assetId.present) { map['asset_id'] = Variable(assetId.value); } if (memoryId.present) { map['memory_id'] = Variable(memoryId.value); } return map; } @override String toString() { return (StringBuffer('MemoryAssetEntityCompanion(') ..write('assetId: $assetId, ') ..write('memoryId: $memoryId') ..write(')')) .toString(); } } class PersonEntity extends Table with TableInfo { @override final GeneratedDatabase attachedDatabase; final String? _alias; PersonEntity(this.attachedDatabase, [this._alias]); late final GeneratedColumn id = GeneratedColumn('id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn createdAt = GeneratedColumn('created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn updatedAt = GeneratedColumn('updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: const CustomExpression('CURRENT_TIMESTAMP')); late final GeneratedColumn ownerId = GeneratedColumn('owner_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('REFERENCES user_entity (id) ON DELETE CASCADE')); late final GeneratedColumn name = GeneratedColumn('name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn faceAssetId = GeneratedColumn('face_asset_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn thumbnailPath = GeneratedColumn('thumbnail_path', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); late final GeneratedColumn isFavorite = GeneratedColumn('is_favorite', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_favorite" IN (0, 1))')); late final GeneratedColumn isHidden = GeneratedColumn('is_hidden', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: true, defaultConstraints: GeneratedColumn.constraintIsAlways('CHECK ("is_hidden" IN (0, 1))')); late final GeneratedColumn color = GeneratedColumn('color', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false); late final GeneratedColumn birthDate = GeneratedColumn('birth_date', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false); @override List get $columns => [id, createdAt, updatedAt, ownerId, name, faceAssetId, thumbnailPath, isFavorite, isHidden, color, birthDate]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'person_entity'; @override Set get $primaryKey => {id}; @override PersonEntityData map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return PersonEntityData( id: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}id'])!, createdAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}created_at'])!, updatedAt: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}updated_at'])!, ownerId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}owner_id'])!, name: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}name'])!, faceAssetId: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}face_asset_id']), thumbnailPath: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}thumbnail_path'])!, isFavorite: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_favorite'])!, isHidden: attachedDatabase.typeMapping.read(DriftSqlType.bool, data['${effectivePrefix}is_hidden'])!, color: attachedDatabase.typeMapping.read(DriftSqlType.string, data['${effectivePrefix}color']), birthDate: attachedDatabase.typeMapping.read(DriftSqlType.dateTime, data['${effectivePrefix}birth_date']), ); } @override PersonEntity createAlias(String alias) { return PersonEntity(attachedDatabase, alias); } @override bool get withoutRowId => true; @override bool get isStrict => true; } class PersonEntityData extends DataClass implements Insertable { final String id; final DateTime createdAt; final DateTime updatedAt; final String ownerId; final String name; final String? faceAssetId; final String thumbnailPath; final bool isFavorite; final bool isHidden; final String? color; final DateTime? birthDate; const PersonEntityData( {required this.id, required this.createdAt, required this.updatedAt, required this.ownerId, required this.name, this.faceAssetId, required this.thumbnailPath, required this.isFavorite, required this.isHidden, this.color, this.birthDate}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['owner_id'] = Variable(ownerId); map['name'] = Variable(name); if (!nullToAbsent || faceAssetId != null) { map['face_asset_id'] = Variable(faceAssetId); } map['thumbnail_path'] = Variable(thumbnailPath); map['is_favorite'] = Variable(isFavorite); map['is_hidden'] = Variable(isHidden); if (!nullToAbsent || color != null) { map['color'] = Variable(color); } if (!nullToAbsent || birthDate != null) { map['birth_date'] = Variable(birthDate); } return map; } factory PersonEntityData.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return PersonEntityData( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), ownerId: serializer.fromJson(json['ownerId']), name: serializer.fromJson(json['name']), faceAssetId: serializer.fromJson(json['faceAssetId']), thumbnailPath: serializer.fromJson(json['thumbnailPath']), isFavorite: serializer.fromJson(json['isFavorite']), isHidden: serializer.fromJson(json['isHidden']), color: serializer.fromJson(json['color']), birthDate: serializer.fromJson(json['birthDate']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'ownerId': serializer.toJson(ownerId), 'name': serializer.toJson(name), 'faceAssetId': serializer.toJson(faceAssetId), 'thumbnailPath': serializer.toJson(thumbnailPath), 'isFavorite': serializer.toJson(isFavorite), 'isHidden': serializer.toJson(isHidden), 'color': serializer.toJson(color), 'birthDate': serializer.toJson(birthDate), }; } PersonEntityData copyWith( {String? id, DateTime? createdAt, DateTime? updatedAt, String? ownerId, String? name, Value faceAssetId = const Value.absent(), String? thumbnailPath, bool? isFavorite, bool? isHidden, Value color = const Value.absent(), Value birthDate = const Value.absent()}) => PersonEntityData( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ownerId: ownerId ?? this.ownerId, name: name ?? this.name, faceAssetId: faceAssetId.present ? faceAssetId.value : this.faceAssetId, thumbnailPath: thumbnailPath ?? this.thumbnailPath, isFavorite: isFavorite ?? this.isFavorite, isHidden: isHidden ?? this.isHidden, color: color.present ? color.value : this.color, birthDate: birthDate.present ? birthDate.value : this.birthDate, ); PersonEntityData copyWithCompanion(PersonEntityCompanion data) { return PersonEntityData( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, ownerId: data.ownerId.present ? data.ownerId.value : this.ownerId, name: data.name.present ? data.name.value : this.name, faceAssetId: data.faceAssetId.present ? data.faceAssetId.value : this.faceAssetId, thumbnailPath: data.thumbnailPath.present ? data.thumbnailPath.value : this.thumbnailPath, isFavorite: data.isFavorite.present ? data.isFavorite.value : this.isFavorite, isHidden: data.isHidden.present ? data.isHidden.value : this.isHidden, color: data.color.present ? data.color.value : this.color, birthDate: data.birthDate.present ? data.birthDate.value : this.birthDate, ); } @override String toString() { return (StringBuffer('PersonEntityData(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('ownerId: $ownerId, ') ..write('name: $name, ') ..write('faceAssetId: $faceAssetId, ') ..write('thumbnailPath: $thumbnailPath, ') ..write('isFavorite: $isFavorite, ') ..write('isHidden: $isHidden, ') ..write('color: $color, ') ..write('birthDate: $birthDate') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, ownerId, name, faceAssetId, thumbnailPath, isFavorite, isHidden, color, birthDate); @override bool operator ==(Object other) => identical(this, other) || (other is PersonEntityData && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.ownerId == this.ownerId && other.name == this.name && other.faceAssetId == this.faceAssetId && other.thumbnailPath == this.thumbnailPath && other.isFavorite == this.isFavorite && other.isHidden == this.isHidden && other.color == this.color && other.birthDate == this.birthDate); } class PersonEntityCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value ownerId; final Value name; final Value faceAssetId; final Value thumbnailPath; final Value isFavorite; final Value isHidden; final Value color; final Value birthDate; const PersonEntityCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.ownerId = const Value.absent(), this.name = const Value.absent(), this.faceAssetId = const Value.absent(), this.thumbnailPath = const Value.absent(), this.isFavorite = const Value.absent(), this.isHidden = const Value.absent(), this.color = const Value.absent(), this.birthDate = const Value.absent(), }); PersonEntityCompanion.insert({ required String id, this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), required String ownerId, required String name, this.faceAssetId = const Value.absent(), required String thumbnailPath, required bool isFavorite, required bool isHidden, this.color = const Value.absent(), this.birthDate = const Value.absent(), }) : id = Value(id), ownerId = Value(ownerId), name = Value(name), thumbnailPath = Value(thumbnailPath), isFavorite = Value(isFavorite), isHidden = Value(isHidden); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? ownerId, Expression? name, Expression? faceAssetId, Expression? thumbnailPath, Expression? isFavorite, Expression? isHidden, Expression? color, Expression? birthDate, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (ownerId != null) 'owner_id': ownerId, if (name != null) 'name': name, if (faceAssetId != null) 'face_asset_id': faceAssetId, if (thumbnailPath != null) 'thumbnail_path': thumbnailPath, if (isFavorite != null) 'is_favorite': isFavorite, if (isHidden != null) 'is_hidden': isHidden, if (color != null) 'color': color, if (birthDate != null) 'birth_date': birthDate, }); } PersonEntityCompanion copyWith( {Value? id, Value? createdAt, Value? updatedAt, Value? ownerId, Value? name, Value? faceAssetId, Value? thumbnailPath, Value? isFavorite, Value? isHidden, Value? color, Value? birthDate}) { return PersonEntityCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, ownerId: ownerId ?? this.ownerId, name: name ?? this.name, faceAssetId: faceAssetId ?? this.faceAssetId, thumbnailPath: thumbnailPath ?? this.thumbnailPath, isFavorite: isFavorite ?? this.isFavorite, isHidden: isHidden ?? this.isHidden, color: color ?? this.color, birthDate: birthDate ?? this.birthDate, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (ownerId.present) { map['owner_id'] = Variable(ownerId.value); } if (name.present) { map['name'] = Variable(name.value); } if (faceAssetId.present) { map['face_asset_id'] = Variable(faceAssetId.value); } if (thumbnailPath.present) { map['thumbnail_path'] = Variable(thumbnailPath.value); } if (isFavorite.present) { map['is_favorite'] = Variable(isFavorite.value); } if (isHidden.present) { map['is_hidden'] = Variable(isHidden.value); } if (color.present) { map['color'] = Variable(color.value); } if (birthDate.present) { map['birth_date'] = Variable(birthDate.value); } return map; } @override String toString() { return (StringBuffer('PersonEntityCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('ownerId: $ownerId, ') ..write('name: $name, ') ..write('faceAssetId: $faceAssetId, ') ..write('thumbnailPath: $thumbnailPath, ') ..write('isFavorite: $isFavorite, ') ..write('isHidden: $isHidden, ') ..write('color: $color, ') ..write('birthDate: $birthDate') ..write(')')) .toString(); } } class DatabaseAtV3 extends GeneratedDatabase { DatabaseAtV3(QueryExecutor e) : super(e); late final UserEntity userEntity = UserEntity(this); late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this); late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this); late final StackEntity stackEntity = StackEntity(this); late final Index idxLocalAssetChecksum = Index('idx_local_asset_checksum', 'CREATE INDEX idx_local_asset_checksum ON local_asset_entity (checksum)'); late final Index uQRemoteAssetOwnerChecksum = Index('UQ_remote_asset_owner_checksum', 'CREATE UNIQUE INDEX UQ_remote_asset_owner_checksum ON remote_asset_entity (checksum, owner_id)'); late final Index idxRemoteAssetChecksum = Index('idx_remote_asset_checksum', 'CREATE INDEX idx_remote_asset_checksum ON remote_asset_entity (checksum)'); late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this); late final PartnerEntity partnerEntity = PartnerEntity(this); late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this); late final LocalAlbumAssetEntity localAlbumAssetEntity = LocalAlbumAssetEntity(this); late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this); late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this); late final RemoteAlbumAssetEntity remoteAlbumAssetEntity = RemoteAlbumAssetEntity(this); late final RemoteAlbumUserEntity remoteAlbumUserEntity = RemoteAlbumUserEntity(this); late final MemoryEntity memoryEntity = MemoryEntity(this); late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this); late final PersonEntity personEntity = PersonEntity(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ userEntity, remoteAssetEntity, localAssetEntity, stackEntity, idxLocalAssetChecksum, uQRemoteAssetOwnerChecksum, idxRemoteAssetChecksum, userMetadataEntity, partnerEntity, localAlbumEntity, localAlbumAssetEntity, remoteExifEntity, remoteAlbumEntity, remoteAlbumAssetEntity, remoteAlbumUserEntity, memoryEntity, memoryAssetEntity, personEntity ]; @override int get schemaVersion => 3; @override DriftDatabaseOptions get options => const DriftDatabaseOptions(storeDateTimeAsText: true); }