Skip to content

High performance self-hosted photo and video management solution.

refactor(mobile): Migrate durationInSeconds to durationMs (#26615)

Luis Nachtigall539a39ae4924
diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt
index 949aa03734..b49664dea5 100644
--- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt
+++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt
@@ -216,7 +216,7 @@ data class PlatformAsset (
val updatedAt: Long? = null,
val width: Long? = null,
val height: Long? = null,
- val durationInSeconds: Long,
+ val durationMs: Long,
val orientation: Long,
val isFavorite: Boolean,
val adjustmentTime: Long? = null,
@@ -234,14 +234,14 @@ data class PlatformAsset (
val updatedAt = pigeonVar_list[4] as Long?
val width = pigeonVar_list[5] as Long?
val height = pigeonVar_list[6] as Long?
- val durationInSeconds = pigeonVar_list[7] as Long
+ val durationMs = pigeonVar_list[7] as Long
val orientation = pigeonVar_list[8] as Long
val isFavorite = pigeonVar_list[9] as Boolean
val adjustmentTime = pigeonVar_list[10] as Long?
val latitude = pigeonVar_list[11] as Double?
val longitude = pigeonVar_list[12] as Double?
val playbackStyle = pigeonVar_list[13] as PlatformAssetPlaybackStyle
- return PlatformAsset(id, name, type, createdAt, updatedAt, width, height, durationInSeconds, orientation, isFavorite, adjustmentTime, latitude, longitude, playbackStyle)
+ return PlatformAsset(id, name, type, createdAt, updatedAt, width, height, durationMs, orientation, isFavorite, adjustmentTime, latitude, longitude, playbackStyle)
}
}
fun toList(): List<Any?> {
@@ -253,7 +253,7 @@ data class PlatformAsset (
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
orientation,
isFavorite,
adjustmentTime,
@@ -270,7 +270,7 @@ data class PlatformAsset (
return true
}
val other = other as PlatformAsset
- return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationInSeconds, other.durationInSeconds) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle)
+ return MessagesPigeonUtils.deepEquals(this.id, other.id) && MessagesPigeonUtils.deepEquals(this.name, other.name) && MessagesPigeonUtils.deepEquals(this.type, other.type) && MessagesPigeonUtils.deepEquals(this.createdAt, other.createdAt) && MessagesPigeonUtils.deepEquals(this.updatedAt, other.updatedAt) && MessagesPigeonUtils.deepEquals(this.width, other.width) && MessagesPigeonUtils.deepEquals(this.height, other.height) && MessagesPigeonUtils.deepEquals(this.durationMs, other.durationMs) && MessagesPigeonUtils.deepEquals(this.orientation, other.orientation) && MessagesPigeonUtils.deepEquals(this.isFavorite, other.isFavorite) && MessagesPigeonUtils.deepEquals(this.adjustmentTime, other.adjustmentTime) && MessagesPigeonUtils.deepEquals(this.latitude, other.latitude) && MessagesPigeonUtils.deepEquals(this.longitude, other.longitude) && MessagesPigeonUtils.deepEquals(this.playbackStyle, other.playbackStyle)
}
override fun hashCode(): Int {
@@ -282,7 +282,7 @@ data class PlatformAsset (
result = 31 * result + MessagesPigeonUtils.deepHash(this.updatedAt)
result = 31 * result + MessagesPigeonUtils.deepHash(this.width)
result = 31 * result + MessagesPigeonUtils.deepHash(this.height)
- result = 31 * result + MessagesPigeonUtils.deepHash(this.durationInSeconds)
+ result = 31 * result + MessagesPigeonUtils.deepHash(this.durationMs)
result = 31 * result + MessagesPigeonUtils.deepHash(this.orientation)
result = 31 * result + MessagesPigeonUtils.deepHash(this.isFavorite)
result = 31 * result + MessagesPigeonUtils.deepHash(this.adjustmentTime)
diff --git a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt
index eea66db2f6..777a565fe3 100644
--- a/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt
+++ b/mobile/android/app/src/main/kotlin/app/alextran/immich/sync/MessagesImplBase.kt
@@ -178,7 +178,7 @@ open class NativeSyncApiImplBase(context: Context) : ImmichPlugin() {
val height = c.getInt(heightColumn).toLong()
// Duration is milliseconds
val duration = if (rawMediaType == MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE) 0L
- else c.getLong(durationColumn) / 1000
+ else c.getLong(durationColumn)
val orientation = c.getInt(orientationColumn)
val isFavorite = if (favoriteColumn == -1) false else c.getInt(favoriteColumn) != 0
diff --git a/mobile/drift_schemas/main/drift_schema_v23.json b/mobile/drift_schemas/main/drift_schema_v23.json
new file mode 100644
index 0000000000..490484f7e8
--- /dev/null
+++ b/mobile/drift_schemas/main/drift_schema_v23.json
@@ -0,0 +1,3351 @@
+{
+ "_meta": {
+ "description": "This file contains a serialized version of schema entities for drift.",
+ "version": "1.3.0"
+ },
+ "options": {
+ "store_date_time_values_as_text": true
+ },
+ "entities": [
+ {
+ "id": 0,
+ "references": [],
+ "type": "table",
+ "data": {
+ "name": "user_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "email",
+ "getter_name": "email",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "has_profile_image",
+ "getter_name": "hasProfileImage",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"has_profile_image\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"has_profile_image\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "profile_changed_at",
+ "getter_name": "profileChangedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "avatar_color",
+ "getter_name": "avatarColor",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AvatarColor>(AvatarColor.values)",
+ "dart_type_name": "AvatarColor"
+ }
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 1,
+ "references": [
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "remote_asset_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "type",
+ "getter_name": "type",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetType>(AssetType.values)",
+ "dart_type_name": "AssetType"
+ }
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "width",
+ "getter_name": "width",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "height",
+ "getter_name": "height",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "duration_ms",
+ "getter_name": "durationMs",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "checksum",
+ "getter_name": "checksum",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_favorite",
+ "getter_name": "isFavorite",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_favorite\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_favorite\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "owner_id",
+ "getter_name": "ownerId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "local_date_time",
+ "getter_name": "localDateTime",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "thumb_hash",
+ "getter_name": "thumbHash",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "deleted_at",
+ "getter_name": "deletedAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "live_photo_video_id",
+ "getter_name": "livePhotoVideoId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "visibility",
+ "getter_name": "visibility",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetVisibility>(AssetVisibility.values)",
+ "dart_type_name": "AssetVisibility"
+ }
+ },
+ {
+ "name": "stack_id",
+ "getter_name": "stackId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "library_id",
+ "getter_name": "libraryId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_edited",
+ "getter_name": "isEdited",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_edited\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_edited\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 2,
+ "references": [
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "stack_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "owner_id",
+ "getter_name": "ownerId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "primary_asset_id",
+ "getter_name": "primaryAssetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 3,
+ "references": [],
+ "type": "table",
+ "data": {
+ "name": "local_asset_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "type",
+ "getter_name": "type",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetType>(AssetType.values)",
+ "dart_type_name": "AssetType"
+ }
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "width",
+ "getter_name": "width",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "height",
+ "getter_name": "height",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "duration_ms",
+ "getter_name": "durationMs",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "checksum",
+ "getter_name": "checksum",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_favorite",
+ "getter_name": "isFavorite",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_favorite\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_favorite\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "orientation",
+ "getter_name": "orientation",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "i_cloud_id",
+ "getter_name": "iCloudId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "adjustment_time",
+ "getter_name": "adjustmentTime",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "latitude",
+ "getter_name": "latitude",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "longitude",
+ "getter_name": "longitude",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "playback_style",
+ "getter_name": "playbackStyle",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetPlaybackStyle>(AssetPlaybackStyle.values)",
+ "dart_type_name": "AssetPlaybackStyle"
+ }
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 4,
+ "references": [
+ 0,
+ 1
+ ],
+ "type": "table",
+ "data": {
+ "name": "remote_album_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "description",
+ "getter_name": "description",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('\\'\\'')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "owner_id",
+ "getter_name": "ownerId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "thumbnail_asset_id",
+ "getter_name": "thumbnailAssetId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE SET NULL",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE SET NULL"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "setNull"
+ }
+ }
+ ]
+ },
+ {
+ "name": "is_activity_enabled",
+ "getter_name": "isActivityEnabled",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_activity_enabled\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_activity_enabled\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('1')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "order",
+ "getter_name": "order",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AlbumAssetOrder>(AlbumAssetOrder.values)",
+ "dart_type_name": "AlbumAssetOrder"
+ }
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 5,
+ "references": [
+ 4
+ ],
+ "type": "table",
+ "data": {
+ "name": "local_album_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "backup_selection",
+ "getter_name": "backupSelection",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<BackupSelection>(BackupSelection.values)",
+ "dart_type_name": "BackupSelection"
+ }
+ },
+ {
+ "name": "is_ios_shared_album",
+ "getter_name": "isIosSharedAlbum",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_ios_shared_album\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_ios_shared_album\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "linked_remote_album_id",
+ "getter_name": "linkedRemoteAlbumId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_album_entity (id) ON DELETE SET NULL",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_album_entity (id) ON DELETE SET NULL"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_album_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "setNull"
+ }
+ }
+ ]
+ },
+ {
+ "name": "marker",
+ "getter_name": "marker_",
+ "moor_type": "bool",
+ "nullable": true,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"marker\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"marker\" IN (0, 1))"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 6,
+ "references": [
+ 3,
+ 5
+ ],
+ "type": "table",
+ "data": {
+ "name": "local_album_asset_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES local_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES local_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "local_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "album_id",
+ "getter_name": "albumId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES local_album_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES local_album_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "local_album_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "marker",
+ "getter_name": "marker_",
+ "moor_type": "bool",
+ "nullable": true,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"marker\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"marker\" IN (0, 1))"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "asset_id",
+ "album_id"
+ ]
+ }
+ },
+ {
+ "id": 7,
+ "references": [
+ 6
+ ],
+ "type": "index",
+ "data": {
+ "on": 6,
+ "name": "idx_local_album_asset_album_asset",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 8,
+ "references": [
+ 4
+ ],
+ "type": "index",
+ "data": {
+ "on": 4,
+ "name": "idx_remote_album_owner_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 9,
+ "references": [
+ 3
+ ],
+ "type": "index",
+ "data": {
+ "on": 3,
+ "name": "idx_local_asset_checksum",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 10,
+ "references": [
+ 3
+ ],
+ "type": "index",
+ "data": {
+ "on": 3,
+ "name": "idx_local_asset_cloud_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 11,
+ "references": [
+ 2
+ ],
+ "type": "index",
+ "data": {
+ "on": 2,
+ "name": "idx_stack_primary_asset_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 12,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "idx_remote_asset_owner_checksum",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 13,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "UQ_remote_assets_owner_checksum",
+ "sql": "CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum\nON remote_asset_entity (owner_id, checksum)\nWHERE (library_id IS NULL);\n",
+ "unique": true,
+ "columns": []
+ }
+ },
+ {
+ "id": 14,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "UQ_remote_assets_owner_library_checksum",
+ "sql": "CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum\nON remote_asset_entity (owner_id, library_id, checksum)\nWHERE (library_id IS NOT NULL);\n",
+ "unique": true,
+ "columns": []
+ }
+ },
+ {
+ "id": 15,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "idx_remote_asset_checksum",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 16,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "idx_remote_asset_stack_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 17,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "idx_remote_asset_local_date_time_day",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME('%Y-%m-%d', local_date_time))",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 18,
+ "references": [
+ 1
+ ],
+ "type": "index",
+ "data": {
+ "on": 1,
+ "name": "idx_remote_asset_local_date_time_month",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME('%Y-%m', local_date_time))",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 19,
+ "references": [],
+ "type": "table",
+ "data": {
+ "name": "auth_user_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "email",
+ "getter_name": "email",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_admin",
+ "getter_name": "isAdmin",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_admin\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_admin\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "has_profile_image",
+ "getter_name": "hasProfileImage",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"has_profile_image\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"has_profile_image\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "profile_changed_at",
+ "getter_name": "profileChangedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "avatar_color",
+ "getter_name": "avatarColor",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AvatarColor>(AvatarColor.values)",
+ "dart_type_name": "AvatarColor"
+ }
+ },
+ {
+ "name": "quota_size_in_bytes",
+ "getter_name": "quotaSizeInBytes",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "quota_usage_in_bytes",
+ "getter_name": "quotaUsageInBytes",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "pin_code",
+ "getter_name": "pinCode",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 20,
+ "references": [
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "user_metadata_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "user_id",
+ "getter_name": "userId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "key",
+ "getter_name": "key",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<UserMetadataKey>(UserMetadataKey.values)",
+ "dart_type_name": "UserMetadataKey"
+ }
+ },
+ {
+ "name": "value",
+ "getter_name": "value",
+ "moor_type": "blob",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "userMetadataConverter",
+ "dart_type_name": "Map<String, Object?>"
+ }
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "user_id",
+ "key"
+ ]
+ }
+ },
+ {
+ "id": 21,
+ "references": [
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "partner_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "shared_by_id",
+ "getter_name": "sharedById",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "shared_with_id",
+ "getter_name": "sharedWithId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "in_timeline",
+ "getter_name": "inTimeline",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"in_timeline\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"in_timeline\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "shared_by_id",
+ "shared_with_id"
+ ]
+ }
+ },
+ {
+ "id": 22,
+ "references": [
+ 1
+ ],
+ "type": "table",
+ "data": {
+ "name": "remote_exif_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "city",
+ "getter_name": "city",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "state",
+ "getter_name": "state",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "country",
+ "getter_name": "country",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "date_time_original",
+ "getter_name": "dateTimeOriginal",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "description",
+ "getter_name": "description",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "height",
+ "getter_name": "height",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "width",
+ "getter_name": "width",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "exposure_time",
+ "getter_name": "exposureTime",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "f_number",
+ "getter_name": "fNumber",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "file_size",
+ "getter_name": "fileSize",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "focal_length",
+ "getter_name": "focalLength",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "latitude",
+ "getter_name": "latitude",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "longitude",
+ "getter_name": "longitude",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "iso",
+ "getter_name": "iso",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "make",
+ "getter_name": "make",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "model",
+ "getter_name": "model",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "lens",
+ "getter_name": "lens",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "orientation",
+ "getter_name": "orientation",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "time_zone",
+ "getter_name": "timeZone",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "rating",
+ "getter_name": "rating",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "projection_type",
+ "getter_name": "projectionType",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "asset_id"
+ ]
+ }
+ },
+ {
+ "id": 23,
+ "references": [
+ 1,
+ 4
+ ],
+ "type": "table",
+ "data": {
+ "name": "remote_album_asset_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "album_id",
+ "getter_name": "albumId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_album_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_album_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_album_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "asset_id",
+ "album_id"
+ ]
+ }
+ },
+ {
+ "id": 24,
+ "references": [
+ 4,
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "remote_album_user_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "album_id",
+ "getter_name": "albumId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_album_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_album_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_album_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "user_id",
+ "getter_name": "userId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "role",
+ "getter_name": "role",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AlbumUserRole>(AlbumUserRole.values)",
+ "dart_type_name": "AlbumUserRole"
+ }
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "album_id",
+ "user_id"
+ ]
+ }
+ },
+ {
+ "id": 25,
+ "references": [
+ 1
+ ],
+ "type": "table",
+ "data": {
+ "name": "remote_asset_cloud_id_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "cloud_id",
+ "getter_name": "cloudId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "adjustment_time",
+ "getter_name": "adjustmentTime",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "latitude",
+ "getter_name": "latitude",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "longitude",
+ "getter_name": "longitude",
+ "moor_type": "double",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "asset_id"
+ ]
+ }
+ },
+ {
+ "id": 26,
+ "references": [
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "memory_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "deleted_at",
+ "getter_name": "deletedAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "owner_id",
+ "getter_name": "ownerId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "type",
+ "getter_name": "type",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<MemoryTypeEnum>(MemoryTypeEnum.values)",
+ "dart_type_name": "MemoryTypeEnum"
+ }
+ },
+ {
+ "name": "data",
+ "getter_name": "data",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_saved",
+ "getter_name": "isSaved",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_saved\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_saved\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "memory_at",
+ "getter_name": "memoryAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "seen_at",
+ "getter_name": "seenAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "show_at",
+ "getter_name": "showAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "hide_at",
+ "getter_name": "hideAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 27,
+ "references": [
+ 1,
+ 26
+ ],
+ "type": "table",
+ "data": {
+ "name": "memory_asset_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "memory_id",
+ "getter_name": "memoryId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES memory_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES memory_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "memory_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "asset_id",
+ "memory_id"
+ ]
+ }
+ },
+ {
+ "id": 28,
+ "references": [
+ 0
+ ],
+ "type": "table",
+ "data": {
+ "name": "person_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "owner_id",
+ "getter_name": "ownerId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES user_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES user_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "user_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "face_asset_id",
+ "getter_name": "faceAssetId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_favorite",
+ "getter_name": "isFavorite",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_favorite\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_favorite\" IN (0, 1))"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_hidden",
+ "getter_name": "isHidden",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_hidden\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_hidden\" IN (0, 1))"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "color",
+ "getter_name": "color",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "birth_date",
+ "getter_name": "birthDate",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 29,
+ "references": [
+ 1,
+ 28
+ ],
+ "type": "table",
+ "data": {
+ "name": "asset_face_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "person_id",
+ "getter_name": "personId",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES person_entity (id) ON DELETE SET NULL",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES person_entity (id) ON DELETE SET NULL"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "person_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "setNull"
+ }
+ }
+ ]
+ },
+ {
+ "name": "image_width",
+ "getter_name": "imageWidth",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "image_height",
+ "getter_name": "imageHeight",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "bounding_box_x1",
+ "getter_name": "boundingBoxX1",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "bounding_box_y1",
+ "getter_name": "boundingBoxY1",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "bounding_box_x2",
+ "getter_name": "boundingBoxX2",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "bounding_box_y2",
+ "getter_name": "boundingBoxY2",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "source_type",
+ "getter_name": "sourceType",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_visible",
+ "getter_name": "isVisible",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_visible\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_visible\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('1')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "deleted_at",
+ "getter_name": "deletedAt",
+ "moor_type": "dateTime",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 30,
+ "references": [],
+ "type": "table",
+ "data": {
+ "name": "store_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "string_value",
+ "getter_name": "stringValue",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "int_value",
+ "getter_name": "intValue",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 31,
+ "references": [],
+ "type": "table",
+ "data": {
+ "name": "trashed_local_asset_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "name",
+ "getter_name": "name",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "type",
+ "getter_name": "type",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetType>(AssetType.values)",
+ "dart_type_name": "AssetType"
+ }
+ },
+ {
+ "name": "created_at",
+ "getter_name": "createdAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "updated_at",
+ "getter_name": "updatedAt",
+ "moor_type": "dateTime",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('CURRENT_TIMESTAMP')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "width",
+ "getter_name": "width",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "height",
+ "getter_name": "height",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "duration_ms",
+ "getter_name": "durationMs",
+ "moor_type": "int",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "album_id",
+ "getter_name": "albumId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "checksum",
+ "getter_name": "checksum",
+ "moor_type": "string",
+ "nullable": true,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "is_favorite",
+ "getter_name": "isFavorite",
+ "moor_type": "bool",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "CHECK (\"is_favorite\" IN (0, 1))",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "CHECK (\"is_favorite\" IN (0, 1))"
+ },
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "orientation",
+ "getter_name": "orientation",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "source",
+ "getter_name": "source",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<TrashOrigin>(TrashOrigin.values)",
+ "dart_type_name": "TrashOrigin"
+ }
+ },
+ {
+ "name": "playback_style",
+ "getter_name": "playbackStyle",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": "const CustomExpression('0')",
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetPlaybackStyle>(AssetPlaybackStyle.values)",
+ "dart_type_name": "AssetPlaybackStyle"
+ }
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id",
+ "album_id"
+ ]
+ }
+ },
+ {
+ "id": 32,
+ "references": [
+ 1
+ ],
+ "type": "table",
+ "data": {
+ "name": "asset_edit_entity",
+ "was_declared_in_moor": false,
+ "columns": [
+ {
+ "name": "id",
+ "getter_name": "id",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ },
+ {
+ "name": "asset_id",
+ "getter_name": "assetId",
+ "moor_type": "string",
+ "nullable": false,
+ "customConstraints": null,
+ "defaultConstraints": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE",
+ "dialectAwareDefaultConstraints": {
+ "sqlite": "REFERENCES remote_asset_entity (id) ON DELETE CASCADE"
+ },
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [
+ {
+ "foreign_key": {
+ "to": {
+ "table": "remote_asset_entity",
+ "column": "id"
+ },
+ "initially_deferred": false,
+ "on_update": null,
+ "on_delete": "cascade"
+ }
+ }
+ ]
+ },
+ {
+ "name": "action",
+ "getter_name": "action",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "const EnumIndexConverter<AssetEditAction>(AssetEditAction.values)",
+ "dart_type_name": "AssetEditAction"
+ }
+ },
+ {
+ "name": "parameters",
+ "getter_name": "parameters",
+ "moor_type": "blob",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": [],
+ "type_converter": {
+ "dart_expr": "editParameterConverter",
+ "dart_type_name": "Map<String, Object?>"
+ }
+ },
+ {
+ "name": "sequence",
+ "getter_name": "sequence",
+ "moor_type": "int",
+ "nullable": false,
+ "customConstraints": null,
+ "default_dart": null,
+ "default_client_dart": null,
+ "dsl_features": []
+ }
+ ],
+ "is_virtual": false,
+ "without_rowid": true,
+ "constraints": [],
+ "strict": true,
+ "explicit_pk": [
+ "id"
+ ]
+ }
+ },
+ {
+ "id": 33,
+ "references": [
+ 21
+ ],
+ "type": "index",
+ "data": {
+ "on": 21,
+ "name": "idx_partner_shared_with_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 34,
+ "references": [
+ 22
+ ],
+ "type": "index",
+ "data": {
+ "on": 22,
+ "name": "idx_lat_lng",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 35,
+ "references": [
+ 23
+ ],
+ "type": "index",
+ "data": {
+ "on": 23,
+ "name": "idx_remote_album_asset_album_asset",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 36,
+ "references": [
+ 25
+ ],
+ "type": "index",
+ "data": {
+ "on": 25,
+ "name": "idx_remote_asset_cloud_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 37,
+ "references": [
+ 28
+ ],
+ "type": "index",
+ "data": {
+ "on": 28,
+ "name": "idx_person_owner_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 38,
+ "references": [
+ 29
+ ],
+ "type": "index",
+ "data": {
+ "on": 29,
+ "name": "idx_asset_face_person_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 39,
+ "references": [
+ 29
+ ],
+ "type": "index",
+ "data": {
+ "on": 29,
+ "name": "idx_asset_face_asset_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 40,
+ "references": [
+ 31
+ ],
+ "type": "index",
+ "data": {
+ "on": 31,
+ "name": "idx_trashed_local_asset_checksum",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 41,
+ "references": [
+ 31
+ ],
+ "type": "index",
+ "data": {
+ "on": 31,
+ "name": "idx_trashed_local_asset_album",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)",
+ "unique": false,
+ "columns": []
+ }
+ },
+ {
+ "id": 42,
+ "references": [
+ 32
+ ],
+ "type": "index",
+ "data": {
+ "on": 32,
+ "name": "idx_asset_edit_asset_id",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)",
+ "unique": false,
+ "columns": []
+ }
+ }
+ ],
+ "fixed_sql": [
+ {
+ "name": "user_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"user_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"email\" TEXT NOT NULL, \"has_profile_image\" INTEGER NOT NULL DEFAULT 0 CHECK (\"has_profile_image\" IN (0, 1)), \"profile_changed_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"avatar_color\" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "remote_asset_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"remote_asset_entity\" (\"name\" TEXT NOT NULL, \"type\" INTEGER NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"width\" INTEGER NULL, \"height\" INTEGER NULL, \"duration_ms\" INTEGER NULL, \"id\" TEXT NOT NULL, \"checksum\" TEXT NOT NULL, \"is_favorite\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_favorite\" IN (0, 1)), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"local_date_time\" TEXT NULL, \"thumb_hash\" TEXT NULL, \"deleted_at\" TEXT NULL, \"live_photo_video_id\" TEXT NULL, \"visibility\" INTEGER NOT NULL, \"stack_id\" TEXT NULL, \"library_id\" TEXT NULL, \"is_edited\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_edited\" IN (0, 1)), PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "stack_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"stack_entity\" (\"id\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"primary_asset_id\" TEXT NOT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "local_asset_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"local_asset_entity\" (\"name\" TEXT NOT NULL, \"type\" INTEGER NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"width\" INTEGER NULL, \"height\" INTEGER NULL, \"duration_ms\" INTEGER NULL, \"id\" TEXT NOT NULL, \"checksum\" TEXT NULL, \"is_favorite\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_favorite\" IN (0, 1)), \"orientation\" INTEGER NOT NULL DEFAULT 0, \"i_cloud_id\" TEXT NULL, \"adjustment_time\" TEXT NULL, \"latitude\" REAL NULL, \"longitude\" REAL NULL, \"playback_style\" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "remote_album_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"remote_album_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"description\" TEXT NOT NULL DEFAULT '', \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"thumbnail_asset_id\" TEXT NULL REFERENCES remote_asset_entity (id) ON DELETE SET NULL, \"is_activity_enabled\" INTEGER NOT NULL DEFAULT 1 CHECK (\"is_activity_enabled\" IN (0, 1)), \"order\" INTEGER NOT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "local_album_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"local_album_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"backup_selection\" INTEGER NOT NULL, \"is_ios_shared_album\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_ios_shared_album\" IN (0, 1)), \"linked_remote_album_id\" TEXT NULL REFERENCES remote_album_entity (id) ON DELETE SET NULL, \"marker\" INTEGER NULL CHECK (\"marker\" IN (0, 1)), PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "local_album_asset_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"local_album_asset_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES local_asset_entity (id) ON DELETE CASCADE, \"album_id\" TEXT NOT NULL REFERENCES local_album_entity (id) ON DELETE CASCADE, \"marker\" INTEGER NULL CHECK (\"marker\" IN (0, 1)), PRIMARY KEY (\"asset_id\", \"album_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "idx_local_album_asset_album_asset",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_album_owner_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_local_asset_checksum",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)"
+ }
+ ]
+ },
+ {
+ "name": "idx_local_asset_cloud_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_stack_primary_asset_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_asset_owner_checksum",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)"
+ }
+ ]
+ },
+ {
+ "name": "UQ_remote_assets_owner_checksum",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)"
+ }
+ ]
+ },
+ {
+ "name": "UQ_remote_assets_owner_library_checksum",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_asset_checksum",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_asset_stack_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_asset_local_date_time_day",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME('%Y-%m-%d', local_date_time))"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_asset_local_date_time_month",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME('%Y-%m', local_date_time))"
+ }
+ ]
+ },
+ {
+ "name": "auth_user_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"auth_user_entity\" (\"id\" TEXT NOT NULL, \"name\" TEXT NOT NULL, \"email\" TEXT NOT NULL, \"is_admin\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_admin\" IN (0, 1)), \"has_profile_image\" INTEGER NOT NULL DEFAULT 0 CHECK (\"has_profile_image\" IN (0, 1)), \"profile_changed_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"avatar_color\" INTEGER NOT NULL, \"quota_size_in_bytes\" INTEGER NOT NULL DEFAULT 0, \"quota_usage_in_bytes\" INTEGER NOT NULL DEFAULT 0, \"pin_code\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "user_metadata_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"user_metadata_entity\" (\"user_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"key\" INTEGER NOT NULL, \"value\" BLOB NOT NULL, PRIMARY KEY (\"user_id\", \"key\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "partner_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"partner_entity\" (\"shared_by_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"shared_with_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"in_timeline\" INTEGER NOT NULL DEFAULT 0 CHECK (\"in_timeline\" IN (0, 1)), PRIMARY KEY (\"shared_by_id\", \"shared_with_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "remote_exif_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"remote_exif_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"city\" TEXT NULL, \"state\" TEXT NULL, \"country\" TEXT NULL, \"date_time_original\" TEXT NULL, \"description\" TEXT NULL, \"height\" INTEGER NULL, \"width\" INTEGER NULL, \"exposure_time\" TEXT NULL, \"f_number\" REAL NULL, \"file_size\" INTEGER NULL, \"focal_length\" REAL NULL, \"latitude\" REAL NULL, \"longitude\" REAL NULL, \"iso\" INTEGER NULL, \"make\" TEXT NULL, \"model\" TEXT NULL, \"lens\" TEXT NULL, \"orientation\" TEXT NULL, \"time_zone\" TEXT NULL, \"rating\" INTEGER NULL, \"projection_type\" TEXT NULL, PRIMARY KEY (\"asset_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "remote_album_asset_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"remote_album_asset_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"album_id\" TEXT NOT NULL REFERENCES remote_album_entity (id) ON DELETE CASCADE, PRIMARY KEY (\"asset_id\", \"album_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "remote_album_user_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"remote_album_user_entity\" (\"album_id\" TEXT NOT NULL REFERENCES remote_album_entity (id) ON DELETE CASCADE, \"user_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"role\" INTEGER NOT NULL, PRIMARY KEY (\"album_id\", \"user_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "remote_asset_cloud_id_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"remote_asset_cloud_id_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"cloud_id\" TEXT NULL, \"created_at\" TEXT NULL, \"adjustment_time\" TEXT NULL, \"latitude\" REAL NULL, \"longitude\" REAL NULL, PRIMARY KEY (\"asset_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "memory_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"memory_entity\" (\"id\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"deleted_at\" TEXT NULL, \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"type\" INTEGER NOT NULL, \"data\" TEXT NOT NULL, \"is_saved\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_saved\" IN (0, 1)), \"memory_at\" TEXT NOT NULL, \"seen_at\" TEXT NULL, \"show_at\" TEXT NULL, \"hide_at\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "memory_asset_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"memory_asset_entity\" (\"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"memory_id\" TEXT NOT NULL REFERENCES memory_entity (id) ON DELETE CASCADE, PRIMARY KEY (\"asset_id\", \"memory_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "person_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"person_entity\" (\"id\" TEXT NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"owner_id\" TEXT NOT NULL REFERENCES user_entity (id) ON DELETE CASCADE, \"name\" TEXT NOT NULL, \"face_asset_id\" TEXT NULL, \"is_favorite\" INTEGER NOT NULL CHECK (\"is_favorite\" IN (0, 1)), \"is_hidden\" INTEGER NOT NULL CHECK (\"is_hidden\" IN (0, 1)), \"color\" TEXT NULL, \"birth_date\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "asset_face_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"asset_face_entity\" (\"id\" TEXT NOT NULL, \"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"person_id\" TEXT NULL REFERENCES person_entity (id) ON DELETE SET NULL, \"image_width\" INTEGER NOT NULL, \"image_height\" INTEGER NOT NULL, \"bounding_box_x1\" INTEGER NOT NULL, \"bounding_box_y1\" INTEGER NOT NULL, \"bounding_box_x2\" INTEGER NOT NULL, \"bounding_box_y2\" INTEGER NOT NULL, \"source_type\" TEXT NOT NULL, \"is_visible\" INTEGER NOT NULL DEFAULT 1 CHECK (\"is_visible\" IN (0, 1)), \"deleted_at\" TEXT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "store_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"store_entity\" (\"id\" INTEGER NOT NULL, \"string_value\" TEXT NULL, \"int_value\" INTEGER NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "trashed_local_asset_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"trashed_local_asset_entity\" (\"name\" TEXT NOT NULL, \"type\" INTEGER NOT NULL, \"created_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"updated_at\" TEXT NOT NULL DEFAULT (CURRENT_TIMESTAMP), \"width\" INTEGER NULL, \"height\" INTEGER NULL, \"duration_ms\" INTEGER NULL, \"id\" TEXT NOT NULL, \"album_id\" TEXT NOT NULL, \"checksum\" TEXT NULL, \"is_favorite\" INTEGER NOT NULL DEFAULT 0 CHECK (\"is_favorite\" IN (0, 1)), \"orientation\" INTEGER NOT NULL DEFAULT 0, \"source\" INTEGER NOT NULL, \"playback_style\" INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (\"id\", \"album_id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "asset_edit_entity",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE TABLE IF NOT EXISTS \"asset_edit_entity\" (\"id\" TEXT NOT NULL, \"asset_id\" TEXT NOT NULL REFERENCES remote_asset_entity (id) ON DELETE CASCADE, \"action\" INTEGER NOT NULL, \"parameters\" BLOB NOT NULL, \"sequence\" INTEGER NOT NULL, PRIMARY KEY (\"id\")) WITHOUT ROWID, STRICT;"
+ }
+ ]
+ },
+ {
+ "name": "idx_partner_shared_with_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_lat_lng",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_album_asset_album_asset",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_remote_asset_cloud_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_person_owner_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_asset_face_person_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_asset_face_asset_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_trashed_local_asset_checksum",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)"
+ }
+ ]
+ },
+ {
+ "name": "idx_trashed_local_asset_album",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)"
+ }
+ ]
+ },
+ {
+ "name": "idx_asset_edit_asset_id",
+ "sql": [
+ {
+ "dialect": "sqlite",
+ "sql": "CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj
index f88d624b89..b9cd68cb7b 100644
--- a/mobile/ios/Runner.xcodeproj/project.pbxproj
+++ b/mobile/ios/Runner.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 77;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
diff --git a/mobile/ios/Runner/Sync/Messages.g.swift b/mobile/ios/Runner/Sync/Messages.g.swift
index bf7940226e..2933fc89af 100644
--- a/mobile/ios/Runner/Sync/Messages.g.swift
+++ b/mobile/ios/Runner/Sync/Messages.g.swift
@@ -192,7 +192,7 @@ struct PlatformAsset: Hashable {
var updatedAt: Int64? = nil
var width: Int64? = nil
var height: Int64? = nil
- var durationInSeconds: Int64
+ var durationMs: Int64
var orientation: Int64
var isFavorite: Bool
var adjustmentTime: Int64? = nil
@@ -210,7 +210,7 @@ struct PlatformAsset: Hashable {
let updatedAt: Int64? = nilOrValue(pigeonVar_list[4])
let width: Int64? = nilOrValue(pigeonVar_list[5])
let height: Int64? = nilOrValue(pigeonVar_list[6])
- let durationInSeconds = pigeonVar_list[7] as! Int64
+ let durationMs = pigeonVar_list[7] as! Int64
let orientation = pigeonVar_list[8] as! Int64
let isFavorite = pigeonVar_list[9] as! Bool
let adjustmentTime: Int64? = nilOrValue(pigeonVar_list[10])
@@ -226,7 +226,7 @@ struct PlatformAsset: Hashable {
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
orientation: orientation,
isFavorite: isFavorite,
adjustmentTime: adjustmentTime,
@@ -244,7 +244,7 @@ struct PlatformAsset: Hashable {
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
orientation,
isFavorite,
adjustmentTime,
@@ -257,7 +257,7 @@ struct PlatformAsset: Hashable {
if Swift.type(of: lhs) != Swift.type(of: rhs) {
return false
}
- return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationInSeconds, rhs.durationInSeconds) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle)
+ return deepEqualsMessages(lhs.id, rhs.id) && deepEqualsMessages(lhs.name, rhs.name) && deepEqualsMessages(lhs.type, rhs.type) && deepEqualsMessages(lhs.createdAt, rhs.createdAt) && deepEqualsMessages(lhs.updatedAt, rhs.updatedAt) && deepEqualsMessages(lhs.width, rhs.width) && deepEqualsMessages(lhs.height, rhs.height) && deepEqualsMessages(lhs.durationMs, rhs.durationMs) && deepEqualsMessages(lhs.orientation, rhs.orientation) && deepEqualsMessages(lhs.isFavorite, rhs.isFavorite) && deepEqualsMessages(lhs.adjustmentTime, rhs.adjustmentTime) && deepEqualsMessages(lhs.latitude, rhs.latitude) && deepEqualsMessages(lhs.longitude, rhs.longitude) && deepEqualsMessages(lhs.playbackStyle, rhs.playbackStyle)
}
func hash(into hasher: inout Hasher) {
@@ -269,7 +269,7 @@ struct PlatformAsset: Hashable {
deepHashMessages(value: updatedAt, hasher: &hasher)
deepHashMessages(value: width, hasher: &hasher)
deepHashMessages(value: height, hasher: &hasher)
- deepHashMessages(value: durationInSeconds, hasher: &hasher)
+ deepHashMessages(value: durationMs, hasher: &hasher)
deepHashMessages(value: orientation, hasher: &hasher)
deepHashMessages(value: isFavorite, hasher: &hasher)
deepHashMessages(value: adjustmentTime, hasher: &hasher)
diff --git a/mobile/ios/Runner/Sync/MessagesImpl.swift b/mobile/ios/Runner/Sync/MessagesImpl.swift
index 8022fb06d2..ec96729d8f 100644
--- a/mobile/ios/Runner/Sync/MessagesImpl.swift
+++ b/mobile/ios/Runner/Sync/MessagesImpl.swift
@@ -171,7 +171,7 @@ class NativeSyncApiImpl: ImmichPlugin, NativeSyncApi, FlutterPlugin {
id: asset.localIdentifier,
name: "",
type: 0,
- durationInSeconds: 0,
+ durationMs: 0,
orientation: 0,
isFavorite: false,
playbackStyle: .unknown
diff --git a/mobile/ios/Runner/Sync/PHAssetExtensions.swift b/mobile/ios/Runner/Sync/PHAssetExtensions.swift
index 0fc1dfc701..d4d947d5bb 100644
--- a/mobile/ios/Runner/Sync/PHAssetExtensions.swift
+++ b/mobile/ios/Runner/Sync/PHAssetExtensions.swift
@@ -21,7 +21,7 @@ extension PHAsset {
updatedAt: modificationDate.map { Int64($0.timeIntervalSince1970) },
width: Int64(pixelWidth),
height: Int64(pixelHeight),
- durationInSeconds: Int64(duration),
+ durationMs: Int64(duration * 1000),
orientation: 0,
isFavorite: isFavorite,
adjustmentTime: adjustmentTimestamp,
diff --git a/mobile/lib/domain/models/asset/base_asset.model.dart b/mobile/lib/domain/models/asset/base_asset.model.dart
index 85c42fd24f..15f705c65b 100644
--- a/mobile/lib/domain/models/asset/base_asset.model.dart
+++ b/mobile/lib/domain/models/asset/base_asset.model.dart
@@ -25,7 +25,7 @@ sealed class BaseAsset {
final DateTime updatedAt;
final int? width;
final int? height;
- final int? durationInSeconds;
+ final int? durationMs;
final bool isFavorite;
final String? livePhotoVideoId;
final bool isEdited;
@@ -38,7 +38,7 @@ sealed class BaseAsset {
required this.updatedAt,
this.width,
this.height,
- this.durationInSeconds,
+ this.durationMs,
this.isFavorite = false,
this.livePhotoVideoId,
required this.isEdited,
@@ -53,15 +53,17 @@ sealed class BaseAsset {
AssetPlaybackStyle get playbackStyle {
if (isVideo) return AssetPlaybackStyle.video;
if (isMotionPhoto) return AssetPlaybackStyle.livePhoto;
- if (isImage && durationInSeconds != null && durationInSeconds! > 0) return AssetPlaybackStyle.imageAnimated;
+ if (isImage && durationMs != null && durationMs! > 0) {
+ return AssetPlaybackStyle.imageAnimated;
+ }
if (isImage) return AssetPlaybackStyle.image;
return AssetPlaybackStyle.unknown;
}
Duration get duration {
- final durationInSeconds = this.durationInSeconds;
- if (durationInSeconds != null) {
- return Duration(seconds: durationInSeconds);
+ final durationMs = this.durationMs;
+ if (durationMs != null) {
+ return Duration(milliseconds: durationMs);
}
return const Duration();
}
@@ -88,7 +90,7 @@ sealed class BaseAsset {
updatedAt: $updatedAt,
width: ${width ?? "<NA>"},
height: ${height ?? "<NA>"},
- durationInSeconds: ${durationInSeconds ?? "<NA>"},
+ durationMs: ${durationMs ?? "<NA>"},
isFavorite: $isFavorite,
isEdited: $isEdited,
}''';
@@ -104,7 +106,7 @@ sealed class BaseAsset {
updatedAt == other.updatedAt &&
width == other.width &&
height == other.height &&
- durationInSeconds == other.durationInSeconds &&
+ durationMs == other.durationMs &&
isFavorite == other.isFavorite &&
isEdited == other.isEdited;
}
@@ -119,7 +121,7 @@ sealed class BaseAsset {
updatedAt.hashCode ^
width.hashCode ^
height.hashCode ^
- durationInSeconds.hashCode ^
+ durationMs.hashCode ^
isFavorite.hashCode ^
isEdited.hashCode;
}
diff --git a/mobile/lib/domain/models/asset/local_asset.model.dart b/mobile/lib/domain/models/asset/local_asset.model.dart
index 6766f4c3a2..04aa6cd846 100644
--- a/mobile/lib/domain/models/asset/local_asset.model.dart
+++ b/mobile/lib/domain/models/asset/local_asset.model.dart
@@ -23,7 +23,7 @@ class LocalAsset extends BaseAsset {
required super.updatedAt,
super.width,
super.height,
- super.durationInSeconds,
+ super.durationMs,
super.isFavorite = false,
super.livePhotoVideoId,
this.orientation = 0,
@@ -58,7 +58,7 @@ class LocalAsset extends BaseAsset {
updatedAt: $updatedAt,
width: ${width ?? "<NA>"},
height: ${height ?? "<NA>"},
- durationInSeconds: ${durationInSeconds ?? "<NA>"},
+ durationMs: ${durationMs ?? "<NA>"},
playbackStyle: $playbackStyle,
remoteId: ${remoteId ?? "<NA>"},
cloudId: ${cloudId ?? "<NA>"},
@@ -108,7 +108,7 @@ class LocalAsset extends BaseAsset {
DateTime? updatedAt,
int? width,
int? height,
- int? durationInSeconds,
+ int? durationMs,
bool? isFavorite,
int? orientation,
AssetPlaybackStyle? playbackStyle,
@@ -128,7 +128,7 @@ class LocalAsset extends BaseAsset {
updatedAt: updatedAt ?? this.updatedAt,
width: width ?? this.width,
height: height ?? this.height,
- durationInSeconds: durationInSeconds ?? this.durationInSeconds,
+ durationMs: durationMs ?? this.durationMs,
isFavorite: isFavorite ?? this.isFavorite,
orientation: orientation ?? this.orientation,
playbackStyle: playbackStyle ?? this.playbackStyle,
diff --git a/mobile/lib/domain/models/asset/remote_asset.model.dart b/mobile/lib/domain/models/asset/remote_asset.model.dart
index 745e8f46ff..36dc6242e1 100644
--- a/mobile/lib/domain/models/asset/remote_asset.model.dart
+++ b/mobile/lib/domain/models/asset/remote_asset.model.dart
@@ -22,7 +22,7 @@ class RemoteAsset extends BaseAsset {
required super.updatedAt,
super.width,
super.height,
- super.durationInSeconds,
+ super.durationMs,
super.isFavorite = false,
this.thumbHash,
this.visibility = AssetVisibility.timeline,
@@ -57,7 +57,7 @@ class RemoteAsset extends BaseAsset {
updatedAt: $updatedAt,
width: ${width ?? "<NA>"},
height: ${height ?? "<NA>"},
- durationInSeconds: ${durationInSeconds ?? "<NA>"},
+ durationMs: ${durationMs ?? "<NA>"},
localId: ${localId ?? "<NA>"},
isFavorite: $isFavorite,
thumbHash: ${thumbHash ?? "<NA>"},
@@ -102,7 +102,7 @@ class RemoteAsset extends BaseAsset {
DateTime? updatedAt,
int? width,
int? height,
- int? durationInSeconds,
+ int? durationMs,
bool? isFavorite,
String? thumbHash,
AssetVisibility? visibility,
@@ -121,7 +121,7 @@ class RemoteAsset extends BaseAsset {
updatedAt: updatedAt ?? this.updatedAt,
width: width ?? this.width,
height: height ?? this.height,
- durationInSeconds: durationInSeconds ?? this.durationInSeconds,
+ durationMs: durationMs ?? this.durationMs,
isFavorite: isFavorite ?? this.isFavorite,
thumbHash: thumbHash ?? this.thumbHash,
visibility: visibility ?? this.visibility,
@@ -146,7 +146,7 @@ class RemoteAssetExif extends RemoteAsset {
required super.updatedAt,
super.width,
super.height,
- super.durationInSeconds,
+ super.durationMs,
super.isFavorite = false,
super.thumbHash,
super.visibility = AssetVisibility.timeline,
@@ -178,7 +178,7 @@ class RemoteAssetExif extends RemoteAsset {
DateTime? updatedAt,
int? width,
int? height,
- int? durationInSeconds,
+ int? durationMs,
bool? isFavorite,
String? thumbHash,
AssetVisibility? visibility,
@@ -198,7 +198,7 @@ class RemoteAssetExif extends RemoteAsset {
updatedAt: updatedAt ?? this.updatedAt,
width: width ?? this.width,
height: height ?? this.height,
- durationInSeconds: durationInSeconds ?? this.durationInSeconds,
+ durationMs: durationMs ?? this.durationMs,
isFavorite: isFavorite ?? this.isFavorite,
thumbHash: thumbHash ?? this.thumbHash,
visibility: visibility ?? this.visibility,
diff --git a/mobile/lib/domain/services/local_sync.service.dart b/mobile/lib/domain/services/local_sync.service.dart
index 029482978a..1d9ab1e490 100644
--- a/mobile/lib/domain/services/local_sync.service.dart
+++ b/mobile/lib/domain/services/local_sync.service.dart
@@ -337,7 +337,7 @@ class LocalSyncService {
a.createdAt.isAtSameMomentAs(b.createdAt) &&
a.width == b.width &&
a.height == b.height &&
- a.durationInSeconds == b.durationInSeconds;
+ a.durationMs == b.durationMs;
}
final firstAdjustment = a.adjustmentTime?.millisecondsSinceEpoch ?? 0;
@@ -346,7 +346,7 @@ class LocalSyncService {
a.createdAt.isAtSameMomentAs(b.createdAt) &&
a.width == b.width &&
a.height == b.height &&
- a.durationInSeconds == b.durationInSeconds &&
+ a.durationMs == b.durationMs &&
a.latitude == b.latitude &&
a.longitude == b.longitude;
}
@@ -432,7 +432,7 @@ extension PlatformToLocalAsset on PlatformAsset {
updatedAt: tryFromSecondsSinceEpoch(updatedAt, isUtc: true) ?? DateTime.timestamp(),
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
isFavorite: isFavorite,
orientation: orientation,
playbackStyle: _toPlaybackStyle(playbackStyle),
diff --git a/mobile/lib/extensions/asset_extensions.dart b/mobile/lib/extensions/asset_extensions.dart
index 6e8101bd04..6bcc11f18d 100644
--- a/mobile/lib/extensions/asset_extensions.dart
+++ b/mobile/lib/extensions/asset_extensions.dart
@@ -14,7 +14,7 @@ extension DTOToAsset on api.AssetResponseDto {
updatedAt: updatedAt,
ownerId: ownerId,
visibility: visibility.toAssetVisibility(),
- durationInSeconds: duration?.toDuration()?.inSeconds ?? 0,
+ durationMs: duration?.toDuration()?.inMilliseconds ?? 0,
height: height?.toInt(),
width: width?.toInt(),
isFavorite: isFavorite,
@@ -36,7 +36,7 @@ extension DTOToAsset on api.AssetResponseDto {
updatedAt: updatedAt,
ownerId: ownerId,
visibility: visibility.toAssetVisibility(),
- durationInSeconds: duration?.toDuration()?.inSeconds ?? 0,
+ durationMs: duration?.toDuration()?.inMilliseconds ?? 0,
height: height?.toInt(),
width: width?.toInt(),
isFavorite: isFavorite,
diff --git a/mobile/lib/extensions/string_extensions.dart b/mobile/lib/extensions/string_extensions.dart
index ae31565044..d30c221f96 100644
--- a/mobile/lib/extensions/string_extensions.dart
+++ b/mobile/lib/extensions/string_extensions.dart
@@ -7,11 +7,16 @@ extension StringExtension on String {
}
extension DurationExtension on String {
- /// Parses and returns the string of format HH:MM:SS as a duration object else null
+ /// Parses and returns the string of format HH:MM:SS.ffffff as a duration object else null
Duration? toDuration() {
try {
- final parts = split(':').map((e) => double.parse(e).toInt()).toList(growable: false);
- return Duration(hours: parts[0], minutes: parts[1], seconds: parts[2]);
+ final parts = split(':');
+ final hours = double.parse(parts[0]).toInt();
+ final minutes = double.parse(parts[1]).toInt();
+ final secondsParts = parts[2].split('.');
+ final seconds = int.parse(secondsParts[0]);
+ final milliseconds = secondsParts.length > 1 ? (double.parse('0.${secondsParts[1]}') * 1000).round() : 0;
+ return Duration(hours: hours, minutes: minutes, seconds: seconds, milliseconds: milliseconds);
} catch (e) {
return null;
}
diff --git a/mobile/lib/infrastructure/entities/local_asset.entity.dart b/mobile/lib/infrastructure/entities/local_asset.entity.dart
index e1cb5f5597..5a14a44fb7 100644
--- a/mobile/lib/infrastructure/entities/local_asset.entity.dart
+++ b/mobile/lib/infrastructure/entities/local_asset.entity.dart
@@ -39,7 +39,7 @@ extension LocalAssetEntityDataDomainExtension on LocalAssetEntityData {
type: type,
createdAt: createdAt,
updatedAt: updatedAt,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
isFavorite: isFavorite,
height: height,
width: width,
diff --git a/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart
index 92ac3d2e35..e01e6ce745 100644
--- a/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart
+++ b/mobile/lib/infrastructure/entities/local_asset.entity.drift.dart
@@ -16,7 +16,7 @@ typedef $$LocalAssetEntityTableCreateCompanionBuilder =
i0.Value<DateTime> updatedAt,
i0.Value<int?> width,
i0.Value<int?> height,
- i0.Value<int?> durationInSeconds,
+ i0.Value<int?> durationMs,
required String id,
i0.Value<String?> checksum,
i0.Value<bool> isFavorite,
@@ -35,7 +35,7 @@ typedef $$LocalAssetEntityTableUpdateCompanionBuilder =
i0.Value<DateTime> updatedAt,
i0.Value<int?> width,
i0.Value<int?> height,
- i0.Value<int?> durationInSeconds,
+ i0.Value<int?> durationMs,
i0.Value<String> id,
i0.Value<String?> checksum,
i0.Value<bool> isFavorite,
@@ -87,8 +87,8 @@ class $$LocalAssetEntityTableFilterComposer
builder: (column) => i0.ColumnFilters(column),
);
- i0.ColumnFilters<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.ColumnFilters<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => i0.ColumnFilters(column),
);
@@ -182,8 +182,8 @@ class $$LocalAssetEntityTableOrderingComposer
builder: (column) => i0.ColumnOrderings(column),
);
- i0.ColumnOrderings<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.ColumnOrderings<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => i0.ColumnOrderings(column),
);
@@ -260,8 +260,8 @@ class $$LocalAssetEntityTableAnnotationComposer
i0.GeneratedColumn<int> get height =>
$composableBuilder(column: $table.height, builder: (column) => column);
- i0.GeneratedColumn<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.GeneratedColumn<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => column,
);
@@ -348,7 +348,7 @@ class $$LocalAssetEntityTableTableManager
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
i0.Value<String> id = const i0.Value.absent(),
i0.Value<String?> checksum = const i0.Value.absent(),
i0.Value<bool> isFavorite = const i0.Value.absent(),
@@ -366,7 +366,7 @@ class $$LocalAssetEntityTableTableManager
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
id: id,
checksum: checksum,
isFavorite: isFavorite,
@@ -385,7 +385,7 @@ class $$LocalAssetEntityTableTableManager
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
required String id,
i0.Value<String?> checksum = const i0.Value.absent(),
i0.Value<bool> isFavorite = const i0.Value.absent(),
@@ -403,7 +403,7 @@ class $$LocalAssetEntityTableTableManager
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
id: id,
checksum: checksum,
isFavorite: isFavorite,
@@ -522,17 +522,17 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
type: i0.DriftSqlType.int,
requiredDuringInsert: false,
);
- static const i0.VerificationMeta _durationInSecondsMeta =
- const i0.VerificationMeta('durationInSeconds');
+ static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta(
+ 'durationMs',
+ );
@override
- late final i0.GeneratedColumn<int> durationInSeconds =
- i0.GeneratedColumn<int>(
- 'duration_in_seconds',
- aliasedName,
- true,
- type: i0.DriftSqlType.int,
- requiredDuringInsert: false,
- );
+ late final i0.GeneratedColumn<int> durationMs = i0.GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: i0.DriftSqlType.int,
+ requiredDuringInsert: false,
+ );
static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id');
@override
late final i0.GeneratedColumn<String> id = i0.GeneratedColumn<String>(
@@ -645,7 +645,7 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
id,
checksum,
isFavorite,
@@ -700,13 +700,10 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
height.isAcceptableOrUnknown(data['height']!, _heightMeta),
);
}
- if (data.containsKey('duration_in_seconds')) {
+ if (data.containsKey('duration_ms')) {
context.handle(
- _durationInSecondsMeta,
- durationInSeconds.isAcceptableOrUnknown(
- data['duration_in_seconds']!,
- _durationInSecondsMeta,
- ),
+ _durationMsMeta,
+ durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta),
);
}
if (data.containsKey('id')) {
@@ -800,9 +797,9 @@ class $LocalAssetEntityTable extends i3.LocalAssetEntity
i0.DriftSqlType.int,
data['${effectivePrefix}height'],
),
- durationInSeconds: attachedDatabase.typeMapping.read(
+ durationMs: attachedDatabase.typeMapping.read(
i0.DriftSqlType.int,
- data['${effectivePrefix}duration_in_seconds'],
+ data['${effectivePrefix}duration_ms'],
),
id: attachedDatabase.typeMapping.read(
i0.DriftSqlType.string,
@@ -870,7 +867,7 @@ class LocalAssetEntityData extends i0.DataClass
final DateTime updatedAt;
final int? width;
final int? height;
- final int? durationInSeconds;
+ final int? durationMs;
final String id;
final String? checksum;
final bool isFavorite;
@@ -887,7 +884,7 @@ class LocalAssetEntityData extends i0.DataClass
required this.updatedAt,
this.width,
this.height,
- this.durationInSeconds,
+ this.durationMs,
required this.id,
this.checksum,
required this.isFavorite,
@@ -915,8 +912,8 @@ class LocalAssetEntityData extends i0.DataClass
if (!nullToAbsent || height != null) {
map['height'] = i0.Variable<int>(height);
}
- if (!nullToAbsent || durationInSeconds != null) {
- map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds);
+ if (!nullToAbsent || durationMs != null) {
+ map['duration_ms'] = i0.Variable<int>(durationMs);
}
map['id'] = i0.Variable<String>(id);
if (!nullToAbsent || checksum != null) {
@@ -958,7 +955,7 @@ class LocalAssetEntityData extends i0.DataClass
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
width: serializer.fromJson<int?>(json['width']),
height: serializer.fromJson<int?>(json['height']),
- durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),
+ durationMs: serializer.fromJson<int?>(json['durationMs']),
id: serializer.fromJson<String>(json['id']),
checksum: serializer.fromJson<String?>(json['checksum']),
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
@@ -984,7 +981,7 @@ class LocalAssetEntityData extends i0.DataClass
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'width': serializer.toJson<int?>(width),
'height': serializer.toJson<int?>(height),
- 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),
+ 'durationMs': serializer.toJson<int?>(durationMs),
'id': serializer.toJson<String>(id),
'checksum': serializer.toJson<String?>(checksum),
'isFavorite': serializer.toJson<bool>(isFavorite),
@@ -1006,7 +1003,7 @@ class LocalAssetEntityData extends i0.DataClass
DateTime? updatedAt,
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
String? id,
i0.Value<String?> checksum = const i0.Value.absent(),
bool? isFavorite,
@@ -1023,9 +1020,7 @@ class LocalAssetEntityData extends i0.DataClass
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,
+ durationMs: durationMs.present ? durationMs.value : this.durationMs,
id: id ?? this.id,
checksum: checksum.present ? checksum.value : this.checksum,
isFavorite: isFavorite ?? this.isFavorite,
@@ -1046,9 +1041,9 @@ class LocalAssetEntityData extends i0.DataClass
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,
+ durationMs: data.durationMs.present
+ ? data.durationMs.value
+ : this.durationMs,
id: data.id.present ? data.id.value : this.id,
checksum: data.checksum.present ? data.checksum.value : this.checksum,
isFavorite: data.isFavorite.present
@@ -1078,7 +1073,7 @@ class LocalAssetEntityData extends i0.DataClass
..write('updatedAt: $updatedAt, ')
..write('width: $width, ')
..write('height: $height, ')
- ..write('durationInSeconds: $durationInSeconds, ')
+ ..write('durationMs: $durationMs, ')
..write('id: $id, ')
..write('checksum: $checksum, ')
..write('isFavorite: $isFavorite, ')
@@ -1100,7 +1095,7 @@ class LocalAssetEntityData extends i0.DataClass
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
id,
checksum,
isFavorite,
@@ -1121,7 +1116,7 @@ class LocalAssetEntityData extends i0.DataClass
other.updatedAt == this.updatedAt &&
other.width == this.width &&
other.height == this.height &&
- other.durationInSeconds == this.durationInSeconds &&
+ other.durationMs == this.durationMs &&
other.id == this.id &&
other.checksum == this.checksum &&
other.isFavorite == this.isFavorite &&
@@ -1141,7 +1136,7 @@ class LocalAssetEntityCompanion
final i0.Value<DateTime> updatedAt;
final i0.Value<int?> width;
final i0.Value<int?> height;
- final i0.Value<int?> durationInSeconds;
+ final i0.Value<int?> durationMs;
final i0.Value<String> id;
final i0.Value<String?> checksum;
final i0.Value<bool> isFavorite;
@@ -1158,7 +1153,7 @@ class LocalAssetEntityCompanion
this.updatedAt = const i0.Value.absent(),
this.width = const i0.Value.absent(),
this.height = const i0.Value.absent(),
- this.durationInSeconds = const i0.Value.absent(),
+ this.durationMs = const i0.Value.absent(),
this.id = const i0.Value.absent(),
this.checksum = const i0.Value.absent(),
this.isFavorite = const i0.Value.absent(),
@@ -1176,7 +1171,7 @@ class LocalAssetEntityCompanion
this.updatedAt = const i0.Value.absent(),
this.width = const i0.Value.absent(),
this.height = const i0.Value.absent(),
- this.durationInSeconds = const i0.Value.absent(),
+ this.durationMs = const i0.Value.absent(),
required String id,
this.checksum = const i0.Value.absent(),
this.isFavorite = const i0.Value.absent(),
@@ -1196,7 +1191,7 @@ class LocalAssetEntityCompanion
i0.Expression<DateTime>? updatedAt,
i0.Expression<int>? width,
i0.Expression<int>? height,
- i0.Expression<int>? durationInSeconds,
+ i0.Expression<int>? durationMs,
i0.Expression<String>? id,
i0.Expression<String>? checksum,
i0.Expression<bool>? isFavorite,
@@ -1214,7 +1209,7 @@ class LocalAssetEntityCompanion
if (updatedAt != null) 'updated_at': updatedAt,
if (width != null) 'width': width,
if (height != null) 'height': height,
- if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,
+ if (durationMs != null) 'duration_ms': durationMs,
if (id != null) 'id': id,
if (checksum != null) 'checksum': checksum,
if (isFavorite != null) 'is_favorite': isFavorite,
@@ -1234,7 +1229,7 @@ class LocalAssetEntityCompanion
i0.Value<DateTime>? updatedAt,
i0.Value<int?>? width,
i0.Value<int?>? height,
- i0.Value<int?>? durationInSeconds,
+ i0.Value<int?>? durationMs,
i0.Value<String>? id,
i0.Value<String?>? checksum,
i0.Value<bool>? isFavorite,
@@ -1252,7 +1247,7 @@ class LocalAssetEntityCompanion
updatedAt: updatedAt ?? this.updatedAt,
width: width ?? this.width,
height: height ?? this.height,
- durationInSeconds: durationInSeconds ?? this.durationInSeconds,
+ durationMs: durationMs ?? this.durationMs,
id: id ?? this.id,
checksum: checksum ?? this.checksum,
isFavorite: isFavorite ?? this.isFavorite,
@@ -1288,8 +1283,8 @@ class LocalAssetEntityCompanion
if (height.present) {
map['height'] = i0.Variable<int>(height.value);
}
- if (durationInSeconds.present) {
- map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds.value);
+ if (durationMs.present) {
+ map['duration_ms'] = i0.Variable<int>(durationMs.value);
}
if (id.present) {
map['id'] = i0.Variable<String>(id.value);
@@ -1334,7 +1329,7 @@ class LocalAssetEntityCompanion
..write('updatedAt: $updatedAt, ')
..write('width: $width, ')
..write('height: $height, ')
- ..write('durationInSeconds: $durationInSeconds, ')
+ ..write('durationMs: $durationMs, ')
..write('id: $id, ')
..write('checksum: $checksum, ')
..write('isFavorite: $isFavorite, ')
diff --git a/mobile/lib/infrastructure/entities/merged_asset.drift b/mobile/lib/infrastructure/entities/merged_asset.drift
index 73276d1756..daad02e2b3 100644
--- a/mobile/lib/infrastructure/entities/merged_asset.drift
+++ b/mobile/lib/infrastructure/entities/merged_asset.drift
@@ -14,7 +14,7 @@ SELECT
rae.updated_at,
rae.width,
rae.height,
- rae.duration_in_seconds,
+ rae.duration_ms,
rae.is_favorite,
rae.thumb_hash,
rae.checksum,
@@ -52,7 +52,7 @@ SELECT
lae.updated_at,
lae.width,
lae.height,
- lae.duration_in_seconds,
+ lae.duration_ms,
lae.is_favorite,
NULL as thumb_hash,
lae.checksum,
diff --git a/mobile/lib/infrastructure/entities/merged_asset.drift.dart b/mobile/lib/infrastructure/entities/merged_asset.drift.dart
index c6004eb10d..1e501d4028 100644
--- a/mobile/lib/infrastructure/entities/merged_asset.drift.dart
+++ b/mobile/lib/infrastructure/entities/merged_asset.drift.dart
@@ -29,7 +29,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
);
$arrayStartIndex += generatedlimit.amountOfVariables;
return customSelect(
- 'SELECT rae.id AS remote_id, (SELECT lae.id FROM local_asset_entity AS lae WHERE lae.checksum = rae.checksum LIMIT 1) AS local_id, rae.name, rae.type, rae.created_at AS created_at, rae.updated_at, rae.width, rae.height, rae.duration_in_seconds, rae.is_favorite, rae.thumb_hash, rae.checksum, rae.owner_id, rae.live_photo_video_id, 0 AS orientation, rae.stack_id, NULL AS i_cloud_id, NULL AS latitude, NULL AS longitude, NULL AS adjustmentTime, rae.is_edited, 0 AS playback_style FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.created_at AS created_at, lae.updated_at, lae.width, lae.height, lae.duration_in_seconds, lae.is_favorite, NULL AS thumb_hash, lae.checksum, NULL AS owner_id, NULL AS live_photo_video_id, lae.orientation, NULL AS stack_id, lae.i_cloud_id, lae.latitude, lae.longitude, lae.adjustment_time, 0 AS is_edited, lae.playback_style FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2) ORDER BY created_at DESC ${generatedlimit.sql}',
+ 'SELECT rae.id AS remote_id, (SELECT lae.id FROM local_asset_entity AS lae WHERE lae.checksum = rae.checksum LIMIT 1) AS local_id, rae.name, rae.type, rae.created_at AS created_at, rae.updated_at, rae.width, rae.height, rae.duration_ms, rae.is_favorite, rae.thumb_hash, rae.checksum, rae.owner_id, rae.live_photo_video_id, 0 AS orientation, rae.stack_id, NULL AS i_cloud_id, NULL AS latitude, NULL AS longitude, NULL AS adjustmentTime, rae.is_edited, 0 AS playback_style FROM remote_asset_entity AS rae LEFT JOIN stack_entity AS se ON rae.stack_id = se.id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandeduserIds) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.created_at AS created_at, lae.updated_at, lae.width, lae.height, lae.duration_ms, lae.is_favorite, NULL AS thumb_hash, lae.checksum, NULL AS owner_id, NULL AS live_photo_video_id, lae.orientation, NULL AS stack_id, lae.i_cloud_id, lae.latitude, lae.longitude, lae.adjustment_time, 0 AS is_edited, lae.playback_style FROM local_asset_entity AS lae WHERE NOT EXISTS (SELECT 1 FROM remote_asset_entity AS rae WHERE rae.checksum = lae.checksum AND rae.owner_id IN ($expandeduserIds)) AND EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 0) AND NOT EXISTS (SELECT 1 FROM local_album_asset_entity AS laa INNER JOIN local_album_entity AS la ON laa.album_id = la.id WHERE laa.asset_id = lae.id AND la.backup_selection = 2) ORDER BY created_at DESC ${generatedlimit.sql}',
variables: [
for (var $ in userIds) i0.Variable<String>($),
...generatedlimit.introducedVariables,
@@ -54,7 +54,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
updatedAt: row.read<DateTime>('updated_at'),
width: row.readNullable<int>('width'),
height: row.readNullable<int>('height'),
- durationInSeconds: row.readNullable<int>('duration_in_seconds'),
+ durationMs: row.readNullable<int>('duration_ms'),
isFavorite: row.read<bool>('is_favorite'),
thumbHash: row.readNullable<String>('thumb_hash'),
checksum: row.readNullable<String>('checksum'),
@@ -127,7 +127,7 @@ class MergedAssetResult {
final DateTime updatedAt;
final int? width;
final int? height;
- final int? durationInSeconds;
+ final int? durationMs;
final bool isFavorite;
final String? thumbHash;
final String? checksum;
@@ -150,7 +150,7 @@ class MergedAssetResult {
required this.updatedAt,
this.width,
this.height,
- this.durationInSeconds,
+ this.durationMs,
required this.isFavorite,
this.thumbHash,
this.checksum,
diff --git a/mobile/lib/infrastructure/entities/remote_asset.entity.dart b/mobile/lib/infrastructure/entities/remote_asset.entity.dart
index 4c8b563616..7cd8913542 100644
--- a/mobile/lib/infrastructure/entities/remote_asset.entity.dart
+++ b/mobile/lib/infrastructure/entities/remote_asset.entity.dart
@@ -66,7 +66,7 @@ extension RemoteAssetEntityDataDomainEx on RemoteAssetEntityData {
type: type,
createdAt: createdAt,
updatedAt: updatedAt,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
isFavorite: isFavorite,
height: height,
width: width,
diff --git a/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart
index 8231cfcd8a..845c99e3c2 100644
--- a/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart
+++ b/mobile/lib/infrastructure/entities/remote_asset.entity.drift.dart
@@ -19,7 +19,7 @@ typedef $$RemoteAssetEntityTableCreateCompanionBuilder =
i0.Value<DateTime> updatedAt,
i0.Value<int?> width,
i0.Value<int?> height,
- i0.Value<int?> durationInSeconds,
+ i0.Value<int?> durationMs,
required String id,
required String checksum,
i0.Value<bool> isFavorite,
@@ -41,7 +41,7 @@ typedef $$RemoteAssetEntityTableUpdateCompanionBuilder =
i0.Value<DateTime> updatedAt,
i0.Value<int?> width,
i0.Value<int?> height,
- i0.Value<int?> durationInSeconds,
+ i0.Value<int?> durationMs,
i0.Value<String> id,
i0.Value<String> checksum,
i0.Value<bool> isFavorite,
@@ -142,8 +142,8 @@ class $$RemoteAssetEntityTableFilterComposer
builder: (column) => i0.ColumnFilters(column),
);
- i0.ColumnFilters<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.ColumnFilters<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => i0.ColumnFilters(column),
);
@@ -270,8 +270,8 @@ class $$RemoteAssetEntityTableOrderingComposer
builder: (column) => i0.ColumnOrderings(column),
);
- i0.ColumnOrderings<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.ColumnOrderings<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => i0.ColumnOrderings(column),
);
@@ -385,8 +385,8 @@ class $$RemoteAssetEntityTableAnnotationComposer
i0.GeneratedColumn<int> get height =>
$composableBuilder(column: $table.height, builder: (column) => column);
- i0.GeneratedColumn<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.GeneratedColumn<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => column,
);
@@ -499,7 +499,7 @@ class $$RemoteAssetEntityTableTableManager
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
i0.Value<String> id = const i0.Value.absent(),
i0.Value<String> checksum = const i0.Value.absent(),
i0.Value<bool> isFavorite = const i0.Value.absent(),
@@ -520,7 +520,7 @@ class $$RemoteAssetEntityTableTableManager
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
id: id,
checksum: checksum,
isFavorite: isFavorite,
@@ -542,7 +542,7 @@ class $$RemoteAssetEntityTableTableManager
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
required String id,
required String checksum,
i0.Value<bool> isFavorite = const i0.Value.absent(),
@@ -562,7 +562,7 @@ class $$RemoteAssetEntityTableTableManager
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
id: id,
checksum: checksum,
isFavorite: isFavorite,
@@ -724,17 +724,17 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
type: i0.DriftSqlType.int,
requiredDuringInsert: false,
);
- static const i0.VerificationMeta _durationInSecondsMeta =
- const i0.VerificationMeta('durationInSeconds');
+ static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta(
+ 'durationMs',
+ );
@override
- late final i0.GeneratedColumn<int> durationInSeconds =
- i0.GeneratedColumn<int>(
- 'duration_in_seconds',
- aliasedName,
- true,
- type: i0.DriftSqlType.int,
- requiredDuringInsert: false,
- );
+ late final i0.GeneratedColumn<int> durationMs = i0.GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: i0.DriftSqlType.int,
+ requiredDuringInsert: false,
+ );
static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id');
@override
late final i0.GeneratedColumn<String> id = i0.GeneratedColumn<String>(
@@ -886,7 +886,7 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
id,
checksum,
isFavorite,
@@ -944,13 +944,10 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
height.isAcceptableOrUnknown(data['height']!, _heightMeta),
);
}
- if (data.containsKey('duration_in_seconds')) {
+ if (data.containsKey('duration_ms')) {
context.handle(
- _durationInSecondsMeta,
- durationInSeconds.isAcceptableOrUnknown(
- data['duration_in_seconds']!,
- _durationInSecondsMeta,
- ),
+ _durationMsMeta,
+ durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta),
);
}
if (data.containsKey('id')) {
@@ -1066,9 +1063,9 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
i0.DriftSqlType.int,
data['${effectivePrefix}height'],
),
- durationInSeconds: attachedDatabase.typeMapping.read(
+ durationMs: attachedDatabase.typeMapping.read(
i0.DriftSqlType.int,
- data['${effectivePrefix}duration_in_seconds'],
+ data['${effectivePrefix}duration_ms'],
),
id: attachedDatabase.typeMapping.read(
i0.DriftSqlType.string,
@@ -1148,7 +1145,7 @@ class RemoteAssetEntityData extends i0.DataClass
final DateTime updatedAt;
final int? width;
final int? height;
- final int? durationInSeconds;
+ final int? durationMs;
final String id;
final String checksum;
final bool isFavorite;
@@ -1168,7 +1165,7 @@ class RemoteAssetEntityData extends i0.DataClass
required this.updatedAt,
this.width,
this.height,
- this.durationInSeconds,
+ this.durationMs,
required this.id,
required this.checksum,
required this.isFavorite,
@@ -1199,8 +1196,8 @@ class RemoteAssetEntityData extends i0.DataClass
if (!nullToAbsent || height != null) {
map['height'] = i0.Variable<int>(height);
}
- if (!nullToAbsent || durationInSeconds != null) {
- map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds);
+ if (!nullToAbsent || durationMs != null) {
+ map['duration_ms'] = i0.Variable<int>(durationMs);
}
map['id'] = i0.Variable<String>(id);
map['checksum'] = i0.Variable<String>(checksum);
@@ -1247,7 +1244,7 @@ class RemoteAssetEntityData extends i0.DataClass
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
width: serializer.fromJson<int?>(json['width']),
height: serializer.fromJson<int?>(json['height']),
- durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),
+ durationMs: serializer.fromJson<int?>(json['durationMs']),
id: serializer.fromJson<String>(json['id']),
checksum: serializer.fromJson<String>(json['checksum']),
isFavorite: serializer.fromJson<bool>(json['isFavorite']),
@@ -1276,7 +1273,7 @@ class RemoteAssetEntityData extends i0.DataClass
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'width': serializer.toJson<int?>(width),
'height': serializer.toJson<int?>(height),
- 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),
+ 'durationMs': serializer.toJson<int?>(durationMs),
'id': serializer.toJson<String>(id),
'checksum': serializer.toJson<String>(checksum),
'isFavorite': serializer.toJson<bool>(isFavorite),
@@ -1301,7 +1298,7 @@ class RemoteAssetEntityData extends i0.DataClass
DateTime? updatedAt,
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
String? id,
String? checksum,
bool? isFavorite,
@@ -1321,9 +1318,7 @@ class RemoteAssetEntityData extends i0.DataClass
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,
+ durationMs: durationMs.present ? durationMs.value : this.durationMs,
id: id ?? this.id,
checksum: checksum ?? this.checksum,
isFavorite: isFavorite ?? this.isFavorite,
@@ -1349,9 +1344,9 @@ class RemoteAssetEntityData extends i0.DataClass
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,
+ durationMs: data.durationMs.present
+ ? data.durationMs.value
+ : this.durationMs,
id: data.id.present ? data.id.value : this.id,
checksum: data.checksum.present ? data.checksum.value : this.checksum,
isFavorite: data.isFavorite.present
@@ -1384,7 +1379,7 @@ class RemoteAssetEntityData extends i0.DataClass
..write('updatedAt: $updatedAt, ')
..write('width: $width, ')
..write('height: $height, ')
- ..write('durationInSeconds: $durationInSeconds, ')
+ ..write('durationMs: $durationMs, ')
..write('id: $id, ')
..write('checksum: $checksum, ')
..write('isFavorite: $isFavorite, ')
@@ -1409,7 +1404,7 @@ class RemoteAssetEntityData extends i0.DataClass
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
id,
checksum,
isFavorite,
@@ -1433,7 +1428,7 @@ class RemoteAssetEntityData extends i0.DataClass
other.updatedAt == this.updatedAt &&
other.width == this.width &&
other.height == this.height &&
- other.durationInSeconds == this.durationInSeconds &&
+ other.durationMs == this.durationMs &&
other.id == this.id &&
other.checksum == this.checksum &&
other.isFavorite == this.isFavorite &&
@@ -1456,7 +1451,7 @@ class RemoteAssetEntityCompanion
final i0.Value<DateTime> updatedAt;
final i0.Value<int?> width;
final i0.Value<int?> height;
- final i0.Value<int?> durationInSeconds;
+ final i0.Value<int?> durationMs;
final i0.Value<String> id;
final i0.Value<String> checksum;
final i0.Value<bool> isFavorite;
@@ -1476,7 +1471,7 @@ class RemoteAssetEntityCompanion
this.updatedAt = const i0.Value.absent(),
this.width = const i0.Value.absent(),
this.height = const i0.Value.absent(),
- this.durationInSeconds = const i0.Value.absent(),
+ this.durationMs = const i0.Value.absent(),
this.id = const i0.Value.absent(),
this.checksum = const i0.Value.absent(),
this.isFavorite = const i0.Value.absent(),
@@ -1497,7 +1492,7 @@ class RemoteAssetEntityCompanion
this.updatedAt = const i0.Value.absent(),
this.width = const i0.Value.absent(),
this.height = const i0.Value.absent(),
- this.durationInSeconds = const i0.Value.absent(),
+ this.durationMs = const i0.Value.absent(),
required String id,
required String checksum,
this.isFavorite = const i0.Value.absent(),
@@ -1523,7 +1518,7 @@ class RemoteAssetEntityCompanion
i0.Expression<DateTime>? updatedAt,
i0.Expression<int>? width,
i0.Expression<int>? height,
- i0.Expression<int>? durationInSeconds,
+ i0.Expression<int>? durationMs,
i0.Expression<String>? id,
i0.Expression<String>? checksum,
i0.Expression<bool>? isFavorite,
@@ -1544,7 +1539,7 @@ class RemoteAssetEntityCompanion
if (updatedAt != null) 'updated_at': updatedAt,
if (width != null) 'width': width,
if (height != null) 'height': height,
- if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,
+ if (durationMs != null) 'duration_ms': durationMs,
if (id != null) 'id': id,
if (checksum != null) 'checksum': checksum,
if (isFavorite != null) 'is_favorite': isFavorite,
@@ -1567,7 +1562,7 @@ class RemoteAssetEntityCompanion
i0.Value<DateTime>? updatedAt,
i0.Value<int?>? width,
i0.Value<int?>? height,
- i0.Value<int?>? durationInSeconds,
+ i0.Value<int?>? durationMs,
i0.Value<String>? id,
i0.Value<String>? checksum,
i0.Value<bool>? isFavorite,
@@ -1588,7 +1583,7 @@ class RemoteAssetEntityCompanion
updatedAt: updatedAt ?? this.updatedAt,
width: width ?? this.width,
height: height ?? this.height,
- durationInSeconds: durationInSeconds ?? this.durationInSeconds,
+ durationMs: durationMs ?? this.durationMs,
id: id ?? this.id,
checksum: checksum ?? this.checksum,
isFavorite: isFavorite ?? this.isFavorite,
@@ -1627,8 +1622,8 @@ class RemoteAssetEntityCompanion
if (height.present) {
map['height'] = i0.Variable<int>(height.value);
}
- if (durationInSeconds.present) {
- map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds.value);
+ if (durationMs.present) {
+ map['duration_ms'] = i0.Variable<int>(durationMs.value);
}
if (id.present) {
map['id'] = i0.Variable<String>(id.value);
@@ -1680,7 +1675,7 @@ class RemoteAssetEntityCompanion
..write('updatedAt: $updatedAt, ')
..write('width: $width, ')
..write('height: $height, ')
- ..write('durationInSeconds: $durationInSeconds, ')
+ ..write('durationMs: $durationMs, ')
..write('id: $id, ')
..write('checksum: $checksum, ')
..write('isFavorite: $isFavorite, ')
diff --git a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart
index 4a8a374f20..6bcff5d591 100644
--- a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart
+++ b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.dart
@@ -42,7 +42,7 @@ extension TrashedLocalAssetEntityDataDomainExtension on TrashedLocalAssetEntityD
type: type,
createdAt: createdAt,
updatedAt: updatedAt,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
isFavorite: isFavorite,
height: height,
width: width,
diff --git a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart
index 84be6289b8..068d008e92 100644
--- a/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart
+++ b/mobile/lib/infrastructure/entities/trashed_local_asset.entity.drift.dart
@@ -16,7 +16,7 @@ typedef $$TrashedLocalAssetEntityTableCreateCompanionBuilder =
i0.Value<DateTime> updatedAt,
i0.Value<int?> width,
i0.Value<int?> height,
- i0.Value<int?> durationInSeconds,
+ i0.Value<int?> durationMs,
required String id,
required String albumId,
i0.Value<String?> checksum,
@@ -33,7 +33,7 @@ typedef $$TrashedLocalAssetEntityTableUpdateCompanionBuilder =
i0.Value<DateTime> updatedAt,
i0.Value<int?> width,
i0.Value<int?> height,
- i0.Value<int?> durationInSeconds,
+ i0.Value<int?> durationMs,
i0.Value<String> id,
i0.Value<String> albumId,
i0.Value<String?> checksum,
@@ -84,8 +84,8 @@ class $$TrashedLocalAssetEntityTableFilterComposer
builder: (column) => i0.ColumnFilters(column),
);
- i0.ColumnFilters<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.ColumnFilters<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => i0.ColumnFilters(column),
);
@@ -171,8 +171,8 @@ class $$TrashedLocalAssetEntityTableOrderingComposer
builder: (column) => i0.ColumnOrderings(column),
);
- i0.ColumnOrderings<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.ColumnOrderings<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => i0.ColumnOrderings(column),
);
@@ -240,8 +240,8 @@ class $$TrashedLocalAssetEntityTableAnnotationComposer
i0.GeneratedColumn<int> get height =>
$composableBuilder(column: $table.height, builder: (column) => column);
- i0.GeneratedColumn<int> get durationInSeconds => $composableBuilder(
- column: $table.durationInSeconds,
+ i0.GeneratedColumn<int> get durationMs => $composableBuilder(
+ column: $table.durationMs,
builder: (column) => column,
);
@@ -326,7 +326,7 @@ class $$TrashedLocalAssetEntityTableTableManager
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
i0.Value<String> id = const i0.Value.absent(),
i0.Value<String> albumId = const i0.Value.absent(),
i0.Value<String?> checksum = const i0.Value.absent(),
@@ -342,7 +342,7 @@ class $$TrashedLocalAssetEntityTableTableManager
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
id: id,
albumId: albumId,
checksum: checksum,
@@ -359,7 +359,7 @@ class $$TrashedLocalAssetEntityTableTableManager
i0.Value<DateTime> updatedAt = const i0.Value.absent(),
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
required String id,
required String albumId,
i0.Value<String?> checksum = const i0.Value.absent(),
@@ -375,7 +375,7 @@ class $$TrashedLocalAssetEntityTableTableManager
updatedAt: updatedAt,
width: width,
height: height,
- durationInSeconds: durationInSeconds,
+ durationMs: durationMs,
id: id,
albumId: albumId,
checksum: checksum,
@@ -498,17 +498,17 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
type: i0.DriftSqlType.int,
requiredDuringInsert: false,
);
- static const i0.VerificationMeta _durationInSecondsMeta =
- const i0.VerificationMeta('durationInSeconds');
+ static const i0.VerificationMeta _durationMsMeta = const i0.VerificationMeta(
+ 'durationMs',
+ );
@override
- late final i0.GeneratedColumn<int> durationInSeconds =
- i0.GeneratedColumn<int>(
- 'duration_in_seconds',
- aliasedName,
- true,
- type: i0.DriftSqlType.int,
- requiredDuringInsert: false,
- );
+ late final i0.GeneratedColumn<int> durationMs = i0.GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: i0.DriftSqlType.int,
+ requiredDuringInsert: false,
+ );
static const i0.VerificationMeta _idMeta = const i0.VerificationMeta('id');
@override
late final i0.GeneratedColumn<String> id = i0.GeneratedColumn<String>(
@@ -599,7 +599,7 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
id,
albumId,
checksum,
@@ -652,13 +652,10 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
height.isAcceptableOrUnknown(data['height']!, _heightMeta),
);
}
- if (data.containsKey('duration_in_seconds')) {
+ if (data.containsKey('duration_ms')) {
context.handle(
- _durationInSecondsMeta,
- durationInSeconds.isAcceptableOrUnknown(
- data['duration_in_seconds']!,
- _durationInSecondsMeta,
- ),
+ _durationMsMeta,
+ durationMs.isAcceptableOrUnknown(data['duration_ms']!, _durationMsMeta),
);
}
if (data.containsKey('id')) {
@@ -733,9 +730,9 @@ class $TrashedLocalAssetEntityTable extends i3.TrashedLocalAssetEntity
i0.DriftSqlType.int,
data['${effectivePrefix}height'],
),
- durationInSeconds: attachedDatabase.typeMapping.read(
+ durationMs: attachedDatabase.typeMapping.read(
i0.DriftSqlType.int,
- data['${effectivePrefix}duration_in_seconds'],
+ data['${effectivePrefix}duration_ms'],
),
id: attachedDatabase.typeMapping.read(
i0.DriftSqlType.string,
@@ -800,7 +797,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
final DateTime updatedAt;
final int? width;
final int? height;
- final int? durationInSeconds;
+ final int? durationMs;
final String id;
final String albumId;
final String? checksum;
@@ -815,7 +812,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
required this.updatedAt,
this.width,
this.height,
- this.durationInSeconds,
+ this.durationMs,
required this.id,
required this.albumId,
this.checksum,
@@ -841,8 +838,8 @@ class TrashedLocalAssetEntityData extends i0.DataClass
if (!nullToAbsent || height != null) {
map['height'] = i0.Variable<int>(height);
}
- if (!nullToAbsent || durationInSeconds != null) {
- map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds);
+ if (!nullToAbsent || durationMs != null) {
+ map['duration_ms'] = i0.Variable<int>(durationMs);
}
map['id'] = i0.Variable<String>(id);
map['album_id'] = i0.Variable<String>(albumId);
@@ -880,7 +877,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
updatedAt: serializer.fromJson<DateTime>(json['updatedAt']),
width: serializer.fromJson<int?>(json['width']),
height: serializer.fromJson<int?>(json['height']),
- durationInSeconds: serializer.fromJson<int?>(json['durationInSeconds']),
+ durationMs: serializer.fromJson<int?>(json['durationMs']),
id: serializer.fromJson<String>(json['id']),
albumId: serializer.fromJson<String>(json['albumId']),
checksum: serializer.fromJson<String?>(json['checksum']),
@@ -905,7 +902,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
'updatedAt': serializer.toJson<DateTime>(updatedAt),
'width': serializer.toJson<int?>(width),
'height': serializer.toJson<int?>(height),
- 'durationInSeconds': serializer.toJson<int?>(durationInSeconds),
+ 'durationMs': serializer.toJson<int?>(durationMs),
'id': serializer.toJson<String>(id),
'albumId': serializer.toJson<String>(albumId),
'checksum': serializer.toJson<String?>(checksum),
@@ -929,7 +926,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
DateTime? updatedAt,
i0.Value<int?> width = const i0.Value.absent(),
i0.Value<int?> height = const i0.Value.absent(),
- i0.Value<int?> durationInSeconds = const i0.Value.absent(),
+ i0.Value<int?> durationMs = const i0.Value.absent(),
String? id,
String? albumId,
i0.Value<String?> checksum = const i0.Value.absent(),
@@ -944,9 +941,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
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,
+ durationMs: durationMs.present ? durationMs.value : this.durationMs,
id: id ?? this.id,
albumId: albumId ?? this.albumId,
checksum: checksum.present ? checksum.value : this.checksum,
@@ -965,9 +960,9 @@ class TrashedLocalAssetEntityData extends i0.DataClass
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,
+ durationMs: data.durationMs.present
+ ? data.durationMs.value
+ : this.durationMs,
id: data.id.present ? data.id.value : this.id,
albumId: data.albumId.present ? data.albumId.value : this.albumId,
checksum: data.checksum.present ? data.checksum.value : this.checksum,
@@ -993,7 +988,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
..write('updatedAt: $updatedAt, ')
..write('width: $width, ')
..write('height: $height, ')
- ..write('durationInSeconds: $durationInSeconds, ')
+ ..write('durationMs: $durationMs, ')
..write('id: $id, ')
..write('albumId: $albumId, ')
..write('checksum: $checksum, ')
@@ -1013,7 +1008,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
id,
albumId,
checksum,
@@ -1032,7 +1027,7 @@ class TrashedLocalAssetEntityData extends i0.DataClass
other.updatedAt == this.updatedAt &&
other.width == this.width &&
other.height == this.height &&
- other.durationInSeconds == this.durationInSeconds &&
+ other.durationMs == this.durationMs &&
other.id == this.id &&
other.albumId == this.albumId &&
other.checksum == this.checksum &&
@@ -1050,7 +1045,7 @@ class TrashedLocalAssetEntityCompanion
final i0.Value<DateTime> updatedAt;
final i0.Value<int?> width;
final i0.Value<int?> height;
- final i0.Value<int?> durationInSeconds;
+ final i0.Value<int?> durationMs;
final i0.Value<String> id;
final i0.Value<String> albumId;
final i0.Value<String?> checksum;
@@ -1065,7 +1060,7 @@ class TrashedLocalAssetEntityCompanion
this.updatedAt = const i0.Value.absent(),
this.width = const i0.Value.absent(),
this.height = const i0.Value.absent(),
- this.durationInSeconds = const i0.Value.absent(),
+ this.durationMs = const i0.Value.absent(),
this.id = const i0.Value.absent(),
this.albumId = const i0.Value.absent(),
this.checksum = const i0.Value.absent(),
@@ -1081,7 +1076,7 @@ class TrashedLocalAssetEntityCompanion
this.updatedAt = const i0.Value.absent(),
this.width = const i0.Value.absent(),
this.height = const i0.Value.absent(),
- this.durationInSeconds = const i0.Value.absent(),
+ this.durationMs = const i0.Value.absent(),
required String id,
required String albumId,
this.checksum = const i0.Value.absent(),
@@ -1101,7 +1096,7 @@ class TrashedLocalAssetEntityCompanion
i0.Expression<DateTime>? updatedAt,
i0.Expression<int>? width,
i0.Expression<int>? height,
- i0.Expression<int>? durationInSeconds,
+ i0.Expression<int>? durationMs,
i0.Expression<String>? id,
i0.Expression<String>? albumId,
i0.Expression<String>? checksum,
@@ -1117,7 +1112,7 @@ class TrashedLocalAssetEntityCompanion
if (updatedAt != null) 'updated_at': updatedAt,
if (width != null) 'width': width,
if (height != null) 'height': height,
- if (durationInSeconds != null) 'duration_in_seconds': durationInSeconds,
+ if (durationMs != null) 'duration_ms': durationMs,
if (id != null) 'id': id,
if (albumId != null) 'album_id': albumId,
if (checksum != null) 'checksum': checksum,
@@ -1135,7 +1130,7 @@ class TrashedLocalAssetEntityCompanion
i0.Value<DateTime>? updatedAt,
i0.Value<int?>? width,
i0.Value<int?>? height,
- i0.Value<int?>? durationInSeconds,
+ i0.Value<int?>? durationMs,
i0.Value<String>? id,
i0.Value<String>? albumId,
i0.Value<String?>? checksum,
@@ -1151,7 +1146,7 @@ class TrashedLocalAssetEntityCompanion
updatedAt: updatedAt ?? this.updatedAt,
width: width ?? this.width,
height: height ?? this.height,
- durationInSeconds: durationInSeconds ?? this.durationInSeconds,
+ durationMs: durationMs ?? this.durationMs,
id: id ?? this.id,
albumId: albumId ?? this.albumId,
checksum: checksum ?? this.checksum,
@@ -1185,8 +1180,8 @@ class TrashedLocalAssetEntityCompanion
if (height.present) {
map['height'] = i0.Variable<int>(height.value);
}
- if (durationInSeconds.present) {
- map['duration_in_seconds'] = i0.Variable<int>(durationInSeconds.value);
+ if (durationMs.present) {
+ map['duration_ms'] = i0.Variable<int>(durationMs.value);
}
if (id.present) {
map['id'] = i0.Variable<String>(id.value);
@@ -1227,7 +1222,7 @@ class TrashedLocalAssetEntityCompanion
..write('updatedAt: $updatedAt, ')
..write('width: $width, ')
..write('height: $height, ')
- ..write('durationInSeconds: $durationInSeconds, ')
+ ..write('durationMs: $durationMs, ')
..write('id: $id, ')
..write('albumId: $albumId, ')
..write('checksum: $checksum, ')
diff --git a/mobile/lib/infrastructure/repositories/db.repository.dart b/mobile/lib/infrastructure/repositories/db.repository.dart
index eca8810b91..371a7bace5 100644
--- a/mobile/lib/infrastructure/repositories/db.repository.dart
+++ b/mobile/lib/infrastructure/repositories/db.repository.dart
@@ -10,6 +10,7 @@ import 'package:immich_mobile/infrastructure/entities/exif.entity.dart';
import 'package:immich_mobile/infrastructure/entities/local_album.entity.dart';
import 'package:immich_mobile/infrastructure/entities/local_album_asset.entity.dart';
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.dart';
+import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart';
import 'package:immich_mobile/infrastructure/entities/memory.entity.dart';
import 'package:immich_mobile/infrastructure/entities/memory_asset.entity.dart';
import 'package:immich_mobile/infrastructure/entities/partner.entity.dart';
@@ -18,10 +19,12 @@ import 'package:immich_mobile/infrastructure/entities/remote_album.entity.dart';
import 'package:immich_mobile/infrastructure/entities/remote_album_asset.entity.dart';
import 'package:immich_mobile/infrastructure/entities/remote_album_user.entity.dart';
import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.dart';
+import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.dart';
import 'package:immich_mobile/infrastructure/entities/remote_asset_cloud_id.entity.dart';
import 'package:immich_mobile/infrastructure/entities/stack.entity.dart';
import 'package:immich_mobile/infrastructure/entities/store.entity.dart';
import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.dart';
+import 'package:immich_mobile/infrastructure/entities/trashed_local_asset.entity.drift.dart';
import 'package:immich_mobile/infrastructure/entities/user.entity.dart';
import 'package:immich_mobile/infrastructure/entities/user_metadata.entity.dart';
import 'package:immich_mobile/infrastructure/repositories/db.repository.drift.dart';
@@ -81,7 +84,7 @@ class Drift extends $Drift {
}
@override
- int get schemaVersion => 22;
+ int get schemaVersion => 23;
@override
MigrationStrategy get migration => MigrationStrategy(
@@ -222,6 +225,27 @@ class Drift extends $Drift {
await m.createTable(v22.assetEditEntity);
await m.createIndex(v22.idxAssetEditAssetId);
},
+ from22To23: (m, v23) async {
+ await m.renameColumn(v23.localAssetEntity, 'duration_in_seconds', v23.localAssetEntity.durationMs);
+ await m.renameColumn(v23.remoteAssetEntity, 'duration_in_seconds', v23.remoteAssetEntity.durationMs);
+ await m.renameColumn(
+ v23.trashedLocalAssetEntity,
+ 'duration_in_seconds',
+ v23.trashedLocalAssetEntity.durationMs,
+ );
+
+ await localAssetEntity.update().write(
+ LocalAssetEntityCompanion.custom(durationMs: v23.localAssetEntity.durationMs * const Constant(1000)),
+ );
+ await remoteAssetEntity.update().write(
+ RemoteAssetEntityCompanion.custom(durationMs: v23.remoteAssetEntity.durationMs * const Constant(1000)),
+ );
+ await trashedLocalAssetEntity.update().write(
+ TrashedLocalAssetEntityCompanion.custom(
+ durationMs: v23.trashedLocalAssetEntity.durationMs * const Constant(1000),
+ ),
+ );
+ },
),
);
diff --git a/mobile/lib/infrastructure/repositories/db.repository.steps.dart b/mobile/lib/infrastructure/repositories/db.repository.steps.dart
index 379f37169d..795a45b21b 100644
--- a/mobile/lib/infrastructure/repositories/db.repository.steps.dart
+++ b/mobile/lib/infrastructure/repositories/db.repository.steps.dart
@@ -2,9 +2,10 @@
import 'package:drift/internal/versioned_schema.dart' as i0;
import 'package:drift/drift.dart' as i1;
import 'dart:typed_data' as i2;
-import 'package:drift/drift.dart'; // ignore_for_file: type=lint,unused_import
+import 'package:drift/drift.dart'; // GENERATED BY drift_dev, DO NOT MODIFY.
-// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
final class Schema2 extends i0.VersionedSchema {
Schema2({required super.database}) : super(version: 2);
@override
@@ -10048,6 +10049,1781 @@ i1.GeneratedColumn<int> _column_106(String aliasedName) =>
false,
type: i1.DriftSqlType.int,
);
+
+final class Schema23 extends i0.VersionedSchema {
+ Schema23({required super.database}) : super(version: 23);
+ @override
+ late final List<i1.DatabaseSchemaEntity> entities = [
+ userEntity,
+ remoteAssetEntity,
+ stackEntity,
+ localAssetEntity,
+ remoteAlbumEntity,
+ localAlbumEntity,
+ localAlbumAssetEntity,
+ idxLocalAlbumAssetAlbumAsset,
+ idxRemoteAlbumOwnerId,
+ idxLocalAssetChecksum,
+ idxLocalAssetCloudId,
+ idxStackPrimaryAssetId,
+ idxRemoteAssetOwnerChecksum,
+ uQRemoteAssetsOwnerChecksum,
+ uQRemoteAssetsOwnerLibraryChecksum,
+ idxRemoteAssetChecksum,
+ idxRemoteAssetStackId,
+ idxRemoteAssetLocalDateTimeDay,
+ idxRemoteAssetLocalDateTimeMonth,
+ authUserEntity,
+ userMetadataEntity,
+ partnerEntity,
+ remoteExifEntity,
+ remoteAlbumAssetEntity,
+ remoteAlbumUserEntity,
+ remoteAssetCloudIdEntity,
+ memoryEntity,
+ memoryAssetEntity,
+ personEntity,
+ assetFaceEntity,
+ storeEntity,
+ trashedLocalAssetEntity,
+ assetEditEntity,
+ idxPartnerSharedWithId,
+ idxLatLng,
+ idxRemoteAlbumAssetAlbumAsset,
+ idxRemoteAssetCloudId,
+ idxPersonOwnerId,
+ idxAssetFacePersonId,
+ idxAssetFaceAssetId,
+ idxTrashedLocalAssetChecksum,
+ idxTrashedLocalAssetAlbum,
+ idxAssetEditAssetId,
+ ];
+ late final Shape33 userEntity = Shape33(
+ source: i0.VersionedTable(
+ entityName: 'user_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_108,
+ _column_109,
+ _column_110,
+ _column_111,
+ _column_112,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape34 remoteAssetEntity = Shape34(
+ source: i0.VersionedTable(
+ entityName: 'remote_asset_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_108,
+ _column_113,
+ _column_114,
+ _column_115,
+ _column_116,
+ _column_117,
+ _column_118,
+ _column_107,
+ _column_119,
+ _column_120,
+ _column_121,
+ _column_122,
+ _column_123,
+ _column_124,
+ _column_125,
+ _column_126,
+ _column_127,
+ _column_128,
+ _column_129,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape35 stackEntity = Shape35(
+ source: i0.VersionedTable(
+ entityName: 'stack_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_114,
+ _column_115,
+ _column_121,
+ _column_130,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape36 localAssetEntity = Shape36(
+ source: i0.VersionedTable(
+ entityName: 'local_asset_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_108,
+ _column_113,
+ _column_114,
+ _column_115,
+ _column_116,
+ _column_117,
+ _column_118,
+ _column_107,
+ _column_131,
+ _column_120,
+ _column_132,
+ _column_133,
+ _column_134,
+ _column_135,
+ _column_136,
+ _column_137,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape37 remoteAlbumEntity = Shape37(
+ source: i0.VersionedTable(
+ entityName: 'remote_album_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_108,
+ _column_138,
+ _column_114,
+ _column_115,
+ _column_121,
+ _column_139,
+ _column_140,
+ _column_141,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape38 localAlbumEntity = Shape38(
+ source: i0.VersionedTable(
+ entityName: 'local_album_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_108,
+ _column_115,
+ _column_142,
+ _column_143,
+ _column_144,
+ _column_145,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape39 localAlbumAssetEntity = Shape39(
+ source: i0.VersionedTable(
+ entityName: 'local_album_asset_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(asset_id, album_id)'],
+ columns: [_column_146, _column_147, _column_145],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ final i1.Index idxLocalAlbumAssetAlbumAsset = i1.Index(
+ 'idx_local_album_asset_album_asset',
+ 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)',
+ );
+ final i1.Index idxRemoteAlbumOwnerId = i1.Index(
+ 'idx_remote_album_owner_id',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)',
+ );
+ final i1.Index idxLocalAssetChecksum = i1.Index(
+ 'idx_local_asset_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)',
+ );
+ final i1.Index idxLocalAssetCloudId = i1.Index(
+ 'idx_local_asset_cloud_id',
+ 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)',
+ );
+ final i1.Index idxStackPrimaryAssetId = i1.Index(
+ 'idx_stack_primary_asset_id',
+ 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)',
+ );
+ final i1.Index idxRemoteAssetOwnerChecksum = i1.Index(
+ 'idx_remote_asset_owner_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)',
+ );
+ final i1.Index uQRemoteAssetsOwnerChecksum = i1.Index(
+ 'UQ_remote_assets_owner_checksum',
+ 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)',
+ );
+ final i1.Index uQRemoteAssetsOwnerLibraryChecksum = i1.Index(
+ 'UQ_remote_assets_owner_library_checksum',
+ 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)',
+ );
+ final i1.Index idxRemoteAssetChecksum = i1.Index(
+ 'idx_remote_asset_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)',
+ );
+ final i1.Index idxRemoteAssetStackId = i1.Index(
+ 'idx_remote_asset_stack_id',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)',
+ );
+ final i1.Index idxRemoteAssetLocalDateTimeDay = i1.Index(
+ 'idx_remote_asset_local_date_time_day',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))',
+ );
+ final i1.Index idxRemoteAssetLocalDateTimeMonth = i1.Index(
+ 'idx_remote_asset_local_date_time_month',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))',
+ );
+ late final Shape40 authUserEntity = Shape40(
+ source: i0.VersionedTable(
+ entityName: 'auth_user_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_108,
+ _column_109,
+ _column_148,
+ _column_110,
+ _column_111,
+ _column_149,
+ _column_150,
+ _column_151,
+ _column_152,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape4 userMetadataEntity = Shape4(
+ source: i0.VersionedTable(
+ entityName: 'user_metadata_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(user_id, "key")'],
+ columns: [_column_153, _column_154, _column_155],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape41 partnerEntity = Shape41(
+ source: i0.VersionedTable(
+ entityName: 'partner_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(shared_by_id, shared_with_id)'],
+ columns: [_column_156, _column_157, _column_158],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape42 remoteExifEntity = Shape42(
+ source: i0.VersionedTable(
+ entityName: 'remote_exif_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(asset_id)'],
+ columns: [
+ _column_159,
+ _column_160,
+ _column_161,
+ _column_162,
+ _column_163,
+ _column_164,
+ _column_117,
+ _column_116,
+ _column_165,
+ _column_166,
+ _column_167,
+ _column_168,
+ _column_135,
+ _column_136,
+ _column_169,
+ _column_170,
+ _column_171,
+ _column_172,
+ _column_173,
+ _column_174,
+ _column_175,
+ _column_176,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape7 remoteAlbumAssetEntity = Shape7(
+ source: i0.VersionedTable(
+ entityName: 'remote_album_asset_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(asset_id, album_id)'],
+ columns: [_column_159, _column_177],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape10 remoteAlbumUserEntity = Shape10(
+ source: i0.VersionedTable(
+ entityName: 'remote_album_user_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(album_id, user_id)'],
+ columns: [_column_177, _column_153, _column_178],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape43 remoteAssetCloudIdEntity = Shape43(
+ source: i0.VersionedTable(
+ entityName: 'remote_asset_cloud_id_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(asset_id)'],
+ columns: [
+ _column_159,
+ _column_179,
+ _column_180,
+ _column_134,
+ _column_135,
+ _column_136,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape44 memoryEntity = Shape44(
+ source: i0.VersionedTable(
+ entityName: 'memory_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_114,
+ _column_115,
+ _column_124,
+ _column_121,
+ _column_113,
+ _column_181,
+ _column_182,
+ _column_183,
+ _column_184,
+ _column_185,
+ _column_186,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape12 memoryAssetEntity = Shape12(
+ source: i0.VersionedTable(
+ entityName: 'memory_asset_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(asset_id, memory_id)'],
+ columns: [_column_159, _column_187],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape45 personEntity = Shape45(
+ source: i0.VersionedTable(
+ entityName: 'person_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_114,
+ _column_115,
+ _column_121,
+ _column_108,
+ _column_188,
+ _column_189,
+ _column_190,
+ _column_191,
+ _column_192,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape46 assetFaceEntity = Shape46(
+ source: i0.VersionedTable(
+ entityName: 'asset_face_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_159,
+ _column_193,
+ _column_194,
+ _column_195,
+ _column_196,
+ _column_197,
+ _column_198,
+ _column_199,
+ _column_200,
+ _column_201,
+ _column_124,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape18 storeEntity = Shape18(
+ source: i0.VersionedTable(
+ entityName: 'store_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [_column_202, _column_203, _column_204],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape47 trashedLocalAssetEntity = Shape47(
+ source: i0.VersionedTable(
+ entityName: 'trashed_local_asset_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id, album_id)'],
+ columns: [
+ _column_108,
+ _column_113,
+ _column_114,
+ _column_115,
+ _column_116,
+ _column_117,
+ _column_118,
+ _column_107,
+ _column_205,
+ _column_131,
+ _column_120,
+ _column_132,
+ _column_206,
+ _column_137,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ late final Shape32 assetEditEntity = Shape32(
+ source: i0.VersionedTable(
+ entityName: 'asset_edit_entity',
+ withoutRowId: true,
+ isStrict: true,
+ tableConstraints: ['PRIMARY KEY(id)'],
+ columns: [
+ _column_107,
+ _column_159,
+ _column_207,
+ _column_208,
+ _column_209,
+ ],
+ attachedDatabase: database,
+ ),
+ alias: null,
+ );
+ final i1.Index idxPartnerSharedWithId = i1.Index(
+ 'idx_partner_shared_with_id',
+ 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)',
+ );
+ final i1.Index idxLatLng = i1.Index(
+ 'idx_lat_lng',
+ 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)',
+ );
+ final i1.Index idxRemoteAlbumAssetAlbumAsset = i1.Index(
+ 'idx_remote_album_asset_album_asset',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)',
+ );
+ final i1.Index idxRemoteAssetCloudId = i1.Index(
+ 'idx_remote_asset_cloud_id',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)',
+ );
+ final i1.Index idxPersonOwnerId = i1.Index(
+ 'idx_person_owner_id',
+ 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)',
+ );
+ final i1.Index idxAssetFacePersonId = i1.Index(
+ 'idx_asset_face_person_id',
+ 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)',
+ );
+ final i1.Index idxAssetFaceAssetId = i1.Index(
+ 'idx_asset_face_asset_id',
+ 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)',
+ );
+ final i1.Index idxTrashedLocalAssetChecksum = i1.Index(
+ 'idx_trashed_local_asset_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)',
+ );
+ final i1.Index idxTrashedLocalAssetAlbum = i1.Index(
+ 'idx_trashed_local_asset_album',
+ 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)',
+ );
+ final i1.Index idxAssetEditAssetId = i1.Index(
+ 'idx_asset_edit_asset_id',
+ 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)',
+ );
+}
+
+class Shape33 extends i0.VersionedTable {
+ Shape33({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get email =>
+ columnsByName['email']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get hasProfileImage =>
+ columnsByName['has_profile_image']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get profileChangedAt =>
+ columnsByName['profile_changed_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get avatarColor =>
+ columnsByName['avatar_color']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<String> _column_107(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_108(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_109(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'email',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_110(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'has_profile_image',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints:
+ 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<String> _column_111(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'profile_changed_at',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const i1.CustomExpression('CURRENT_TIMESTAMP'),
+ );
+i1.GeneratedColumn<int> _column_112(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'avatar_color',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+
+class Shape34 extends i0.VersionedTable {
+ Shape34({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get type =>
+ columnsByName['type']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get width =>
+ columnsByName['width']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get height =>
+ columnsByName['height']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get durationMs =>
+ columnsByName['duration_ms']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get checksum =>
+ columnsByName['checksum']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isFavorite =>
+ columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get ownerId =>
+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get localDateTime =>
+ columnsByName['local_date_time']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get thumbHash =>
+ columnsByName['thumb_hash']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get deletedAt =>
+ columnsByName['deleted_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get livePhotoVideoId =>
+ columnsByName['live_photo_video_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get visibility =>
+ columnsByName['visibility']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get stackId =>
+ columnsByName['stack_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get libraryId =>
+ columnsByName['library_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isEdited =>
+ columnsByName['is_edited']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<int> _column_113(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'type',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_114(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const i1.CustomExpression('CURRENT_TIMESTAMP'),
+ );
+i1.GeneratedColumn<String> _column_115(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const i1.CustomExpression('CURRENT_TIMESTAMP'),
+ );
+i1.GeneratedColumn<int> _column_116(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'width',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_117(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'height',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_118(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_119(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'checksum',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_120(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_favorite',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<String> _column_121(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'owner_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<String> _column_122(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'local_date_time',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_123(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'thumb_hash',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_124(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'deleted_at',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_125(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'live_photo_video_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_126(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'visibility',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_127(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'stack_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_128(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'library_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_129(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_edited',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+
+class Shape35 extends i0.VersionedTable {
+ Shape35({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get ownerId =>
+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get primaryAssetId =>
+ columnsByName['primary_asset_id']! as i1.GeneratedColumn<String>;
+}
+
+i1.GeneratedColumn<String> _column_130(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'primary_asset_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+
+class Shape36 extends i0.VersionedTable {
+ Shape36({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get type =>
+ columnsByName['type']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get width =>
+ columnsByName['width']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get height =>
+ columnsByName['height']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get durationMs =>
+ columnsByName['duration_ms']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get checksum =>
+ columnsByName['checksum']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isFavorite =>
+ columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get orientation =>
+ columnsByName['orientation']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get iCloudId =>
+ columnsByName['i_cloud_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get adjustmentTime =>
+ columnsByName['adjustment_time']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<double> get latitude =>
+ columnsByName['latitude']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<double> get longitude =>
+ columnsByName['longitude']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<int> get playbackStyle =>
+ columnsByName['playback_style']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<String> _column_131(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'checksum',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_132(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'orientation',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<String> _column_133(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'i_cloud_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_134(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'adjustment_time',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<double> _column_135(String aliasedName) =>
+ i1.GeneratedColumn<double>(
+ 'latitude',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.double,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<double> _column_136(String aliasedName) =>
+ i1.GeneratedColumn<double>(
+ 'longitude',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.double,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_137(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'playback_style',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+
+class Shape37 extends i0.VersionedTable {
+ Shape37({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get description =>
+ columnsByName['description']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get ownerId =>
+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get thumbnailAssetId =>
+ columnsByName['thumbnail_asset_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isActivityEnabled =>
+ columnsByName['is_activity_enabled']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get order =>
+ columnsByName['order']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<String> _column_138(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'description',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL DEFAULT \'\'',
+ defaultValue: const i1.CustomExpression('\'\''),
+ );
+i1.GeneratedColumn<String> _column_139(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'thumbnail_asset_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL',
+ );
+i1.GeneratedColumn<int> _column_140(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_activity_enabled',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints:
+ 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))',
+ defaultValue: const i1.CustomExpression('1'),
+ );
+i1.GeneratedColumn<int> _column_141(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'order',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+
+class Shape38 extends i0.VersionedTable {
+ Shape38({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get backupSelection =>
+ columnsByName['backup_selection']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get isIosSharedAlbum =>
+ columnsByName['is_ios_shared_album']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get linkedRemoteAlbumId =>
+ columnsByName['linked_remote_album_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get marker =>
+ columnsByName['marker']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<int> _column_142(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'backup_selection',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_143(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_ios_shared_album',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints:
+ 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<String> _column_144(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'linked_remote_album_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL',
+ );
+i1.GeneratedColumn<int> _column_145(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'marker',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL CHECK (marker IN (0, 1))',
+ );
+
+class Shape39 extends i0.VersionedTable {
+ Shape39({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get assetId =>
+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get albumId =>
+ columnsByName['album_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get marker =>
+ columnsByName['marker']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<String> _column_146(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<String> _column_147(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE',
+ );
+
+class Shape40 extends i0.VersionedTable {
+ Shape40({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get email =>
+ columnsByName['email']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isAdmin =>
+ columnsByName['is_admin']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get hasProfileImage =>
+ columnsByName['has_profile_image']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get profileChangedAt =>
+ columnsByName['profile_changed_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get avatarColor =>
+ columnsByName['avatar_color']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get quotaSizeInBytes =>
+ columnsByName['quota_size_in_bytes']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get quotaUsageInBytes =>
+ columnsByName['quota_usage_in_bytes']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get pinCode =>
+ columnsByName['pin_code']! as i1.GeneratedColumn<String>;
+}
+
+i1.GeneratedColumn<int> _column_148(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_admin',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<int> _column_149(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'avatar_color',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_150(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'quota_size_in_bytes',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<int> _column_151(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'quota_usage_in_bytes',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<String> _column_152(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'pin_code',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_153(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'user_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<int> _column_154(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'key',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<i2.Uint8List> _column_155(String aliasedName) =>
+ i1.GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.blob,
+ $customConstraints: 'NOT NULL',
+ );
+
+class Shape41 extends i0.VersionedTable {
+ Shape41({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get sharedById =>
+ columnsByName['shared_by_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get sharedWithId =>
+ columnsByName['shared_with_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get inTimeline =>
+ columnsByName['in_timeline']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<String> _column_156(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'shared_by_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<String> _column_157(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'shared_with_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<int> _column_158(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'in_timeline',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+
+class Shape42 extends i0.VersionedTable {
+ Shape42({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get assetId =>
+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get city =>
+ columnsByName['city']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get state =>
+ columnsByName['state']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get country =>
+ columnsByName['country']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get dateTimeOriginal =>
+ columnsByName['date_time_original']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get description =>
+ columnsByName['description']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get height =>
+ columnsByName['height']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get width =>
+ columnsByName['width']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get exposureTime =>
+ columnsByName['exposure_time']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<double> get fNumber =>
+ columnsByName['f_number']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<int> get fileSize =>
+ columnsByName['file_size']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<double> get focalLength =>
+ columnsByName['focal_length']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<double> get latitude =>
+ columnsByName['latitude']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<double> get longitude =>
+ columnsByName['longitude']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<int> get iso =>
+ columnsByName['iso']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get make =>
+ columnsByName['make']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get model =>
+ columnsByName['model']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get lens =>
+ columnsByName['lens']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get orientation =>
+ columnsByName['orientation']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get timeZone =>
+ columnsByName['time_zone']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get rating =>
+ columnsByName['rating']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get projectionType =>
+ columnsByName['projection_type']! as i1.GeneratedColumn<String>;
+}
+
+i1.GeneratedColumn<String> _column_159(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<String> _column_160(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'city',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_161(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'state',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_162(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'country',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_163(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'date_time_original',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_164(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'description',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_165(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'exposure_time',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<double> _column_166(String aliasedName) =>
+ i1.GeneratedColumn<double>(
+ 'f_number',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.double,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_167(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'file_size',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<double> _column_168(String aliasedName) =>
+ i1.GeneratedColumn<double>(
+ 'focal_length',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.double,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_169(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'iso',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_170(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'make',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_171(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'model',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_172(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'lens',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_173(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'orientation',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_174(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'time_zone',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_175(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'rating',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_176(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'projection_type',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_177(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE',
+ );
+i1.GeneratedColumn<int> _column_178(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'role',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+
+class Shape43 extends i0.VersionedTable {
+ Shape43({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get assetId =>
+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get cloudId =>
+ columnsByName['cloud_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get adjustmentTime =>
+ columnsByName['adjustment_time']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<double> get latitude =>
+ columnsByName['latitude']! as i1.GeneratedColumn<double>;
+ i1.GeneratedColumn<double> get longitude =>
+ columnsByName['longitude']! as i1.GeneratedColumn<double>;
+}
+
+i1.GeneratedColumn<String> _column_179(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'cloud_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_180(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+
+class Shape44 extends i0.VersionedTable {
+ Shape44({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get deletedAt =>
+ columnsByName['deleted_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get ownerId =>
+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get type =>
+ columnsByName['type']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get data =>
+ columnsByName['data']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isSaved =>
+ columnsByName['is_saved']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get memoryAt =>
+ columnsByName['memory_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get seenAt =>
+ columnsByName['seen_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get showAt =>
+ columnsByName['show_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get hideAt =>
+ columnsByName['hide_at']! as i1.GeneratedColumn<String>;
+}
+
+i1.GeneratedColumn<String> _column_181(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'data',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_182(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_saved',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))',
+ defaultValue: const i1.CustomExpression('0'),
+ );
+i1.GeneratedColumn<String> _column_183(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'memory_at',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_184(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'seen_at',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_185(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'show_at',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_186(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'hide_at',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_187(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'memory_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints:
+ 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE',
+ );
+
+class Shape45 extends i0.VersionedTable {
+ Shape45({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get ownerId =>
+ columnsByName['owner_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get faceAssetId =>
+ columnsByName['face_asset_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isFavorite =>
+ columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get isHidden =>
+ columnsByName['is_hidden']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get color =>
+ columnsByName['color']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get birthDate =>
+ columnsByName['birth_date']! as i1.GeneratedColumn<String>;
+}
+
+i1.GeneratedColumn<String> _column_188(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'face_asset_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_189(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_favorite',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))',
+ );
+i1.GeneratedColumn<int> _column_190(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_hidden',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))',
+ );
+i1.GeneratedColumn<String> _column_191(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'color',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<String> _column_192(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'birth_date',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+
+class Shape46 extends i0.VersionedTable {
+ Shape46({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get assetId =>
+ columnsByName['asset_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get personId =>
+ columnsByName['person_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get imageWidth =>
+ columnsByName['image_width']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get imageHeight =>
+ columnsByName['image_height']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get boundingBoxX1 =>
+ columnsByName['bounding_box_x1']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get boundingBoxY1 =>
+ columnsByName['bounding_box_y1']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get boundingBoxX2 =>
+ columnsByName['bounding_box_x2']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get boundingBoxY2 =>
+ columnsByName['bounding_box_y2']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get sourceType =>
+ columnsByName['source_type']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isVisible =>
+ columnsByName['is_visible']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get deletedAt =>
+ columnsByName['deleted_at']! as i1.GeneratedColumn<String>;
+}
+
+i1.GeneratedColumn<String> _column_193(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'person_id',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL',
+ );
+i1.GeneratedColumn<int> _column_194(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'image_width',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_195(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'image_height',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_196(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'bounding_box_x1',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_197(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'bounding_box_y1',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_198(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'bounding_box_x2',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_199(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'bounding_box_y2',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_200(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'source_type',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_201(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'is_visible',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))',
+ defaultValue: const i1.CustomExpression('1'),
+ );
+i1.GeneratedColumn<int> _column_202(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<String> _column_203(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'string_value',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NULL',
+ );
+i1.GeneratedColumn<int> _column_204(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'int_value',
+ aliasedName,
+ true,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NULL',
+ );
+
+class Shape47 extends i0.VersionedTable {
+ Shape47({required super.source, required super.alias}) : super.aliased();
+ i1.GeneratedColumn<String> get name =>
+ columnsByName['name']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get type =>
+ columnsByName['type']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get createdAt =>
+ columnsByName['created_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get updatedAt =>
+ columnsByName['updated_at']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get width =>
+ columnsByName['width']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get height =>
+ columnsByName['height']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get durationMs =>
+ columnsByName['duration_ms']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<String> get id =>
+ columnsByName['id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get albumId =>
+ columnsByName['album_id']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<String> get checksum =>
+ columnsByName['checksum']! as i1.GeneratedColumn<String>;
+ i1.GeneratedColumn<int> get isFavorite =>
+ columnsByName['is_favorite']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get orientation =>
+ columnsByName['orientation']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get source =>
+ columnsByName['source']! as i1.GeneratedColumn<int>;
+ i1.GeneratedColumn<int> get playbackStyle =>
+ columnsByName['playback_style']! as i1.GeneratedColumn<int>;
+}
+
+i1.GeneratedColumn<String> _column_205(String aliasedName) =>
+ i1.GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.string,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_206(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'source',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_207(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'action',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<i2.Uint8List> _column_208(String aliasedName) =>
+ i1.GeneratedColumn<i2.Uint8List>(
+ 'parameters',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.blob,
+ $customConstraints: 'NOT NULL',
+ );
+i1.GeneratedColumn<int> _column_209(String aliasedName) =>
+ i1.GeneratedColumn<int>(
+ 'sequence',
+ aliasedName,
+ false,
+ type: i1.DriftSqlType.int,
+ $customConstraints: 'NOT NULL',
+ );
i0.MigrationStepWithVersion migrationSteps({
required Future<void> Function(i1.Migrator m, Schema2 schema) from1To2,
required Future<void> Function(i1.Migrator m, Schema3 schema) from2To3,
@@ -10070,6 +11846,7 @@ i0.MigrationStepWithVersion migrationSteps({
required Future<void> Function(i1.Migrator m, Schema20 schema) from19To20,
required Future<void> Function(i1.Migrator m, Schema21 schema) from20To21,
required Future<void> Function(i1.Migrator m, Schema22 schema) from21To22,
+ required Future<void> Function(i1.Migrator m, Schema23 schema) from22To23,
}) {
return (currentVersion, database) async {
switch (currentVersion) {
@@ -10178,6 +11955,11 @@ i0.MigrationStepWithVersion migrationSteps({
final migrator = i1.Migrator(database, schema);
await from21To22(migrator, schema);
return 22;
+ case 22:
+ final schema = Schema23(database: database);
+ final migrator = i1.Migrator(database, schema);
+ await from22To23(migrator, schema);
+ return 23;
default:
throw ArgumentError.value('Unknown migration from $currentVersion');
}
@@ -10206,6 +11988,7 @@ i1.OnUpgrade stepByStep({
required Future<void> Function(i1.Migrator m, Schema20 schema) from19To20,
required Future<void> Function(i1.Migrator m, Schema21 schema) from20To21,
required Future<void> Function(i1.Migrator m, Schema22 schema) from21To22,
+ required Future<void> Function(i1.Migrator m, Schema23 schema) from22To23,
}) => i0.VersionedSchema.stepByStepHelper(
step: migrationSteps(
from1To2: from1To2,
@@ -10229,5 +12012,6 @@ i1.OnUpgrade stepByStep({
from19To20: from19To20,
from20To21: from20To21,
from21To22: from21To22,
+ from22To23: from22To23,
),
);
diff --git a/mobile/lib/infrastructure/repositories/local_album.repository.dart b/mobile/lib/infrastructure/repositories/local_album.repository.dart
index 87a72f02be..9b355334d4 100644
--- a/mobile/lib/infrastructure/repositories/local_album.repository.dart
+++ b/mobile/lib/infrastructure/repositories/local_album.repository.dart
@@ -297,7 +297,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository {
updatedAt: Value(asset.updatedAt),
width: Value(asset.width),
height: Value(asset.height),
- durationInSeconds: Value(asset.durationInSeconds),
+ durationMs: Value(asset.durationMs),
id: asset.id,
orientation: Value(asset.orientation),
isFavorite: Value(asset.isFavorite),
@@ -329,7 +329,7 @@ class DriftLocalAlbumRepository extends DriftDatabaseRepository {
updatedAt: Value(asset.updatedAt),
width: Value(asset.width),
height: Value(asset.height),
- durationInSeconds: Value(asset.durationInSeconds),
+ durationMs: Value(asset.durationMs),
id: asset.id,
checksum: const Value(null),
orientation: Value(asset.orientation),
diff --git a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart
index 4319ee63cf..fd8c843433 100644
--- a/mobile/lib/infrastructure/repositories/sync_stream.repository.dart
+++ b/mobile/lib/infrastructure/repositories/sync_stream.repository.dart
@@ -9,6 +9,7 @@ import 'package:immich_mobile/domain/models/asset_edit.model.dart';
import 'package:immich_mobile/domain/models/memory.model.dart';
import 'package:immich_mobile/domain/models/user.model.dart';
import 'package:immich_mobile/domain/models/user_metadata.model.dart';
+import 'package:immich_mobile/extensions/string_extensions.dart';
import 'package:immich_mobile/infrastructure/entities/asset_edit.entity.drift.dart';
import 'package:immich_mobile/infrastructure/entities/asset_face.entity.drift.dart';
import 'package:immich_mobile/infrastructure/entities/auth_user.entity.drift.dart';
@@ -190,7 +191,7 @@ class SyncStreamRepository extends DriftDatabaseRepository {
type: Value(asset.type.toAssetType()),
createdAt: Value.absentIfNull(asset.fileCreatedAt),
updatedAt: Value.absentIfNull(asset.fileModifiedAt),
- durationInSeconds: Value(asset.duration?.toDuration()?.inSeconds ?? 0),
+ durationMs: Value(asset.duration?.toDuration()?.inMilliseconds ?? 0),
checksum: Value(asset.checksum),
isFavorite: Value(asset.isFavorite),
ownerId: Value(asset.ownerId),
@@ -843,18 +844,6 @@ extension on api.UserMetadataKey {
};
}
-extension on String {
- Duration? toDuration() {
- try {
- final parts = split(':').map((e) => double.parse(e).toInt()).toList(growable: false);
-
- return Duration(hours: parts[0], minutes: parts[1], seconds: parts[2]);
- } catch (_) {
- return null;
- }
- }
-}
-
extension on UserAvatarColor {
AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == value);
}
diff --git a/mobile/lib/infrastructure/repositories/timeline.repository.dart b/mobile/lib/infrastructure/repositories/timeline.repository.dart
index 74af6dc3f0..65788f07e2 100644
--- a/mobile/lib/infrastructure/repositories/timeline.repository.dart
+++ b/mobile/lib/infrastructure/repositories/timeline.repository.dart
@@ -83,7 +83,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
width: row.width,
height: row.height,
isFavorite: row.isFavorite,
- durationInSeconds: row.durationInSeconds,
+ durationMs: row.durationMs,
livePhotoVideoId: row.livePhotoVideoId,
stackId: row.stackId,
isEdited: row.isEdited,
@@ -99,7 +99,7 @@ class DriftTimelineRepository extends DriftDatabaseRepository {
width: row.width,
height: row.height,
isFavorite: row.isFavorite,
- durationInSeconds: row.durationInSeconds,
+ durationMs: row.durationMs,
orientation: row.orientation,
playbackStyle: AssetPlaybackStyle.values[row.playbackStyle],
cloudId: row.iCloudId,
diff --git a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart
index 1195256f5e..08712588d9 100644
--- a/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart
+++ b/mobile/lib/infrastructure/repositories/trashed_local_asset.repository.dart
@@ -82,7 +82,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
updatedAt: Value(item.asset.updatedAt),
width: Value(item.asset.width),
height: Value(item.asset.height),
- durationInSeconds: Value(item.asset.durationInSeconds),
+ durationMs: Value(item.asset.durationMs),
isFavorite: Value(item.asset.isFavorite),
orientation: Value(item.asset.orientation),
playbackStyle: Value(item.asset.playbackStyle),
@@ -145,7 +145,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
type: Value(asset.type),
width: Value(asset.width),
height: Value(asset.height),
- durationInSeconds: Value(asset.durationInSeconds),
+ durationMs: Value(asset.durationMs),
isFavorite: Value(asset.isFavorite),
orientation: Value(asset.orientation),
playbackStyle: Value(asset.playbackStyle),
@@ -193,7 +193,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
updatedAt: Value(e.updatedAt),
width: Value(e.width),
height: Value(e.height),
- durationInSeconds: Value(e.durationInSeconds),
+ durationMs: Value(e.durationMs),
checksum: Value(e.checksum),
isFavorite: Value(e.isFavorite),
orientation: Value(e.orientation),
@@ -244,7 +244,7 @@ class DriftTrashedLocalAssetRepository extends DriftDatabaseRepository {
updatedAt: Value(e.asset.updatedAt),
width: Value(e.asset.width),
height: Value(e.asset.height),
- durationInSeconds: Value(e.asset.durationInSeconds),
+ durationMs: Value(e.asset.durationMs),
checksum: Value(e.asset.checksum),
isFavorite: Value(e.asset.isFavorite),
orientation: Value(e.asset.orientation),
diff --git a/mobile/lib/infrastructure/utils/asset.mixin.dart b/mobile/lib/infrastructure/utils/asset.mixin.dart
index 4e14a2919f..17e7e5d707 100644
--- a/mobile/lib/infrastructure/utils/asset.mixin.dart
+++ b/mobile/lib/infrastructure/utils/asset.mixin.dart
@@ -8,5 +8,5 @@ mixin AssetEntityMixin on Table {
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
IntColumn get width => integer().nullable()();
IntColumn get height => integer().nullable()();
- IntColumn get durationInSeconds => integer().nullable()();
+ IntColumn get durationMs => integer().nullable()();
}
diff --git a/mobile/lib/platform/native_sync_api.g.dart b/mobile/lib/platform/native_sync_api.g.dart
index 0de86f99a0..e7095663b0 100644
--- a/mobile/lib/platform/native_sync_api.g.dart
+++ b/mobile/lib/platform/native_sync_api.g.dart
@@ -97,7 +97,7 @@ class PlatformAsset {
this.updatedAt,
this.width,
this.height,
- required this.durationInSeconds,
+ required this.durationMs,
required this.orientation,
required this.isFavorite,
this.adjustmentTime,
@@ -120,7 +120,7 @@ class PlatformAsset {
int? height;
- int durationInSeconds;
+ int durationMs;
int orientation;
@@ -143,7 +143,7 @@ class PlatformAsset {
updatedAt,
width,
height,
- durationInSeconds,
+ durationMs,
orientation,
isFavorite,
adjustmentTime,
@@ -167,7 +167,7 @@ class PlatformAsset {
updatedAt: result[4] as int?,
width: result[5] as int?,
height: result[6] as int?,
- durationInSeconds: result[7]! as int,
+ durationMs: result[7]! as int,
orientation: result[8]! as int,
isFavorite: result[9]! as bool,
adjustmentTime: result[10] as int?,
@@ -193,7 +193,7 @@ class PlatformAsset {
_deepEquals(updatedAt, other.updatedAt) &&
_deepEquals(width, other.width) &&
_deepEquals(height, other.height) &&
- _deepEquals(durationInSeconds, other.durationInSeconds) &&
+ _deepEquals(durationMs, other.durationMs) &&
_deepEquals(orientation, other.orientation) &&
_deepEquals(isFavorite, other.isFavorite) &&
_deepEquals(adjustmentTime, other.adjustmentTime) &&
diff --git a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart
index 9da21c72ee..f5ceba6d0e 100644
--- a/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart
+++ b/mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart
@@ -112,10 +112,7 @@ class _AssetPropertiesSectionState extends ConsumerState<_AssetPropertiesSection
_PropertyItem(label: 'Updated At', value: asset.updatedAt.toString()),
_PropertyItem(label: 'Width', value: asset.width?.toString()),
_PropertyItem(label: 'Height', value: asset.height?.toString()),
- _PropertyItem(
- label: 'Duration',
- value: asset.durationInSeconds != null ? '${asset.durationInSeconds} seconds' : null,
- ),
+ _PropertyItem(label: 'Duration', value: asset.durationMs != null ? '${asset.durationMs} ms' : null),
_PropertyItem(label: 'Is Favorite', value: asset.isFavorite.toString()),
_PropertyItem(label: 'Live Photo Video ID', value: asset.livePhotoVideoId),
_PropertyItem(label: 'Is Edited', value: asset.isEdited.toString()),
diff --git a/mobile/pigeon/native_sync_api.dart b/mobile/pigeon/native_sync_api.dart
index cd55addd99..e215ab9447 100644
--- a/mobile/pigeon/native_sync_api.dart
+++ b/mobile/pigeon/native_sync_api.dart
@@ -32,7 +32,7 @@ class PlatformAsset {
final int? updatedAt;
final int? width;
final int? height;
- final int durationInSeconds;
+ final int durationMs;
final int orientation;
final bool isFavorite;
@@ -50,7 +50,7 @@ class PlatformAsset {
this.updatedAt,
this.width,
this.height,
- this.durationInSeconds = 0,
+ this.durationMs = 0,
this.orientation = 0,
this.isFavorite = false,
this.adjustmentTime,
diff --git a/mobile/test/domain/services/local_sync_service_test.dart b/mobile/test/domain/services/local_sync_service_test.dart
index df65fa3306..c15bf9b2d0 100644
--- a/mobile/test/domain/services/local_sync_service_test.dart
+++ b/mobile/test/domain/services/local_sync_service_test.dart
@@ -128,7 +128,7 @@ void main() {
id: 'remote-id',
name: 'remote.jpg',
type: AssetType.image.index,
- durationInSeconds: 0,
+ durationMs: 0,
orientation: 0,
isFavorite: false,
playbackStyle: PlatformAssetPlaybackStyle.image
@@ -210,7 +210,7 @@ void main() {
id: 'test-id',
name: 'test.jpg',
type: AssetType.image.index,
- durationInSeconds: 0,
+ durationMs: 0,
orientation: 0,
isFavorite: false,
createdAt: 1700000000,
diff --git a/mobile/test/drift/main/generated/schema.dart b/mobile/test/drift/main/generated/schema.dart
index 37f5ef1021..0b68a8fe6e 100644
--- a/mobile/test/drift/main/generated/schema.dart
+++ b/mobile/test/drift/main/generated/schema.dart
@@ -1,6 +1,7 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
import 'package:drift/internal/migrations.dart';
import 'schema_v1.dart' as v1;
@@ -25,6 +26,7 @@ import 'schema_v19.dart' as v19;
import 'schema_v20.dart' as v20;
import 'schema_v21.dart' as v21;
import 'schema_v22.dart' as v22;
+import 'schema_v23.dart' as v23;
class GeneratedHelper implements SchemaInstantiationHelper {
@override
@@ -74,6 +76,8 @@ class GeneratedHelper implements SchemaInstantiationHelper {
return v21.DatabaseAtV21(db);
case 22:
return v22.DatabaseAtV22(db);
+ case 23:
+ return v23.DatabaseAtV23(db);
default:
throw MissingSchemaException(version, versions);
}
@@ -102,5 +106,6 @@ class GeneratedHelper implements SchemaInstantiationHelper {
20,
21,
22,
+ 23,
];
}
diff --git a/mobile/test/drift/main/generated/schema_v1.dart b/mobile/test/drift/main/generated/schema_v1.dart
index ca9e6ca1b0..3755a2bd5c 100644
--- a/mobile/test/drift/main/generated/schema_v1.dart
+++ b/mobile/test/drift/main/generated/schema_v1.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -1974,13 +1976,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2024,7 +2027,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2035,7 +2038,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2047,7 +2050,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2056,14 +2059,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2102,7 +2105,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2111,14 +2114,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2130,7 +2133,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2149,7 +2152,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v10.dart b/mobile/test/drift/main/generated/schema_v10.dart
index ba75530242..c8d97eea37 100644
--- a/mobile/test/drift/main/generated/schema_v10.dart
+++ b/mobile/test/drift/main/generated/schema_v10.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3430,13 +3432,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3480,7 +3483,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3491,7 +3494,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3503,7 +3506,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3512,14 +3515,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3558,7 +3561,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3567,14 +3570,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3586,7 +3589,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3605,7 +3608,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v11.dart b/mobile/test/drift/main/generated/schema_v11.dart
index fe27f1bb3d..ce6508b2f7 100644
--- a/mobile/test/drift/main/generated/schema_v11.dart
+++ b/mobile/test/drift/main/generated/schema_v11.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3469,13 +3471,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3519,7 +3522,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3530,7 +3533,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3542,7 +3545,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3551,14 +3554,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3597,7 +3600,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3606,14 +3609,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3625,7 +3628,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3644,7 +3647,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v12.dart b/mobile/test/drift/main/generated/schema_v12.dart
index c42df284ec..75ca519048 100644
--- a/mobile/test/drift/main/generated/schema_v12.dart
+++ b/mobile/test/drift/main/generated/schema_v12.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3469,13 +3471,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3519,7 +3522,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3530,7 +3533,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3542,7 +3545,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3551,14 +3554,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3597,7 +3600,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3606,14 +3609,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3625,7 +3628,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3644,7 +3647,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v13.dart b/mobile/test/drift/main/generated/schema_v13.dart
index da0d853678..2afc279f74 100644
--- a/mobile/test/drift/main/generated/schema_v13.dart
+++ b/mobile/test/drift/main/generated/schema_v13.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3469,13 +3471,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3519,7 +3522,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3530,7 +3533,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3542,7 +3545,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3551,14 +3554,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3597,7 +3600,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3606,14 +3609,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3625,7 +3628,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3644,7 +3647,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v14.dart b/mobile/test/drift/main/generated/schema_v14.dart
index 242aa581f3..69aac3360f 100644
--- a/mobile/test/drift/main/generated/schema_v14.dart
+++ b/mobile/test/drift/main/generated/schema_v14.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3582,13 +3584,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3632,7 +3635,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3643,7 +3646,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3655,7 +3658,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3664,14 +3667,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3710,7 +3713,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3719,14 +3722,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3738,7 +3741,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3757,7 +3760,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v15.dart b/mobile/test/drift/main/generated/schema_v15.dart
index fa419d7395..01ac59162b 100644
--- a/mobile/test/drift/main/generated/schema_v15.dart
+++ b/mobile/test/drift/main/generated/schema_v15.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3582,13 +3584,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3632,7 +3635,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3643,7 +3646,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3655,7 +3658,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3664,14 +3667,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3710,7 +3713,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3719,14 +3722,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3738,7 +3741,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3757,7 +3760,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v16.dart b/mobile/test/drift/main/generated/schema_v16.dart
index 0690288d7f..be336a8dac 100644
--- a/mobile/test/drift/main/generated/schema_v16.dart
+++ b/mobile/test/drift/main/generated/schema_v16.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3618,13 +3620,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3668,7 +3671,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3679,7 +3682,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3691,7 +3694,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3700,14 +3703,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3746,7 +3749,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3755,14 +3758,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3774,7 +3777,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3793,7 +3796,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v17.dart b/mobile/test/drift/main/generated/schema_v17.dart
index 042c069ecd..2314eeac7c 100644
--- a/mobile/test/drift/main/generated/schema_v17.dart
+++ b/mobile/test/drift/main/generated/schema_v17.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v18.dart b/mobile/test/drift/main/generated/schema_v18.dart
index c0b1e68894..9265566c47 100644
--- a/mobile/test/drift/main/generated/schema_v18.dart
+++ b/mobile/test/drift/main/generated/schema_v18.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v19.dart b/mobile/test/drift/main/generated/schema_v19.dart
index 4a8dea806e..1e80670893 100644
--- a/mobile/test/drift/main/generated/schema_v19.dart
+++ b/mobile/test/drift/main/generated/schema_v19.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v2.dart b/mobile/test/drift/main/generated/schema_v2.dart
index 903d13b9a2..18fcc75002 100644
--- a/mobile/test/drift/main/generated/schema_v2.dart
+++ b/mobile/test/drift/main/generated/schema_v2.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -1974,13 +1976,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2024,7 +2027,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2035,7 +2038,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2047,7 +2050,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2056,14 +2059,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2102,7 +2105,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2111,14 +2114,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2130,7 +2133,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2149,7 +2152,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v20.dart b/mobile/test/drift/main/generated/schema_v20.dart
index 8f7b204f7a..0cb8a46cac 100644
--- a/mobile/test/drift/main/generated/schema_v20.dart
+++ b/mobile/test/drift/main/generated/schema_v20.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3656,13 +3658,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3706,7 +3709,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3717,7 +3720,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3729,7 +3732,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3738,14 +3741,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3784,7 +3787,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3793,14 +3796,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3812,7 +3815,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3831,7 +3834,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v21.dart b/mobile/test/drift/main/generated/schema_v21.dart
index 846eb4aabc..5777b5f850 100644
--- a/mobile/test/drift/main/generated/schema_v21.dart
+++ b/mobile/test/drift/main/generated/schema_v21.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3693,13 +3695,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3743,7 +3746,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3754,7 +3757,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3766,7 +3769,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3775,14 +3778,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3821,7 +3824,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3830,14 +3833,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3849,7 +3852,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3868,7 +3871,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v22.dart b/mobile/test/drift/main/generated/schema_v22.dart
index b8f5971686..c1abad0d24 100644
--- a/mobile/test/drift/main/generated/schema_v22.dart
+++ b/mobile/test/drift/main/generated/schema_v22.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -3693,13 +3695,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3743,7 +3746,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3754,7 +3757,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3766,7 +3769,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3775,14 +3778,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3821,7 +3824,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3830,14 +3833,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3849,7 +3852,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3868,7 +3871,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
@@ -8409,13 +8412,14 @@ class AssetEditEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> parameters = GeneratedColumn<Uint8List>(
- 'parameters',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> parameters =
+ GeneratedColumn<i2.Uint8List>(
+ 'parameters',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
late final GeneratedColumn<int> sequence = GeneratedColumn<int>(
'sequence',
aliasedName,
@@ -8481,7 +8485,7 @@ class AssetEditEntityData extends DataClass
final String id;
final String assetId;
final int action;
- final Uint8List parameters;
+ final i2.Uint8List parameters;
final int sequence;
const AssetEditEntityData({
required this.id,
@@ -8496,7 +8500,7 @@ class AssetEditEntityData extends DataClass
map['id'] = Variable<String>(id);
map['asset_id'] = Variable<String>(assetId);
map['action'] = Variable<int>(action);
- map['parameters'] = Variable<Uint8List>(parameters);
+ map['parameters'] = Variable<i2.Uint8List>(parameters);
map['sequence'] = Variable<int>(sequence);
return map;
}
@@ -8510,7 +8514,7 @@ class AssetEditEntityData extends DataClass
id: serializer.fromJson<String>(json['id']),
assetId: serializer.fromJson<String>(json['assetId']),
action: serializer.fromJson<int>(json['action']),
- parameters: serializer.fromJson<Uint8List>(json['parameters']),
+ parameters: serializer.fromJson<i2.Uint8List>(json['parameters']),
sequence: serializer.fromJson<int>(json['sequence']),
);
}
@@ -8521,7 +8525,7 @@ class AssetEditEntityData extends DataClass
'id': serializer.toJson<String>(id),
'assetId': serializer.toJson<String>(assetId),
'action': serializer.toJson<int>(action),
- 'parameters': serializer.toJson<Uint8List>(parameters),
+ 'parameters': serializer.toJson<i2.Uint8List>(parameters),
'sequence': serializer.toJson<int>(sequence),
};
}
@@ -8530,7 +8534,7 @@ class AssetEditEntityData extends DataClass
String? id,
String? assetId,
int? action,
- Uint8List? parameters,
+ i2.Uint8List? parameters,
int? sequence,
}) => AssetEditEntityData(
id: id ?? this.id,
@@ -8586,7 +8590,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
final Value<String> id;
final Value<String> assetId;
final Value<int> action;
- final Value<Uint8List> parameters;
+ final Value<i2.Uint8List> parameters;
final Value<int> sequence;
const AssetEditEntityCompanion({
this.id = const Value.absent(),
@@ -8599,7 +8603,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
required String id,
required String assetId,
required int action,
- required Uint8List parameters,
+ required i2.Uint8List parameters,
required int sequence,
}) : id = Value(id),
assetId = Value(assetId),
@@ -8610,7 +8614,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
Expression<String>? id,
Expression<String>? assetId,
Expression<int>? action,
- Expression<Uint8List>? parameters,
+ Expression<i2.Uint8List>? parameters,
Expression<int>? sequence,
}) {
return RawValuesInsertable({
@@ -8626,7 +8630,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
Value<String>? id,
Value<String>? assetId,
Value<int>? action,
- Value<Uint8List>? parameters,
+ Value<i2.Uint8List>? parameters,
Value<int>? sequence,
}) {
return AssetEditEntityCompanion(
@@ -8651,7 +8655,7 @@ class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
map['action'] = Variable<int>(action.value);
}
if (parameters.present) {
- map['parameters'] = Variable<Uint8List>(parameters.value);
+ map['parameters'] = Variable<i2.Uint8List>(parameters.value);
}
if (sequence.present) {
map['sequence'] = Variable<int>(sequence.value);
diff --git a/mobile/test/drift/main/generated/schema_v23.dart b/mobile/test/drift/main/generated/schema_v23.dart
new file mode 100644
index 0000000000..35402af876
--- /dev/null
+++ b/mobile/test/drift/main/generated/schema_v23.dart
@@ -0,0 +1,9179 @@
+// dart format width=80
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
+import 'package:drift/drift.dart';
+
+class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ UserEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> email = GeneratedColumn<String>(
+ 'email',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> hasProfileImage = GeneratedColumn<int>(
+ 'has_profile_image',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints:
+ 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> profileChangedAt = GeneratedColumn<String>(
+ 'profile_changed_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<int> avatarColor = GeneratedColumn<int>(
+ 'avatar_color',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ id,
+ name,
+ email,
+ hasProfileImage,
+ profileChangedAt,
+ avatarColor,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'user_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ UserEntityData map(Map<String, dynamic> 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'],
+ )!,
+ email: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}email'],
+ )!,
+ hasProfileImage: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}has_profile_image'],
+ )!,
+ profileChangedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}profile_changed_at'],
+ )!,
+ avatarColor: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}avatar_color'],
+ )!,
+ );
+ }
+
+ @override
+ UserEntity createAlias(String alias) {
+ return UserEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class UserEntityData extends DataClass implements Insertable<UserEntityData> {
+ final String id;
+ final String name;
+ final String email;
+ final int hasProfileImage;
+ final String profileChangedAt;
+ final int avatarColor;
+ const UserEntityData({
+ required this.id,
+ required this.name,
+ required this.email,
+ required this.hasProfileImage,
+ required this.profileChangedAt,
+ required this.avatarColor,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['name'] = Variable<String>(name);
+ map['email'] = Variable<String>(email);
+ map['has_profile_image'] = Variable<int>(hasProfileImage);
+ map['profile_changed_at'] = Variable<String>(profileChangedAt);
+ map['avatar_color'] = Variable<int>(avatarColor);
+ return map;
+ }
+
+ factory UserEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return UserEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ name: serializer.fromJson<String>(json['name']),
+ email: serializer.fromJson<String>(json['email']),
+ hasProfileImage: serializer.fromJson<int>(json['hasProfileImage']),
+ profileChangedAt: serializer.fromJson<String>(json['profileChangedAt']),
+ avatarColor: serializer.fromJson<int>(json['avatarColor']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'name': serializer.toJson<String>(name),
+ 'email': serializer.toJson<String>(email),
+ 'hasProfileImage': serializer.toJson<int>(hasProfileImage),
+ 'profileChangedAt': serializer.toJson<String>(profileChangedAt),
+ 'avatarColor': serializer.toJson<int>(avatarColor),
+ };
+ }
+
+ UserEntityData copyWith({
+ String? id,
+ String? name,
+ String? email,
+ int? hasProfileImage,
+ String? profileChangedAt,
+ int? avatarColor,
+ }) => UserEntityData(
+ id: id ?? this.id,
+ name: name ?? this.name,
+ email: email ?? this.email,
+ hasProfileImage: hasProfileImage ?? this.hasProfileImage,
+ profileChangedAt: profileChangedAt ?? this.profileChangedAt,
+ avatarColor: avatarColor ?? this.avatarColor,
+ );
+ UserEntityData copyWithCompanion(UserEntityCompanion data) {
+ return UserEntityData(
+ id: data.id.present ? data.id.value : this.id,
+ name: data.name.present ? data.name.value : this.name,
+ email: data.email.present ? data.email.value : this.email,
+ hasProfileImage: data.hasProfileImage.present
+ ? data.hasProfileImage.value
+ : this.hasProfileImage,
+ profileChangedAt: data.profileChangedAt.present
+ ? data.profileChangedAt.value
+ : this.profileChangedAt,
+ avatarColor: data.avatarColor.present
+ ? data.avatarColor.value
+ : this.avatarColor,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('UserEntityData(')
+ ..write('id: $id, ')
+ ..write('name: $name, ')
+ ..write('email: $email, ')
+ ..write('hasProfileImage: $hasProfileImage, ')
+ ..write('profileChangedAt: $profileChangedAt, ')
+ ..write('avatarColor: $avatarColor')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ id,
+ name,
+ email,
+ hasProfileImage,
+ profileChangedAt,
+ avatarColor,
+ );
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is UserEntityData &&
+ other.id == this.id &&
+ other.name == this.name &&
+ other.email == this.email &&
+ other.hasProfileImage == this.hasProfileImage &&
+ other.profileChangedAt == this.profileChangedAt &&
+ other.avatarColor == this.avatarColor);
+}
+
+class UserEntityCompanion extends UpdateCompanion<UserEntityData> {
+ final Value<String> id;
+ final Value<String> name;
+ final Value<String> email;
+ final Value<int> hasProfileImage;
+ final Value<String> profileChangedAt;
+ final Value<int> avatarColor;
+ const UserEntityCompanion({
+ this.id = const Value.absent(),
+ this.name = const Value.absent(),
+ this.email = const Value.absent(),
+ this.hasProfileImage = const Value.absent(),
+ this.profileChangedAt = const Value.absent(),
+ this.avatarColor = const Value.absent(),
+ });
+ UserEntityCompanion.insert({
+ required String id,
+ required String name,
+ required String email,
+ this.hasProfileImage = const Value.absent(),
+ this.profileChangedAt = const Value.absent(),
+ this.avatarColor = const Value.absent(),
+ }) : id = Value(id),
+ name = Value(name),
+ email = Value(email);
+ static Insertable<UserEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? name,
+ Expression<String>? email,
+ Expression<int>? hasProfileImage,
+ Expression<String>? profileChangedAt,
+ Expression<int>? avatarColor,
+ }) {
+ return RawValuesInsertable({
+ if (id != null) 'id': id,
+ if (name != null) 'name': name,
+ if (email != null) 'email': email,
+ if (hasProfileImage != null) 'has_profile_image': hasProfileImage,
+ if (profileChangedAt != null) 'profile_changed_at': profileChangedAt,
+ if (avatarColor != null) 'avatar_color': avatarColor,
+ });
+ }
+
+ UserEntityCompanion copyWith({
+ Value<String>? id,
+ Value<String>? name,
+ Value<String>? email,
+ Value<int>? hasProfileImage,
+ Value<String>? profileChangedAt,
+ Value<int>? avatarColor,
+ }) {
+ return UserEntityCompanion(
+ id: id ?? this.id,
+ name: name ?? this.name,
+ email: email ?? this.email,
+ hasProfileImage: hasProfileImage ?? this.hasProfileImage,
+ profileChangedAt: profileChangedAt ?? this.profileChangedAt,
+ avatarColor: avatarColor ?? this.avatarColor,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (email.present) {
+ map['email'] = Variable<String>(email.value);
+ }
+ if (hasProfileImage.present) {
+ map['has_profile_image'] = Variable<int>(hasProfileImage.value);
+ }
+ if (profileChangedAt.present) {
+ map['profile_changed_at'] = Variable<String>(profileChangedAt.value);
+ }
+ if (avatarColor.present) {
+ map['avatar_color'] = Variable<int>(avatarColor.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('UserEntityCompanion(')
+ ..write('id: $id, ')
+ ..write('name: $name, ')
+ ..write('email: $email, ')
+ ..write('hasProfileImage: $hasProfileImage, ')
+ ..write('profileChangedAt: $profileChangedAt, ')
+ ..write('avatarColor: $avatarColor')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class RemoteAssetEntity extends Table
+ with TableInfo<RemoteAssetEntity, RemoteAssetEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ RemoteAssetEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> type = GeneratedColumn<int>(
+ 'type',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<int> width = GeneratedColumn<int>(
+ 'width',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> height = GeneratedColumn<int>(
+ 'height',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> durationMs = GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(
+ 'checksum',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> isFavorite = GeneratedColumn<int>(
+ 'is_favorite',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
+ 'owner_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> localDateTime = GeneratedColumn<String>(
+ 'local_date_time',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> thumbHash = GeneratedColumn<String>(
+ 'thumb_hash',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> deletedAt = GeneratedColumn<String>(
+ 'deleted_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> livePhotoVideoId = GeneratedColumn<String>(
+ 'live_photo_video_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> visibility = GeneratedColumn<int>(
+ 'visibility',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> stackId = GeneratedColumn<String>(
+ 'stack_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> libraryId = GeneratedColumn<String>(
+ 'library_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> isEdited = GeneratedColumn<int>(
+ 'is_edited',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_edited IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ name,
+ type,
+ createdAt,
+ updatedAt,
+ width,
+ height,
+ durationMs,
+ id,
+ checksum,
+ isFavorite,
+ ownerId,
+ localDateTime,
+ thumbHash,
+ deletedAt,
+ livePhotoVideoId,
+ visibility,
+ stackId,
+ libraryId,
+ isEdited,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'remote_asset_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ RemoteAssetEntityData map(Map<String, dynamic> 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.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}updated_at'],
+ )!,
+ width: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}width'],
+ ),
+ height: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}height'],
+ ),
+ durationMs: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}duration_ms'],
+ ),
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ checksum: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}checksum'],
+ )!,
+ isFavorite: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_favorite'],
+ )!,
+ ownerId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}owner_id'],
+ )!,
+ localDateTime: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}local_date_time'],
+ ),
+ thumbHash: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}thumb_hash'],
+ ),
+ deletedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ 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'],
+ ),
+ libraryId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}library_id'],
+ ),
+ isEdited: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_edited'],
+ )!,
+ );
+ }
+
+ @override
+ RemoteAssetEntity createAlias(String alias) {
+ return RemoteAssetEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class RemoteAssetEntityData extends DataClass
+ implements Insertable<RemoteAssetEntityData> {
+ final String name;
+ final int type;
+ final String createdAt;
+ final String updatedAt;
+ final int? width;
+ final int? height;
+ final int? durationMs;
+ final String id;
+ final String checksum;
+ final int isFavorite;
+ final String ownerId;
+ final String? localDateTime;
+ final String? thumbHash;
+ final String? deletedAt;
+ final String? livePhotoVideoId;
+ final int visibility;
+ final String? stackId;
+ final String? libraryId;
+ final int isEdited;
+ const RemoteAssetEntityData({
+ required this.name,
+ required this.type,
+ required this.createdAt,
+ required this.updatedAt,
+ this.width,
+ this.height,
+ this.durationMs,
+ 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,
+ this.libraryId,
+ required this.isEdited,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['name'] = Variable<String>(name);
+ map['type'] = Variable<int>(type);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ if (!nullToAbsent || width != null) {
+ map['width'] = Variable<int>(width);
+ }
+ if (!nullToAbsent || height != null) {
+ map['height'] = Variable<int>(height);
+ }
+ if (!nullToAbsent || durationMs != null) {
+ map['duration_ms'] = Variable<int>(durationMs);
+ }
+ map['id'] = Variable<String>(id);
+ map['checksum'] = Variable<String>(checksum);
+ map['is_favorite'] = Variable<int>(isFavorite);
+ map['owner_id'] = Variable<String>(ownerId);
+ if (!nullToAbsent || localDateTime != null) {
+ map['local_date_time'] = Variable<String>(localDateTime);
+ }
+ if (!nullToAbsent || thumbHash != null) {
+ map['thumb_hash'] = Variable<String>(thumbHash);
+ }
+ if (!nullToAbsent || deletedAt != null) {
+ map['deleted_at'] = Variable<String>(deletedAt);
+ }
+ if (!nullToAbsent || livePhotoVideoId != null) {
+ map['live_photo_video_id'] = Variable<String>(livePhotoVideoId);
+ }
+ map['visibility'] = Variable<int>(visibility);
+ if (!nullToAbsent || stackId != null) {
+ map['stack_id'] = Variable<String>(stackId);
+ }
+ if (!nullToAbsent || libraryId != null) {
+ map['library_id'] = Variable<String>(libraryId);
+ }
+ map['is_edited'] = Variable<int>(isEdited);
+ return map;
+ }
+
+ factory RemoteAssetEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return RemoteAssetEntityData(
+ name: serializer.fromJson<String>(json['name']),
+ type: serializer.fromJson<int>(json['type']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ width: serializer.fromJson<int?>(json['width']),
+ height: serializer.fromJson<int?>(json['height']),
+ durationMs: serializer.fromJson<int?>(json['durationMs']),
+ id: serializer.fromJson<String>(json['id']),
+ checksum: serializer.fromJson<String>(json['checksum']),
+ isFavorite: serializer.fromJson<int>(json['isFavorite']),
+ ownerId: serializer.fromJson<String>(json['ownerId']),
+ localDateTime: serializer.fromJson<String?>(json['localDateTime']),
+ thumbHash: serializer.fromJson<String?>(json['thumbHash']),
+ deletedAt: serializer.fromJson<String?>(json['deletedAt']),
+ livePhotoVideoId: serializer.fromJson<String?>(json['livePhotoVideoId']),
+ visibility: serializer.fromJson<int>(json['visibility']),
+ stackId: serializer.fromJson<String?>(json['stackId']),
+ libraryId: serializer.fromJson<String?>(json['libraryId']),
+ isEdited: serializer.fromJson<int>(json['isEdited']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'name': serializer.toJson<String>(name),
+ 'type': serializer.toJson<int>(type),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'width': serializer.toJson<int?>(width),
+ 'height': serializer.toJson<int?>(height),
+ 'durationMs': serializer.toJson<int?>(durationMs),
+ 'id': serializer.toJson<String>(id),
+ 'checksum': serializer.toJson<String>(checksum),
+ 'isFavorite': serializer.toJson<int>(isFavorite),
+ 'ownerId': serializer.toJson<String>(ownerId),
+ 'localDateTime': serializer.toJson<String?>(localDateTime),
+ 'thumbHash': serializer.toJson<String?>(thumbHash),
+ 'deletedAt': serializer.toJson<String?>(deletedAt),
+ 'livePhotoVideoId': serializer.toJson<String?>(livePhotoVideoId),
+ 'visibility': serializer.toJson<int>(visibility),
+ 'stackId': serializer.toJson<String?>(stackId),
+ 'libraryId': serializer.toJson<String?>(libraryId),
+ 'isEdited': serializer.toJson<int>(isEdited),
+ };
+ }
+
+ RemoteAssetEntityData copyWith({
+ String? name,
+ int? type,
+ String? createdAt,
+ String? updatedAt,
+ Value<int?> width = const Value.absent(),
+ Value<int?> height = const Value.absent(),
+ Value<int?> durationMs = const Value.absent(),
+ String? id,
+ String? checksum,
+ int? isFavorite,
+ String? ownerId,
+ Value<String?> localDateTime = const Value.absent(),
+ Value<String?> thumbHash = const Value.absent(),
+ Value<String?> deletedAt = const Value.absent(),
+ Value<String?> livePhotoVideoId = const Value.absent(),
+ int? visibility,
+ Value<String?> stackId = const Value.absent(),
+ Value<String?> libraryId = const Value.absent(),
+ int? isEdited,
+ }) => 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,
+ durationMs: durationMs.present ? durationMs.value : this.durationMs,
+ 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,
+ libraryId: libraryId.present ? libraryId.value : this.libraryId,
+ isEdited: isEdited ?? this.isEdited,
+ );
+ 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,
+ durationMs: data.durationMs.present
+ ? data.durationMs.value
+ : this.durationMs,
+ 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,
+ libraryId: data.libraryId.present ? data.libraryId.value : this.libraryId,
+ isEdited: data.isEdited.present ? data.isEdited.value : this.isEdited,
+ );
+ }
+
+ @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('durationMs: $durationMs, ')
+ ..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('libraryId: $libraryId, ')
+ ..write('isEdited: $isEdited')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ name,
+ type,
+ createdAt,
+ updatedAt,
+ width,
+ height,
+ durationMs,
+ id,
+ checksum,
+ isFavorite,
+ ownerId,
+ localDateTime,
+ thumbHash,
+ deletedAt,
+ livePhotoVideoId,
+ visibility,
+ stackId,
+ libraryId,
+ isEdited,
+ );
+ @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.durationMs == this.durationMs &&
+ 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 &&
+ other.libraryId == this.libraryId &&
+ other.isEdited == this.isEdited);
+}
+
+class RemoteAssetEntityCompanion
+ extends UpdateCompanion<RemoteAssetEntityData> {
+ final Value<String> name;
+ final Value<int> type;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<int?> width;
+ final Value<int?> height;
+ final Value<int?> durationMs;
+ final Value<String> id;
+ final Value<String> checksum;
+ final Value<int> isFavorite;
+ final Value<String> ownerId;
+ final Value<String?> localDateTime;
+ final Value<String?> thumbHash;
+ final Value<String?> deletedAt;
+ final Value<String?> livePhotoVideoId;
+ final Value<int> visibility;
+ final Value<String?> stackId;
+ final Value<String?> libraryId;
+ final Value<int> isEdited;
+ 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.durationMs = 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(),
+ this.libraryId = const Value.absent(),
+ this.isEdited = 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.durationMs = 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(),
+ this.libraryId = const Value.absent(),
+ this.isEdited = const Value.absent(),
+ }) : name = Value(name),
+ type = Value(type),
+ id = Value(id),
+ checksum = Value(checksum),
+ ownerId = Value(ownerId),
+ visibility = Value(visibility);
+ static Insertable<RemoteAssetEntityData> custom({
+ Expression<String>? name,
+ Expression<int>? type,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<int>? width,
+ Expression<int>? height,
+ Expression<int>? durationMs,
+ Expression<String>? id,
+ Expression<String>? checksum,
+ Expression<int>? isFavorite,
+ Expression<String>? ownerId,
+ Expression<String>? localDateTime,
+ Expression<String>? thumbHash,
+ Expression<String>? deletedAt,
+ Expression<String>? livePhotoVideoId,
+ Expression<int>? visibility,
+ Expression<String>? stackId,
+ Expression<String>? libraryId,
+ Expression<int>? isEdited,
+ }) {
+ 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 (durationMs != null) 'duration_ms': durationMs,
+ 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,
+ if (libraryId != null) 'library_id': libraryId,
+ if (isEdited != null) 'is_edited': isEdited,
+ });
+ }
+
+ RemoteAssetEntityCompanion copyWith({
+ Value<String>? name,
+ Value<int>? type,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<int?>? width,
+ Value<int?>? height,
+ Value<int?>? durationMs,
+ Value<String>? id,
+ Value<String>? checksum,
+ Value<int>? isFavorite,
+ Value<String>? ownerId,
+ Value<String?>? localDateTime,
+ Value<String?>? thumbHash,
+ Value<String?>? deletedAt,
+ Value<String?>? livePhotoVideoId,
+ Value<int>? visibility,
+ Value<String?>? stackId,
+ Value<String?>? libraryId,
+ Value<int>? isEdited,
+ }) {
+ 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,
+ durationMs: durationMs ?? this.durationMs,
+ 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,
+ libraryId: libraryId ?? this.libraryId,
+ isEdited: isEdited ?? this.isEdited,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (type.present) {
+ map['type'] = Variable<int>(type.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (width.present) {
+ map['width'] = Variable<int>(width.value);
+ }
+ if (height.present) {
+ map['height'] = Variable<int>(height.value);
+ }
+ if (durationMs.present) {
+ map['duration_ms'] = Variable<int>(durationMs.value);
+ }
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (checksum.present) {
+ map['checksum'] = Variable<String>(checksum.value);
+ }
+ if (isFavorite.present) {
+ map['is_favorite'] = Variable<int>(isFavorite.value);
+ }
+ if (ownerId.present) {
+ map['owner_id'] = Variable<String>(ownerId.value);
+ }
+ if (localDateTime.present) {
+ map['local_date_time'] = Variable<String>(localDateTime.value);
+ }
+ if (thumbHash.present) {
+ map['thumb_hash'] = Variable<String>(thumbHash.value);
+ }
+ if (deletedAt.present) {
+ map['deleted_at'] = Variable<String>(deletedAt.value);
+ }
+ if (livePhotoVideoId.present) {
+ map['live_photo_video_id'] = Variable<String>(livePhotoVideoId.value);
+ }
+ if (visibility.present) {
+ map['visibility'] = Variable<int>(visibility.value);
+ }
+ if (stackId.present) {
+ map['stack_id'] = Variable<String>(stackId.value);
+ }
+ if (libraryId.present) {
+ map['library_id'] = Variable<String>(libraryId.value);
+ }
+ if (isEdited.present) {
+ map['is_edited'] = Variable<int>(isEdited.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('durationMs: $durationMs, ')
+ ..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('libraryId: $libraryId, ')
+ ..write('isEdited: $isEdited')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class StackEntity extends Table with TableInfo<StackEntity, StackEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ StackEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
+ 'owner_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> primaryAssetId = GeneratedColumn<String>(
+ 'primary_asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {id};
+ @override
+ StackEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return StackEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ createdAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ 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;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class StackEntityData extends DataClass implements Insertable<StackEntityData> {
+ final String id;
+ final String createdAt;
+ final String 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ map['owner_id'] = Variable<String>(ownerId);
+ map['primary_asset_id'] = Variable<String>(primaryAssetId);
+ return map;
+ }
+
+ factory StackEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return StackEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ ownerId: serializer.fromJson<String>(json['ownerId']),
+ primaryAssetId: serializer.fromJson<String>(json['primaryAssetId']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'ownerId': serializer.toJson<String>(ownerId),
+ 'primaryAssetId': serializer.toJson<String>(primaryAssetId),
+ };
+ }
+
+ StackEntityData copyWith({
+ String? id,
+ String? createdAt,
+ String? 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<StackEntityData> {
+ final Value<String> id;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<String> ownerId;
+ final Value<String> 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<StackEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<String>? ownerId,
+ Expression<String>? 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<String>? id,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<String>? ownerId,
+ Value<String>? 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (ownerId.present) {
+ map['owner_id'] = Variable<String>(ownerId.value);
+ }
+ if (primaryAssetId.present) {
+ map['primary_asset_id'] = Variable<String>(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 LocalAssetEntity extends Table
+ with TableInfo<LocalAssetEntity, LocalAssetEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ LocalAssetEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> type = GeneratedColumn<int>(
+ 'type',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<int> width = GeneratedColumn<int>(
+ 'width',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> height = GeneratedColumn<int>(
+ 'height',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> durationMs = GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(
+ 'checksum',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> isFavorite = GeneratedColumn<int>(
+ 'is_favorite',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<int> orientation = GeneratedColumn<int>(
+ 'orientation',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> iCloudId = GeneratedColumn<String>(
+ 'i_cloud_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> adjustmentTime = GeneratedColumn<String>(
+ 'adjustment_time',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> latitude = GeneratedColumn<double>(
+ 'latitude',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> longitude = GeneratedColumn<double>(
+ 'longitude',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> playbackStyle = GeneratedColumn<int>(
+ 'playback_style',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ name,
+ type,
+ createdAt,
+ updatedAt,
+ width,
+ height,
+ durationMs,
+ id,
+ checksum,
+ isFavorite,
+ orientation,
+ iCloudId,
+ adjustmentTime,
+ latitude,
+ longitude,
+ playbackStyle,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'local_asset_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ LocalAssetEntityData map(Map<String, dynamic> 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.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}updated_at'],
+ )!,
+ width: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}width'],
+ ),
+ height: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}height'],
+ ),
+ durationMs: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}duration_ms'],
+ ),
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ checksum: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}checksum'],
+ ),
+ isFavorite: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_favorite'],
+ )!,
+ orientation: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}orientation'],
+ )!,
+ iCloudId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}i_cloud_id'],
+ ),
+ adjustmentTime: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}adjustment_time'],
+ ),
+ latitude: attachedDatabase.typeMapping.read(
+ DriftSqlType.double,
+ data['${effectivePrefix}latitude'],
+ ),
+ longitude: attachedDatabase.typeMapping.read(
+ DriftSqlType.double,
+ data['${effectivePrefix}longitude'],
+ ),
+ playbackStyle: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}playback_style'],
+ )!,
+ );
+ }
+
+ @override
+ LocalAssetEntity createAlias(String alias) {
+ return LocalAssetEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class LocalAssetEntityData extends DataClass
+ implements Insertable<LocalAssetEntityData> {
+ final String name;
+ final int type;
+ final String createdAt;
+ final String updatedAt;
+ final int? width;
+ final int? height;
+ final int? durationMs;
+ final String id;
+ final String? checksum;
+ final int isFavorite;
+ final int orientation;
+ final String? iCloudId;
+ final String? adjustmentTime;
+ final double? latitude;
+ final double? longitude;
+ final int playbackStyle;
+ const LocalAssetEntityData({
+ required this.name,
+ required this.type,
+ required this.createdAt,
+ required this.updatedAt,
+ this.width,
+ this.height,
+ this.durationMs,
+ required this.id,
+ this.checksum,
+ required this.isFavorite,
+ required this.orientation,
+ this.iCloudId,
+ this.adjustmentTime,
+ this.latitude,
+ this.longitude,
+ required this.playbackStyle,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['name'] = Variable<String>(name);
+ map['type'] = Variable<int>(type);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ if (!nullToAbsent || width != null) {
+ map['width'] = Variable<int>(width);
+ }
+ if (!nullToAbsent || height != null) {
+ map['height'] = Variable<int>(height);
+ }
+ if (!nullToAbsent || durationMs != null) {
+ map['duration_ms'] = Variable<int>(durationMs);
+ }
+ map['id'] = Variable<String>(id);
+ if (!nullToAbsent || checksum != null) {
+ map['checksum'] = Variable<String>(checksum);
+ }
+ map['is_favorite'] = Variable<int>(isFavorite);
+ map['orientation'] = Variable<int>(orientation);
+ if (!nullToAbsent || iCloudId != null) {
+ map['i_cloud_id'] = Variable<String>(iCloudId);
+ }
+ if (!nullToAbsent || adjustmentTime != null) {
+ map['adjustment_time'] = Variable<String>(adjustmentTime);
+ }
+ if (!nullToAbsent || latitude != null) {
+ map['latitude'] = Variable<double>(latitude);
+ }
+ if (!nullToAbsent || longitude != null) {
+ map['longitude'] = Variable<double>(longitude);
+ }
+ map['playback_style'] = Variable<int>(playbackStyle);
+ return map;
+ }
+
+ factory LocalAssetEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return LocalAssetEntityData(
+ name: serializer.fromJson<String>(json['name']),
+ type: serializer.fromJson<int>(json['type']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ width: serializer.fromJson<int?>(json['width']),
+ height: serializer.fromJson<int?>(json['height']),
+ durationMs: serializer.fromJson<int?>(json['durationMs']),
+ id: serializer.fromJson<String>(json['id']),
+ checksum: serializer.fromJson<String?>(json['checksum']),
+ isFavorite: serializer.fromJson<int>(json['isFavorite']),
+ orientation: serializer.fromJson<int>(json['orientation']),
+ iCloudId: serializer.fromJson<String?>(json['iCloudId']),
+ adjustmentTime: serializer.fromJson<String?>(json['adjustmentTime']),
+ latitude: serializer.fromJson<double?>(json['latitude']),
+ longitude: serializer.fromJson<double?>(json['longitude']),
+ playbackStyle: serializer.fromJson<int>(json['playbackStyle']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'name': serializer.toJson<String>(name),
+ 'type': serializer.toJson<int>(type),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'width': serializer.toJson<int?>(width),
+ 'height': serializer.toJson<int?>(height),
+ 'durationMs': serializer.toJson<int?>(durationMs),
+ 'id': serializer.toJson<String>(id),
+ 'checksum': serializer.toJson<String?>(checksum),
+ 'isFavorite': serializer.toJson<int>(isFavorite),
+ 'orientation': serializer.toJson<int>(orientation),
+ 'iCloudId': serializer.toJson<String?>(iCloudId),
+ 'adjustmentTime': serializer.toJson<String?>(adjustmentTime),
+ 'latitude': serializer.toJson<double?>(latitude),
+ 'longitude': serializer.toJson<double?>(longitude),
+ 'playbackStyle': serializer.toJson<int>(playbackStyle),
+ };
+ }
+
+ LocalAssetEntityData copyWith({
+ String? name,
+ int? type,
+ String? createdAt,
+ String? updatedAt,
+ Value<int?> width = const Value.absent(),
+ Value<int?> height = const Value.absent(),
+ Value<int?> durationMs = const Value.absent(),
+ String? id,
+ Value<String?> checksum = const Value.absent(),
+ int? isFavorite,
+ int? orientation,
+ Value<String?> iCloudId = const Value.absent(),
+ Value<String?> adjustmentTime = const Value.absent(),
+ Value<double?> latitude = const Value.absent(),
+ Value<double?> longitude = const Value.absent(),
+ int? playbackStyle,
+ }) => 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,
+ durationMs: durationMs.present ? durationMs.value : this.durationMs,
+ id: id ?? this.id,
+ checksum: checksum.present ? checksum.value : this.checksum,
+ isFavorite: isFavorite ?? this.isFavorite,
+ orientation: orientation ?? this.orientation,
+ iCloudId: iCloudId.present ? iCloudId.value : this.iCloudId,
+ adjustmentTime: adjustmentTime.present
+ ? adjustmentTime.value
+ : this.adjustmentTime,
+ latitude: latitude.present ? latitude.value : this.latitude,
+ longitude: longitude.present ? longitude.value : this.longitude,
+ playbackStyle: playbackStyle ?? this.playbackStyle,
+ );
+ 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,
+ durationMs: data.durationMs.present
+ ? data.durationMs.value
+ : this.durationMs,
+ 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,
+ iCloudId: data.iCloudId.present ? data.iCloudId.value : this.iCloudId,
+ adjustmentTime: data.adjustmentTime.present
+ ? data.adjustmentTime.value
+ : this.adjustmentTime,
+ latitude: data.latitude.present ? data.latitude.value : this.latitude,
+ longitude: data.longitude.present ? data.longitude.value : this.longitude,
+ playbackStyle: data.playbackStyle.present
+ ? data.playbackStyle.value
+ : this.playbackStyle,
+ );
+ }
+
+ @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('durationMs: $durationMs, ')
+ ..write('id: $id, ')
+ ..write('checksum: $checksum, ')
+ ..write('isFavorite: $isFavorite, ')
+ ..write('orientation: $orientation, ')
+ ..write('iCloudId: $iCloudId, ')
+ ..write('adjustmentTime: $adjustmentTime, ')
+ ..write('latitude: $latitude, ')
+ ..write('longitude: $longitude, ')
+ ..write('playbackStyle: $playbackStyle')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ name,
+ type,
+ createdAt,
+ updatedAt,
+ width,
+ height,
+ durationMs,
+ id,
+ checksum,
+ isFavorite,
+ orientation,
+ iCloudId,
+ adjustmentTime,
+ latitude,
+ longitude,
+ playbackStyle,
+ );
+ @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.durationMs == this.durationMs &&
+ other.id == this.id &&
+ other.checksum == this.checksum &&
+ other.isFavorite == this.isFavorite &&
+ other.orientation == this.orientation &&
+ other.iCloudId == this.iCloudId &&
+ other.adjustmentTime == this.adjustmentTime &&
+ other.latitude == this.latitude &&
+ other.longitude == this.longitude &&
+ other.playbackStyle == this.playbackStyle);
+}
+
+class LocalAssetEntityCompanion extends UpdateCompanion<LocalAssetEntityData> {
+ final Value<String> name;
+ final Value<int> type;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<int?> width;
+ final Value<int?> height;
+ final Value<int?> durationMs;
+ final Value<String> id;
+ final Value<String?> checksum;
+ final Value<int> isFavorite;
+ final Value<int> orientation;
+ final Value<String?> iCloudId;
+ final Value<String?> adjustmentTime;
+ final Value<double?> latitude;
+ final Value<double?> longitude;
+ final Value<int> playbackStyle;
+ 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.durationMs = const Value.absent(),
+ this.id = const Value.absent(),
+ this.checksum = const Value.absent(),
+ this.isFavorite = const Value.absent(),
+ this.orientation = const Value.absent(),
+ this.iCloudId = const Value.absent(),
+ this.adjustmentTime = const Value.absent(),
+ this.latitude = const Value.absent(),
+ this.longitude = const Value.absent(),
+ this.playbackStyle = 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.durationMs = const Value.absent(),
+ required String id,
+ this.checksum = const Value.absent(),
+ this.isFavorite = const Value.absent(),
+ this.orientation = const Value.absent(),
+ this.iCloudId = const Value.absent(),
+ this.adjustmentTime = const Value.absent(),
+ this.latitude = const Value.absent(),
+ this.longitude = const Value.absent(),
+ this.playbackStyle = const Value.absent(),
+ }) : name = Value(name),
+ type = Value(type),
+ id = Value(id);
+ static Insertable<LocalAssetEntityData> custom({
+ Expression<String>? name,
+ Expression<int>? type,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<int>? width,
+ Expression<int>? height,
+ Expression<int>? durationMs,
+ Expression<String>? id,
+ Expression<String>? checksum,
+ Expression<int>? isFavorite,
+ Expression<int>? orientation,
+ Expression<String>? iCloudId,
+ Expression<String>? adjustmentTime,
+ Expression<double>? latitude,
+ Expression<double>? longitude,
+ Expression<int>? playbackStyle,
+ }) {
+ 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 (durationMs != null) 'duration_ms': durationMs,
+ if (id != null) 'id': id,
+ if (checksum != null) 'checksum': checksum,
+ if (isFavorite != null) 'is_favorite': isFavorite,
+ if (orientation != null) 'orientation': orientation,
+ if (iCloudId != null) 'i_cloud_id': iCloudId,
+ if (adjustmentTime != null) 'adjustment_time': adjustmentTime,
+ if (latitude != null) 'latitude': latitude,
+ if (longitude != null) 'longitude': longitude,
+ if (playbackStyle != null) 'playback_style': playbackStyle,
+ });
+ }
+
+ LocalAssetEntityCompanion copyWith({
+ Value<String>? name,
+ Value<int>? type,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<int?>? width,
+ Value<int?>? height,
+ Value<int?>? durationMs,
+ Value<String>? id,
+ Value<String?>? checksum,
+ Value<int>? isFavorite,
+ Value<int>? orientation,
+ Value<String?>? iCloudId,
+ Value<String?>? adjustmentTime,
+ Value<double?>? latitude,
+ Value<double?>? longitude,
+ Value<int>? playbackStyle,
+ }) {
+ 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,
+ durationMs: durationMs ?? this.durationMs,
+ id: id ?? this.id,
+ checksum: checksum ?? this.checksum,
+ isFavorite: isFavorite ?? this.isFavorite,
+ orientation: orientation ?? this.orientation,
+ iCloudId: iCloudId ?? this.iCloudId,
+ adjustmentTime: adjustmentTime ?? this.adjustmentTime,
+ latitude: latitude ?? this.latitude,
+ longitude: longitude ?? this.longitude,
+ playbackStyle: playbackStyle ?? this.playbackStyle,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (type.present) {
+ map['type'] = Variable<int>(type.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (width.present) {
+ map['width'] = Variable<int>(width.value);
+ }
+ if (height.present) {
+ map['height'] = Variable<int>(height.value);
+ }
+ if (durationMs.present) {
+ map['duration_ms'] = Variable<int>(durationMs.value);
+ }
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (checksum.present) {
+ map['checksum'] = Variable<String>(checksum.value);
+ }
+ if (isFavorite.present) {
+ map['is_favorite'] = Variable<int>(isFavorite.value);
+ }
+ if (orientation.present) {
+ map['orientation'] = Variable<int>(orientation.value);
+ }
+ if (iCloudId.present) {
+ map['i_cloud_id'] = Variable<String>(iCloudId.value);
+ }
+ if (adjustmentTime.present) {
+ map['adjustment_time'] = Variable<String>(adjustmentTime.value);
+ }
+ if (latitude.present) {
+ map['latitude'] = Variable<double>(latitude.value);
+ }
+ if (longitude.present) {
+ map['longitude'] = Variable<double>(longitude.value);
+ }
+ if (playbackStyle.present) {
+ map['playback_style'] = Variable<int>(playbackStyle.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('durationMs: $durationMs, ')
+ ..write('id: $id, ')
+ ..write('checksum: $checksum, ')
+ ..write('isFavorite: $isFavorite, ')
+ ..write('orientation: $orientation, ')
+ ..write('iCloudId: $iCloudId, ')
+ ..write('adjustmentTime: $adjustmentTime, ')
+ ..write('latitude: $latitude, ')
+ ..write('longitude: $longitude, ')
+ ..write('playbackStyle: $playbackStyle')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class RemoteAlbumEntity extends Table
+ with TableInfo<RemoteAlbumEntity, RemoteAlbumEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ RemoteAlbumEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> description = GeneratedColumn<String>(
+ 'description',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT \'\'',
+ defaultValue: const CustomExpression('\'\''),
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
+ 'owner_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> thumbnailAssetId = GeneratedColumn<String>(
+ 'thumbnail_asset_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints:
+ 'NULL REFERENCES remote_asset_entity(id)ON DELETE SET NULL',
+ );
+ late final GeneratedColumn<int> isActivityEnabled = GeneratedColumn<int>(
+ 'is_activity_enabled',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints:
+ 'NOT NULL DEFAULT 1 CHECK (is_activity_enabled IN (0, 1))',
+ defaultValue: const CustomExpression('1'),
+ );
+ late final GeneratedColumn<int> order = GeneratedColumn<int>(
+ 'order',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {id};
+ @override
+ RemoteAlbumEntityData map(Map<String, dynamic> 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.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ 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.int,
+ 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;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class RemoteAlbumEntityData extends DataClass
+ implements Insertable<RemoteAlbumEntityData> {
+ final String id;
+ final String name;
+ final String description;
+ final String createdAt;
+ final String updatedAt;
+ final String ownerId;
+ final String? thumbnailAssetId;
+ final int 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['name'] = Variable<String>(name);
+ map['description'] = Variable<String>(description);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ map['owner_id'] = Variable<String>(ownerId);
+ if (!nullToAbsent || thumbnailAssetId != null) {
+ map['thumbnail_asset_id'] = Variable<String>(thumbnailAssetId);
+ }
+ map['is_activity_enabled'] = Variable<int>(isActivityEnabled);
+ map['order'] = Variable<int>(order);
+ return map;
+ }
+
+ factory RemoteAlbumEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return RemoteAlbumEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ name: serializer.fromJson<String>(json['name']),
+ description: serializer.fromJson<String>(json['description']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ ownerId: serializer.fromJson<String>(json['ownerId']),
+ thumbnailAssetId: serializer.fromJson<String?>(json['thumbnailAssetId']),
+ isActivityEnabled: serializer.fromJson<int>(json['isActivityEnabled']),
+ order: serializer.fromJson<int>(json['order']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'name': serializer.toJson<String>(name),
+ 'description': serializer.toJson<String>(description),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'ownerId': serializer.toJson<String>(ownerId),
+ 'thumbnailAssetId': serializer.toJson<String?>(thumbnailAssetId),
+ 'isActivityEnabled': serializer.toJson<int>(isActivityEnabled),
+ 'order': serializer.toJson<int>(order),
+ };
+ }
+
+ RemoteAlbumEntityData copyWith({
+ String? id,
+ String? name,
+ String? description,
+ String? createdAt,
+ String? updatedAt,
+ String? ownerId,
+ Value<String?> thumbnailAssetId = const Value.absent(),
+ int? 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<RemoteAlbumEntityData> {
+ final Value<String> id;
+ final Value<String> name;
+ final Value<String> description;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<String> ownerId;
+ final Value<String?> thumbnailAssetId;
+ final Value<int> isActivityEnabled;
+ final Value<int> 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<RemoteAlbumEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? name,
+ Expression<String>? description,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<String>? ownerId,
+ Expression<String>? thumbnailAssetId,
+ Expression<int>? isActivityEnabled,
+ Expression<int>? 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<String>? id,
+ Value<String>? name,
+ Value<String>? description,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<String>? ownerId,
+ Value<String?>? thumbnailAssetId,
+ Value<int>? isActivityEnabled,
+ Value<int>? 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (description.present) {
+ map['description'] = Variable<String>(description.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (ownerId.present) {
+ map['owner_id'] = Variable<String>(ownerId.value);
+ }
+ if (thumbnailAssetId.present) {
+ map['thumbnail_asset_id'] = Variable<String>(thumbnailAssetId.value);
+ }
+ if (isActivityEnabled.present) {
+ map['is_activity_enabled'] = Variable<int>(isActivityEnabled.value);
+ }
+ if (order.present) {
+ map['order'] = Variable<int>(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 LocalAlbumEntity extends Table
+ with TableInfo<LocalAlbumEntity, LocalAlbumEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ LocalAlbumEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<int> backupSelection = GeneratedColumn<int>(
+ 'backup_selection',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> isIosSharedAlbum = GeneratedColumn<int>(
+ 'is_ios_shared_album',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints:
+ 'NOT NULL DEFAULT 0 CHECK (is_ios_shared_album IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> linkedRemoteAlbumId =
+ GeneratedColumn<String>(
+ 'linked_remote_album_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints:
+ 'NULL REFERENCES remote_album_entity(id)ON DELETE SET NULL',
+ );
+ late final GeneratedColumn<int> marker = GeneratedColumn<int>(
+ 'marker',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL CHECK (marker IN (0, 1))',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ id,
+ name,
+ updatedAt,
+ backupSelection,
+ isIosSharedAlbum,
+ linkedRemoteAlbumId,
+ marker,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'local_album_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ LocalAlbumEntityData map(Map<String, dynamic> 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.string,
+ data['${effectivePrefix}updated_at'],
+ )!,
+ backupSelection: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}backup_selection'],
+ )!,
+ isIosSharedAlbum: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_ios_shared_album'],
+ )!,
+ linkedRemoteAlbumId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}linked_remote_album_id'],
+ ),
+ marker: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}marker'],
+ ),
+ );
+ }
+
+ @override
+ LocalAlbumEntity createAlias(String alias) {
+ return LocalAlbumEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class LocalAlbumEntityData extends DataClass
+ implements Insertable<LocalAlbumEntityData> {
+ final String id;
+ final String name;
+ final String updatedAt;
+ final int backupSelection;
+ final int isIosSharedAlbum;
+ final String? linkedRemoteAlbumId;
+ final int? marker;
+ const LocalAlbumEntityData({
+ required this.id,
+ required this.name,
+ required this.updatedAt,
+ required this.backupSelection,
+ required this.isIosSharedAlbum,
+ this.linkedRemoteAlbumId,
+ this.marker,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['name'] = Variable<String>(name);
+ map['updated_at'] = Variable<String>(updatedAt);
+ map['backup_selection'] = Variable<int>(backupSelection);
+ map['is_ios_shared_album'] = Variable<int>(isIosSharedAlbum);
+ if (!nullToAbsent || linkedRemoteAlbumId != null) {
+ map['linked_remote_album_id'] = Variable<String>(linkedRemoteAlbumId);
+ }
+ if (!nullToAbsent || marker != null) {
+ map['marker'] = Variable<int>(marker);
+ }
+ return map;
+ }
+
+ factory LocalAlbumEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return LocalAlbumEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ name: serializer.fromJson<String>(json['name']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ backupSelection: serializer.fromJson<int>(json['backupSelection']),
+ isIosSharedAlbum: serializer.fromJson<int>(json['isIosSharedAlbum']),
+ linkedRemoteAlbumId: serializer.fromJson<String?>(
+ json['linkedRemoteAlbumId'],
+ ),
+ marker: serializer.fromJson<int?>(json['marker']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'name': serializer.toJson<String>(name),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'backupSelection': serializer.toJson<int>(backupSelection),
+ 'isIosSharedAlbum': serializer.toJson<int>(isIosSharedAlbum),
+ 'linkedRemoteAlbumId': serializer.toJson<String?>(linkedRemoteAlbumId),
+ 'marker': serializer.toJson<int?>(marker),
+ };
+ }
+
+ LocalAlbumEntityData copyWith({
+ String? id,
+ String? name,
+ String? updatedAt,
+ int? backupSelection,
+ int? isIosSharedAlbum,
+ Value<String?> linkedRemoteAlbumId = const Value.absent(),
+ Value<int?> 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,
+ linkedRemoteAlbumId: linkedRemoteAlbumId.present
+ ? linkedRemoteAlbumId.value
+ : this.linkedRemoteAlbumId,
+ 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,
+ linkedRemoteAlbumId: data.linkedRemoteAlbumId.present
+ ? data.linkedRemoteAlbumId.value
+ : this.linkedRemoteAlbumId,
+ 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('linkedRemoteAlbumId: $linkedRemoteAlbumId, ')
+ ..write('marker: $marker')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ id,
+ name,
+ updatedAt,
+ backupSelection,
+ isIosSharedAlbum,
+ linkedRemoteAlbumId,
+ 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.linkedRemoteAlbumId == this.linkedRemoteAlbumId &&
+ other.marker == this.marker);
+}
+
+class LocalAlbumEntityCompanion extends UpdateCompanion<LocalAlbumEntityData> {
+ final Value<String> id;
+ final Value<String> name;
+ final Value<String> updatedAt;
+ final Value<int> backupSelection;
+ final Value<int> isIosSharedAlbum;
+ final Value<String?> linkedRemoteAlbumId;
+ final Value<int?> 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.linkedRemoteAlbumId = 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.linkedRemoteAlbumId = const Value.absent(),
+ this.marker = const Value.absent(),
+ }) : id = Value(id),
+ name = Value(name),
+ backupSelection = Value(backupSelection);
+ static Insertable<LocalAlbumEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? name,
+ Expression<String>? updatedAt,
+ Expression<int>? backupSelection,
+ Expression<int>? isIosSharedAlbum,
+ Expression<String>? linkedRemoteAlbumId,
+ Expression<int>? 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 (linkedRemoteAlbumId != null)
+ 'linked_remote_album_id': linkedRemoteAlbumId,
+ if (marker != null) 'marker': marker,
+ });
+ }
+
+ LocalAlbumEntityCompanion copyWith({
+ Value<String>? id,
+ Value<String>? name,
+ Value<String>? updatedAt,
+ Value<int>? backupSelection,
+ Value<int>? isIosSharedAlbum,
+ Value<String?>? linkedRemoteAlbumId,
+ Value<int?>? marker,
+ }) {
+ return LocalAlbumEntityCompanion(
+ id: id ?? this.id,
+ name: name ?? this.name,
+ updatedAt: updatedAt ?? this.updatedAt,
+ backupSelection: backupSelection ?? this.backupSelection,
+ isIosSharedAlbum: isIosSharedAlbum ?? this.isIosSharedAlbum,
+ linkedRemoteAlbumId: linkedRemoteAlbumId ?? this.linkedRemoteAlbumId,
+ marker: marker ?? this.marker,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (backupSelection.present) {
+ map['backup_selection'] = Variable<int>(backupSelection.value);
+ }
+ if (isIosSharedAlbum.present) {
+ map['is_ios_shared_album'] = Variable<int>(isIosSharedAlbum.value);
+ }
+ if (linkedRemoteAlbumId.present) {
+ map['linked_remote_album_id'] = Variable<String>(
+ linkedRemoteAlbumId.value,
+ );
+ }
+ if (marker.present) {
+ map['marker'] = Variable<int>(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('linkedRemoteAlbumId: $linkedRemoteAlbumId, ')
+ ..write('marker: $marker')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class LocalAlbumAssetEntity extends Table
+ with TableInfo<LocalAlbumAssetEntity, LocalAlbumAssetEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ LocalAlbumAssetEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES local_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES local_album_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<int> marker = GeneratedColumn<int>(
+ 'marker',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL CHECK (marker IN (0, 1))',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [assetId, albumId, marker];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'local_album_asset_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {assetId, albumId};
+ @override
+ LocalAlbumAssetEntityData map(
+ Map<String, dynamic> 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'],
+ )!,
+ marker: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}marker'],
+ ),
+ );
+ }
+
+ @override
+ LocalAlbumAssetEntity createAlias(String alias) {
+ return LocalAlbumAssetEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const [
+ 'PRIMARY KEY(asset_id, album_id)',
+ ];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class LocalAlbumAssetEntityData extends DataClass
+ implements Insertable<LocalAlbumAssetEntityData> {
+ final String assetId;
+ final String albumId;
+ final int? marker;
+ const LocalAlbumAssetEntityData({
+ required this.assetId,
+ required this.albumId,
+ this.marker,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['asset_id'] = Variable<String>(assetId);
+ map['album_id'] = Variable<String>(albumId);
+ if (!nullToAbsent || marker != null) {
+ map['marker'] = Variable<int>(marker);
+ }
+ return map;
+ }
+
+ factory LocalAlbumAssetEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return LocalAlbumAssetEntityData(
+ assetId: serializer.fromJson<String>(json['assetId']),
+ albumId: serializer.fromJson<String>(json['albumId']),
+ marker: serializer.fromJson<int?>(json['marker']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'assetId': serializer.toJson<String>(assetId),
+ 'albumId': serializer.toJson<String>(albumId),
+ 'marker': serializer.toJson<int?>(marker),
+ };
+ }
+
+ LocalAlbumAssetEntityData copyWith({
+ String? assetId,
+ String? albumId,
+ Value<int?> marker = const Value.absent(),
+ }) => LocalAlbumAssetEntityData(
+ assetId: assetId ?? this.assetId,
+ albumId: albumId ?? this.albumId,
+ marker: marker.present ? marker.value : this.marker,
+ );
+ LocalAlbumAssetEntityData copyWithCompanion(
+ LocalAlbumAssetEntityCompanion data,
+ ) {
+ return LocalAlbumAssetEntityData(
+ assetId: data.assetId.present ? data.assetId.value : this.assetId,
+ albumId: data.albumId.present ? data.albumId.value : this.albumId,
+ marker: data.marker.present ? data.marker.value : this.marker,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('LocalAlbumAssetEntityData(')
+ ..write('assetId: $assetId, ')
+ ..write('albumId: $albumId, ')
+ ..write('marker: $marker')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(assetId, albumId, marker);
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is LocalAlbumAssetEntityData &&
+ other.assetId == this.assetId &&
+ other.albumId == this.albumId &&
+ other.marker == this.marker);
+}
+
+class LocalAlbumAssetEntityCompanion
+ extends UpdateCompanion<LocalAlbumAssetEntityData> {
+ final Value<String> assetId;
+ final Value<String> albumId;
+ final Value<int?> marker;
+ const LocalAlbumAssetEntityCompanion({
+ this.assetId = const Value.absent(),
+ this.albumId = const Value.absent(),
+ this.marker = const Value.absent(),
+ });
+ LocalAlbumAssetEntityCompanion.insert({
+ required String assetId,
+ required String albumId,
+ this.marker = const Value.absent(),
+ }) : assetId = Value(assetId),
+ albumId = Value(albumId);
+ static Insertable<LocalAlbumAssetEntityData> custom({
+ Expression<String>? assetId,
+ Expression<String>? albumId,
+ Expression<int>? marker,
+ }) {
+ return RawValuesInsertable({
+ if (assetId != null) 'asset_id': assetId,
+ if (albumId != null) 'album_id': albumId,
+ if (marker != null) 'marker': marker,
+ });
+ }
+
+ LocalAlbumAssetEntityCompanion copyWith({
+ Value<String>? assetId,
+ Value<String>? albumId,
+ Value<int?>? marker,
+ }) {
+ return LocalAlbumAssetEntityCompanion(
+ assetId: assetId ?? this.assetId,
+ albumId: albumId ?? this.albumId,
+ marker: marker ?? this.marker,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (albumId.present) {
+ map['album_id'] = Variable<String>(albumId.value);
+ }
+ if (marker.present) {
+ map['marker'] = Variable<int>(marker.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('LocalAlbumAssetEntityCompanion(')
+ ..write('assetId: $assetId, ')
+ ..write('albumId: $albumId, ')
+ ..write('marker: $marker')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class AuthUserEntity extends Table
+ with TableInfo<AuthUserEntity, AuthUserEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ AuthUserEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> email = GeneratedColumn<String>(
+ 'email',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> isAdmin = GeneratedColumn<int>(
+ 'is_admin',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_admin IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<int> hasProfileImage = GeneratedColumn<int>(
+ 'has_profile_image',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints:
+ 'NOT NULL DEFAULT 0 CHECK (has_profile_image IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> profileChangedAt = GeneratedColumn<String>(
+ 'profile_changed_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<int> avatarColor = GeneratedColumn<int>(
+ 'avatar_color',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> quotaSizeInBytes = GeneratedColumn<int>(
+ 'quota_size_in_bytes',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<int> quotaUsageInBytes = GeneratedColumn<int>(
+ 'quota_usage_in_bytes',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> pinCode = GeneratedColumn<String>(
+ 'pin_code',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ id,
+ name,
+ email,
+ isAdmin,
+ hasProfileImage,
+ profileChangedAt,
+ avatarColor,
+ quotaSizeInBytes,
+ quotaUsageInBytes,
+ pinCode,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'auth_user_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ AuthUserEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return AuthUserEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ name: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}name'],
+ )!,
+ email: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}email'],
+ )!,
+ isAdmin: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_admin'],
+ )!,
+ hasProfileImage: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}has_profile_image'],
+ )!,
+ profileChangedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}profile_changed_at'],
+ )!,
+ avatarColor: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}avatar_color'],
+ )!,
+ quotaSizeInBytes: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}quota_size_in_bytes'],
+ )!,
+ quotaUsageInBytes: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}quota_usage_in_bytes'],
+ )!,
+ pinCode: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}pin_code'],
+ ),
+ );
+ }
+
+ @override
+ AuthUserEntity createAlias(String alias) {
+ return AuthUserEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class AuthUserEntityData extends DataClass
+ implements Insertable<AuthUserEntityData> {
+ final String id;
+ final String name;
+ final String email;
+ final int isAdmin;
+ final int hasProfileImage;
+ final String profileChangedAt;
+ final int avatarColor;
+ final int quotaSizeInBytes;
+ final int quotaUsageInBytes;
+ final String? pinCode;
+ const AuthUserEntityData({
+ required this.id,
+ required this.name,
+ required this.email,
+ required this.isAdmin,
+ required this.hasProfileImage,
+ required this.profileChangedAt,
+ required this.avatarColor,
+ required this.quotaSizeInBytes,
+ required this.quotaUsageInBytes,
+ this.pinCode,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['name'] = Variable<String>(name);
+ map['email'] = Variable<String>(email);
+ map['is_admin'] = Variable<int>(isAdmin);
+ map['has_profile_image'] = Variable<int>(hasProfileImage);
+ map['profile_changed_at'] = Variable<String>(profileChangedAt);
+ map['avatar_color'] = Variable<int>(avatarColor);
+ map['quota_size_in_bytes'] = Variable<int>(quotaSizeInBytes);
+ map['quota_usage_in_bytes'] = Variable<int>(quotaUsageInBytes);
+ if (!nullToAbsent || pinCode != null) {
+ map['pin_code'] = Variable<String>(pinCode);
+ }
+ return map;
+ }
+
+ factory AuthUserEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return AuthUserEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ name: serializer.fromJson<String>(json['name']),
+ email: serializer.fromJson<String>(json['email']),
+ isAdmin: serializer.fromJson<int>(json['isAdmin']),
+ hasProfileImage: serializer.fromJson<int>(json['hasProfileImage']),
+ profileChangedAt: serializer.fromJson<String>(json['profileChangedAt']),
+ avatarColor: serializer.fromJson<int>(json['avatarColor']),
+ quotaSizeInBytes: serializer.fromJson<int>(json['quotaSizeInBytes']),
+ quotaUsageInBytes: serializer.fromJson<int>(json['quotaUsageInBytes']),
+ pinCode: serializer.fromJson<String?>(json['pinCode']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'name': serializer.toJson<String>(name),
+ 'email': serializer.toJson<String>(email),
+ 'isAdmin': serializer.toJson<int>(isAdmin),
+ 'hasProfileImage': serializer.toJson<int>(hasProfileImage),
+ 'profileChangedAt': serializer.toJson<String>(profileChangedAt),
+ 'avatarColor': serializer.toJson<int>(avatarColor),
+ 'quotaSizeInBytes': serializer.toJson<int>(quotaSizeInBytes),
+ 'quotaUsageInBytes': serializer.toJson<int>(quotaUsageInBytes),
+ 'pinCode': serializer.toJson<String?>(pinCode),
+ };
+ }
+
+ AuthUserEntityData copyWith({
+ String? id,
+ String? name,
+ String? email,
+ int? isAdmin,
+ int? hasProfileImage,
+ String? profileChangedAt,
+ int? avatarColor,
+ int? quotaSizeInBytes,
+ int? quotaUsageInBytes,
+ Value<String?> pinCode = const Value.absent(),
+ }) => AuthUserEntityData(
+ id: id ?? this.id,
+ name: name ?? this.name,
+ email: email ?? this.email,
+ isAdmin: isAdmin ?? this.isAdmin,
+ hasProfileImage: hasProfileImage ?? this.hasProfileImage,
+ profileChangedAt: profileChangedAt ?? this.profileChangedAt,
+ avatarColor: avatarColor ?? this.avatarColor,
+ quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes,
+ quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes,
+ pinCode: pinCode.present ? pinCode.value : this.pinCode,
+ );
+ AuthUserEntityData copyWithCompanion(AuthUserEntityCompanion data) {
+ return AuthUserEntityData(
+ id: data.id.present ? data.id.value : this.id,
+ name: data.name.present ? data.name.value : this.name,
+ email: data.email.present ? data.email.value : this.email,
+ isAdmin: data.isAdmin.present ? data.isAdmin.value : this.isAdmin,
+ hasProfileImage: data.hasProfileImage.present
+ ? data.hasProfileImage.value
+ : this.hasProfileImage,
+ profileChangedAt: data.profileChangedAt.present
+ ? data.profileChangedAt.value
+ : this.profileChangedAt,
+ avatarColor: data.avatarColor.present
+ ? data.avatarColor.value
+ : this.avatarColor,
+ quotaSizeInBytes: data.quotaSizeInBytes.present
+ ? data.quotaSizeInBytes.value
+ : this.quotaSizeInBytes,
+ quotaUsageInBytes: data.quotaUsageInBytes.present
+ ? data.quotaUsageInBytes.value
+ : this.quotaUsageInBytes,
+ pinCode: data.pinCode.present ? data.pinCode.value : this.pinCode,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('AuthUserEntityData(')
+ ..write('id: $id, ')
+ ..write('name: $name, ')
+ ..write('email: $email, ')
+ ..write('isAdmin: $isAdmin, ')
+ ..write('hasProfileImage: $hasProfileImage, ')
+ ..write('profileChangedAt: $profileChangedAt, ')
+ ..write('avatarColor: $avatarColor, ')
+ ..write('quotaSizeInBytes: $quotaSizeInBytes, ')
+ ..write('quotaUsageInBytes: $quotaUsageInBytes, ')
+ ..write('pinCode: $pinCode')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ id,
+ name,
+ email,
+ isAdmin,
+ hasProfileImage,
+ profileChangedAt,
+ avatarColor,
+ quotaSizeInBytes,
+ quotaUsageInBytes,
+ pinCode,
+ );
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is AuthUserEntityData &&
+ other.id == this.id &&
+ other.name == this.name &&
+ other.email == this.email &&
+ other.isAdmin == this.isAdmin &&
+ other.hasProfileImage == this.hasProfileImage &&
+ other.profileChangedAt == this.profileChangedAt &&
+ other.avatarColor == this.avatarColor &&
+ other.quotaSizeInBytes == this.quotaSizeInBytes &&
+ other.quotaUsageInBytes == this.quotaUsageInBytes &&
+ other.pinCode == this.pinCode);
+}
+
+class AuthUserEntityCompanion extends UpdateCompanion<AuthUserEntityData> {
+ final Value<String> id;
+ final Value<String> name;
+ final Value<String> email;
+ final Value<int> isAdmin;
+ final Value<int> hasProfileImage;
+ final Value<String> profileChangedAt;
+ final Value<int> avatarColor;
+ final Value<int> quotaSizeInBytes;
+ final Value<int> quotaUsageInBytes;
+ final Value<String?> pinCode;
+ const AuthUserEntityCompanion({
+ this.id = const Value.absent(),
+ this.name = const Value.absent(),
+ this.email = const Value.absent(),
+ this.isAdmin = const Value.absent(),
+ this.hasProfileImage = const Value.absent(),
+ this.profileChangedAt = const Value.absent(),
+ this.avatarColor = const Value.absent(),
+ this.quotaSizeInBytes = const Value.absent(),
+ this.quotaUsageInBytes = const Value.absent(),
+ this.pinCode = const Value.absent(),
+ });
+ AuthUserEntityCompanion.insert({
+ required String id,
+ required String name,
+ required String email,
+ this.isAdmin = const Value.absent(),
+ this.hasProfileImage = const Value.absent(),
+ this.profileChangedAt = const Value.absent(),
+ required int avatarColor,
+ this.quotaSizeInBytes = const Value.absent(),
+ this.quotaUsageInBytes = const Value.absent(),
+ this.pinCode = const Value.absent(),
+ }) : id = Value(id),
+ name = Value(name),
+ email = Value(email),
+ avatarColor = Value(avatarColor);
+ static Insertable<AuthUserEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? name,
+ Expression<String>? email,
+ Expression<int>? isAdmin,
+ Expression<int>? hasProfileImage,
+ Expression<String>? profileChangedAt,
+ Expression<int>? avatarColor,
+ Expression<int>? quotaSizeInBytes,
+ Expression<int>? quotaUsageInBytes,
+ Expression<String>? pinCode,
+ }) {
+ return RawValuesInsertable({
+ if (id != null) 'id': id,
+ if (name != null) 'name': name,
+ if (email != null) 'email': email,
+ if (isAdmin != null) 'is_admin': isAdmin,
+ if (hasProfileImage != null) 'has_profile_image': hasProfileImage,
+ if (profileChangedAt != null) 'profile_changed_at': profileChangedAt,
+ if (avatarColor != null) 'avatar_color': avatarColor,
+ if (quotaSizeInBytes != null) 'quota_size_in_bytes': quotaSizeInBytes,
+ if (quotaUsageInBytes != null) 'quota_usage_in_bytes': quotaUsageInBytes,
+ if (pinCode != null) 'pin_code': pinCode,
+ });
+ }
+
+ AuthUserEntityCompanion copyWith({
+ Value<String>? id,
+ Value<String>? name,
+ Value<String>? email,
+ Value<int>? isAdmin,
+ Value<int>? hasProfileImage,
+ Value<String>? profileChangedAt,
+ Value<int>? avatarColor,
+ Value<int>? quotaSizeInBytes,
+ Value<int>? quotaUsageInBytes,
+ Value<String?>? pinCode,
+ }) {
+ return AuthUserEntityCompanion(
+ id: id ?? this.id,
+ name: name ?? this.name,
+ email: email ?? this.email,
+ isAdmin: isAdmin ?? this.isAdmin,
+ hasProfileImage: hasProfileImage ?? this.hasProfileImage,
+ profileChangedAt: profileChangedAt ?? this.profileChangedAt,
+ avatarColor: avatarColor ?? this.avatarColor,
+ quotaSizeInBytes: quotaSizeInBytes ?? this.quotaSizeInBytes,
+ quotaUsageInBytes: quotaUsageInBytes ?? this.quotaUsageInBytes,
+ pinCode: pinCode ?? this.pinCode,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (email.present) {
+ map['email'] = Variable<String>(email.value);
+ }
+ if (isAdmin.present) {
+ map['is_admin'] = Variable<int>(isAdmin.value);
+ }
+ if (hasProfileImage.present) {
+ map['has_profile_image'] = Variable<int>(hasProfileImage.value);
+ }
+ if (profileChangedAt.present) {
+ map['profile_changed_at'] = Variable<String>(profileChangedAt.value);
+ }
+ if (avatarColor.present) {
+ map['avatar_color'] = Variable<int>(avatarColor.value);
+ }
+ if (quotaSizeInBytes.present) {
+ map['quota_size_in_bytes'] = Variable<int>(quotaSizeInBytes.value);
+ }
+ if (quotaUsageInBytes.present) {
+ map['quota_usage_in_bytes'] = Variable<int>(quotaUsageInBytes.value);
+ }
+ if (pinCode.present) {
+ map['pin_code'] = Variable<String>(pinCode.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('AuthUserEntityCompanion(')
+ ..write('id: $id, ')
+ ..write('name: $name, ')
+ ..write('email: $email, ')
+ ..write('isAdmin: $isAdmin, ')
+ ..write('hasProfileImage: $hasProfileImage, ')
+ ..write('profileChangedAt: $profileChangedAt, ')
+ ..write('avatarColor: $avatarColor, ')
+ ..write('quotaSizeInBytes: $quotaSizeInBytes, ')
+ ..write('quotaUsageInBytes: $quotaUsageInBytes, ')
+ ..write('pinCode: $pinCode')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class UserMetadataEntity extends Table
+ with TableInfo<UserMetadataEntity, UserMetadataEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ UserMetadataEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> userId = GeneratedColumn<String>(
+ 'user_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<int> key = GeneratedColumn<int>(
+ 'key',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {userId, key};
+ @override
+ UserMetadataEntityData map(Map<String, dynamic> 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;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(user_id, "key")'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class UserMetadataEntityData extends DataClass
+ implements Insertable<UserMetadataEntityData> {
+ final String userId;
+ final int key;
+ final i2.Uint8List value;
+ const UserMetadataEntityData({
+ required this.userId,
+ required this.key,
+ required this.value,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['user_id'] = Variable<String>(userId);
+ map['key'] = Variable<int>(key);
+ map['value'] = Variable<i2.Uint8List>(value);
+ return map;
+ }
+
+ factory UserMetadataEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return UserMetadataEntityData(
+ userId: serializer.fromJson<String>(json['userId']),
+ key: serializer.fromJson<int>(json['key']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'userId': serializer.toJson<String>(userId),
+ 'key': serializer.toJson<int>(key),
+ 'value': serializer.toJson<i2.Uint8List>(value),
+ };
+ }
+
+ UserMetadataEntityData copyWith({
+ String? userId,
+ int? key,
+ i2.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<UserMetadataEntityData> {
+ final Value<String> userId;
+ final Value<int> key;
+ final Value<i2.Uint8List> 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 i2.Uint8List value,
+ }) : userId = Value(userId),
+ key = Value(key),
+ value = Value(value);
+ static Insertable<UserMetadataEntityData> custom({
+ Expression<String>? userId,
+ Expression<int>? key,
+ Expression<i2.Uint8List>? value,
+ }) {
+ return RawValuesInsertable({
+ if (userId != null) 'user_id': userId,
+ if (key != null) 'key': key,
+ if (value != null) 'value': value,
+ });
+ }
+
+ UserMetadataEntityCompanion copyWith({
+ Value<String>? userId,
+ Value<int>? key,
+ Value<i2.Uint8List>? value,
+ }) {
+ return UserMetadataEntityCompanion(
+ userId: userId ?? this.userId,
+ key: key ?? this.key,
+ value: value ?? this.value,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (userId.present) {
+ map['user_id'] = Variable<String>(userId.value);
+ }
+ if (key.present) {
+ map['key'] = Variable<int>(key.value);
+ }
+ if (value.present) {
+ map['value'] = Variable<i2.Uint8List>(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<PartnerEntity, PartnerEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ PartnerEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> sharedById = GeneratedColumn<String>(
+ 'shared_by_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> sharedWithId = GeneratedColumn<String>(
+ 'shared_with_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<int> inTimeline = GeneratedColumn<int>(
+ 'in_timeline',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (in_timeline IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ @override
+ List<GeneratedColumn> get $columns => [sharedById, sharedWithId, inTimeline];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'partner_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {sharedById, sharedWithId};
+ @override
+ PartnerEntityData map(Map<String, dynamic> 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.int,
+ data['${effectivePrefix}in_timeline'],
+ )!,
+ );
+ }
+
+ @override
+ PartnerEntity createAlias(String alias) {
+ return PartnerEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const [
+ 'PRIMARY KEY(shared_by_id, shared_with_id)',
+ ];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class PartnerEntityData extends DataClass
+ implements Insertable<PartnerEntityData> {
+ final String sharedById;
+ final String sharedWithId;
+ final int inTimeline;
+ const PartnerEntityData({
+ required this.sharedById,
+ required this.sharedWithId,
+ required this.inTimeline,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['shared_by_id'] = Variable<String>(sharedById);
+ map['shared_with_id'] = Variable<String>(sharedWithId);
+ map['in_timeline'] = Variable<int>(inTimeline);
+ return map;
+ }
+
+ factory PartnerEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return PartnerEntityData(
+ sharedById: serializer.fromJson<String>(json['sharedById']),
+ sharedWithId: serializer.fromJson<String>(json['sharedWithId']),
+ inTimeline: serializer.fromJson<int>(json['inTimeline']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'sharedById': serializer.toJson<String>(sharedById),
+ 'sharedWithId': serializer.toJson<String>(sharedWithId),
+ 'inTimeline': serializer.toJson<int>(inTimeline),
+ };
+ }
+
+ PartnerEntityData copyWith({
+ String? sharedById,
+ String? sharedWithId,
+ int? 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<PartnerEntityData> {
+ final Value<String> sharedById;
+ final Value<String> sharedWithId;
+ final Value<int> 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<PartnerEntityData> custom({
+ Expression<String>? sharedById,
+ Expression<String>? sharedWithId,
+ Expression<int>? 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<String>? sharedById,
+ Value<String>? sharedWithId,
+ Value<int>? inTimeline,
+ }) {
+ return PartnerEntityCompanion(
+ sharedById: sharedById ?? this.sharedById,
+ sharedWithId: sharedWithId ?? this.sharedWithId,
+ inTimeline: inTimeline ?? this.inTimeline,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (sharedById.present) {
+ map['shared_by_id'] = Variable<String>(sharedById.value);
+ }
+ if (sharedWithId.present) {
+ map['shared_with_id'] = Variable<String>(sharedWithId.value);
+ }
+ if (inTimeline.present) {
+ map['in_timeline'] = Variable<int>(inTimeline.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('PartnerEntityCompanion(')
+ ..write('sharedById: $sharedById, ')
+ ..write('sharedWithId: $sharedWithId, ')
+ ..write('inTimeline: $inTimeline')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class RemoteExifEntity extends Table
+ with TableInfo<RemoteExifEntity, RemoteExifEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ RemoteExifEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> city = GeneratedColumn<String>(
+ 'city',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> state = GeneratedColumn<String>(
+ 'state',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> country = GeneratedColumn<String>(
+ 'country',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> dateTimeOriginal = GeneratedColumn<String>(
+ 'date_time_original',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> description = GeneratedColumn<String>(
+ 'description',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> height = GeneratedColumn<int>(
+ 'height',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> width = GeneratedColumn<int>(
+ 'width',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> exposureTime = GeneratedColumn<String>(
+ 'exposure_time',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> fNumber = GeneratedColumn<double>(
+ 'f_number',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> fileSize = GeneratedColumn<int>(
+ 'file_size',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> focalLength = GeneratedColumn<double>(
+ 'focal_length',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> latitude = GeneratedColumn<double>(
+ 'latitude',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> longitude = GeneratedColumn<double>(
+ 'longitude',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> iso = GeneratedColumn<int>(
+ 'iso',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> make = GeneratedColumn<String>(
+ 'make',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> model = GeneratedColumn<String>(
+ 'model',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> lens = GeneratedColumn<String>(
+ 'lens',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> orientation = GeneratedColumn<String>(
+ 'orientation',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> timeZone = GeneratedColumn<String>(
+ 'time_zone',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> rating = GeneratedColumn<int>(
+ 'rating',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> projectionType = GeneratedColumn<String>(
+ 'projection_type',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {assetId};
+ @override
+ RemoteExifEntityData map(Map<String, dynamic> 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.string,
+ 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;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(asset_id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class RemoteExifEntityData extends DataClass
+ implements Insertable<RemoteExifEntityData> {
+ final String assetId;
+ final String? city;
+ final String? state;
+ final String? country;
+ final String? 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['asset_id'] = Variable<String>(assetId);
+ if (!nullToAbsent || city != null) {
+ map['city'] = Variable<String>(city);
+ }
+ if (!nullToAbsent || state != null) {
+ map['state'] = Variable<String>(state);
+ }
+ if (!nullToAbsent || country != null) {
+ map['country'] = Variable<String>(country);
+ }
+ if (!nullToAbsent || dateTimeOriginal != null) {
+ map['date_time_original'] = Variable<String>(dateTimeOriginal);
+ }
+ if (!nullToAbsent || description != null) {
+ map['description'] = Variable<String>(description);
+ }
+ if (!nullToAbsent || height != null) {
+ map['height'] = Variable<int>(height);
+ }
+ if (!nullToAbsent || width != null) {
+ map['width'] = Variable<int>(width);
+ }
+ if (!nullToAbsent || exposureTime != null) {
+ map['exposure_time'] = Variable<String>(exposureTime);
+ }
+ if (!nullToAbsent || fNumber != null) {
+ map['f_number'] = Variable<double>(fNumber);
+ }
+ if (!nullToAbsent || fileSize != null) {
+ map['file_size'] = Variable<int>(fileSize);
+ }
+ if (!nullToAbsent || focalLength != null) {
+ map['focal_length'] = Variable<double>(focalLength);
+ }
+ if (!nullToAbsent || latitude != null) {
+ map['latitude'] = Variable<double>(latitude);
+ }
+ if (!nullToAbsent || longitude != null) {
+ map['longitude'] = Variable<double>(longitude);
+ }
+ if (!nullToAbsent || iso != null) {
+ map['iso'] = Variable<int>(iso);
+ }
+ if (!nullToAbsent || make != null) {
+ map['make'] = Variable<String>(make);
+ }
+ if (!nullToAbsent || model != null) {
+ map['model'] = Variable<String>(model);
+ }
+ if (!nullToAbsent || lens != null) {
+ map['lens'] = Variable<String>(lens);
+ }
+ if (!nullToAbsent || orientation != null) {
+ map['orientation'] = Variable<String>(orientation);
+ }
+ if (!nullToAbsent || timeZone != null) {
+ map['time_zone'] = Variable<String>(timeZone);
+ }
+ if (!nullToAbsent || rating != null) {
+ map['rating'] = Variable<int>(rating);
+ }
+ if (!nullToAbsent || projectionType != null) {
+ map['projection_type'] = Variable<String>(projectionType);
+ }
+ return map;
+ }
+
+ factory RemoteExifEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return RemoteExifEntityData(
+ assetId: serializer.fromJson<String>(json['assetId']),
+ city: serializer.fromJson<String?>(json['city']),
+ state: serializer.fromJson<String?>(json['state']),
+ country: serializer.fromJson<String?>(json['country']),
+ dateTimeOriginal: serializer.fromJson<String?>(json['dateTimeOriginal']),
+ description: serializer.fromJson<String?>(json['description']),
+ height: serializer.fromJson<int?>(json['height']),
+ width: serializer.fromJson<int?>(json['width']),
+ exposureTime: serializer.fromJson<String?>(json['exposureTime']),
+ fNumber: serializer.fromJson<double?>(json['fNumber']),
+ fileSize: serializer.fromJson<int?>(json['fileSize']),
+ focalLength: serializer.fromJson<double?>(json['focalLength']),
+ latitude: serializer.fromJson<double?>(json['latitude']),
+ longitude: serializer.fromJson<double?>(json['longitude']),
+ iso: serializer.fromJson<int?>(json['iso']),
+ make: serializer.fromJson<String?>(json['make']),
+ model: serializer.fromJson<String?>(json['model']),
+ lens: serializer.fromJson<String?>(json['lens']),
+ orientation: serializer.fromJson<String?>(json['orientation']),
+ timeZone: serializer.fromJson<String?>(json['timeZone']),
+ rating: serializer.fromJson<int?>(json['rating']),
+ projectionType: serializer.fromJson<String?>(json['projectionType']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'assetId': serializer.toJson<String>(assetId),
+ 'city': serializer.toJson<String?>(city),
+ 'state': serializer.toJson<String?>(state),
+ 'country': serializer.toJson<String?>(country),
+ 'dateTimeOriginal': serializer.toJson<String?>(dateTimeOriginal),
+ 'description': serializer.toJson<String?>(description),
+ 'height': serializer.toJson<int?>(height),
+ 'width': serializer.toJson<int?>(width),
+ 'exposureTime': serializer.toJson<String?>(exposureTime),
+ 'fNumber': serializer.toJson<double?>(fNumber),
+ 'fileSize': serializer.toJson<int?>(fileSize),
+ 'focalLength': serializer.toJson<double?>(focalLength),
+ 'latitude': serializer.toJson<double?>(latitude),
+ 'longitude': serializer.toJson<double?>(longitude),
+ 'iso': serializer.toJson<int?>(iso),
+ 'make': serializer.toJson<String?>(make),
+ 'model': serializer.toJson<String?>(model),
+ 'lens': serializer.toJson<String?>(lens),
+ 'orientation': serializer.toJson<String?>(orientation),
+ 'timeZone': serializer.toJson<String?>(timeZone),
+ 'rating': serializer.toJson<int?>(rating),
+ 'projectionType': serializer.toJson<String?>(projectionType),
+ };
+ }
+
+ RemoteExifEntityData copyWith({
+ String? assetId,
+ Value<String?> city = const Value.absent(),
+ Value<String?> state = const Value.absent(),
+ Value<String?> country = const Value.absent(),
+ Value<String?> dateTimeOriginal = const Value.absent(),
+ Value<String?> description = const Value.absent(),
+ Value<int?> height = const Value.absent(),
+ Value<int?> width = const Value.absent(),
+ Value<String?> exposureTime = const Value.absent(),
+ Value<double?> fNumber = const Value.absent(),
+ Value<int?> fileSize = const Value.absent(),
+ Value<double?> focalLength = const Value.absent(),
+ Value<double?> latitude = const Value.absent(),
+ Value<double?> longitude = const Value.absent(),
+ Value<int?> iso = const Value.absent(),
+ Value<String?> make = const Value.absent(),
+ Value<String?> model = const Value.absent(),
+ Value<String?> lens = const Value.absent(),
+ Value<String?> orientation = const Value.absent(),
+ Value<String?> timeZone = const Value.absent(),
+ Value<int?> rating = const Value.absent(),
+ Value<String?> 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<RemoteExifEntityData> {
+ final Value<String> assetId;
+ final Value<String?> city;
+ final Value<String?> state;
+ final Value<String?> country;
+ final Value<String?> dateTimeOriginal;
+ final Value<String?> description;
+ final Value<int?> height;
+ final Value<int?> width;
+ final Value<String?> exposureTime;
+ final Value<double?> fNumber;
+ final Value<int?> fileSize;
+ final Value<double?> focalLength;
+ final Value<double?> latitude;
+ final Value<double?> longitude;
+ final Value<int?> iso;
+ final Value<String?> make;
+ final Value<String?> model;
+ final Value<String?> lens;
+ final Value<String?> orientation;
+ final Value<String?> timeZone;
+ final Value<int?> rating;
+ final Value<String?> 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<RemoteExifEntityData> custom({
+ Expression<String>? assetId,
+ Expression<String>? city,
+ Expression<String>? state,
+ Expression<String>? country,
+ Expression<String>? dateTimeOriginal,
+ Expression<String>? description,
+ Expression<int>? height,
+ Expression<int>? width,
+ Expression<String>? exposureTime,
+ Expression<double>? fNumber,
+ Expression<int>? fileSize,
+ Expression<double>? focalLength,
+ Expression<double>? latitude,
+ Expression<double>? longitude,
+ Expression<int>? iso,
+ Expression<String>? make,
+ Expression<String>? model,
+ Expression<String>? lens,
+ Expression<String>? orientation,
+ Expression<String>? timeZone,
+ Expression<int>? rating,
+ Expression<String>? 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<String>? assetId,
+ Value<String?>? city,
+ Value<String?>? state,
+ Value<String?>? country,
+ Value<String?>? dateTimeOriginal,
+ Value<String?>? description,
+ Value<int?>? height,
+ Value<int?>? width,
+ Value<String?>? exposureTime,
+ Value<double?>? fNumber,
+ Value<int?>? fileSize,
+ Value<double?>? focalLength,
+ Value<double?>? latitude,
+ Value<double?>? longitude,
+ Value<int?>? iso,
+ Value<String?>? make,
+ Value<String?>? model,
+ Value<String?>? lens,
+ Value<String?>? orientation,
+ Value<String?>? timeZone,
+ Value<int?>? rating,
+ Value<String?>? 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (city.present) {
+ map['city'] = Variable<String>(city.value);
+ }
+ if (state.present) {
+ map['state'] = Variable<String>(state.value);
+ }
+ if (country.present) {
+ map['country'] = Variable<String>(country.value);
+ }
+ if (dateTimeOriginal.present) {
+ map['date_time_original'] = Variable<String>(dateTimeOriginal.value);
+ }
+ if (description.present) {
+ map['description'] = Variable<String>(description.value);
+ }
+ if (height.present) {
+ map['height'] = Variable<int>(height.value);
+ }
+ if (width.present) {
+ map['width'] = Variable<int>(width.value);
+ }
+ if (exposureTime.present) {
+ map['exposure_time'] = Variable<String>(exposureTime.value);
+ }
+ if (fNumber.present) {
+ map['f_number'] = Variable<double>(fNumber.value);
+ }
+ if (fileSize.present) {
+ map['file_size'] = Variable<int>(fileSize.value);
+ }
+ if (focalLength.present) {
+ map['focal_length'] = Variable<double>(focalLength.value);
+ }
+ if (latitude.present) {
+ map['latitude'] = Variable<double>(latitude.value);
+ }
+ if (longitude.present) {
+ map['longitude'] = Variable<double>(longitude.value);
+ }
+ if (iso.present) {
+ map['iso'] = Variable<int>(iso.value);
+ }
+ if (make.present) {
+ map['make'] = Variable<String>(make.value);
+ }
+ if (model.present) {
+ map['model'] = Variable<String>(model.value);
+ }
+ if (lens.present) {
+ map['lens'] = Variable<String>(lens.value);
+ }
+ if (orientation.present) {
+ map['orientation'] = Variable<String>(orientation.value);
+ }
+ if (timeZone.present) {
+ map['time_zone'] = Variable<String>(timeZone.value);
+ }
+ if (rating.present) {
+ map['rating'] = Variable<int>(rating.value);
+ }
+ if (projectionType.present) {
+ map['projection_type'] = Variable<String>(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 RemoteAlbumAssetEntity extends Table
+ with TableInfo<RemoteAlbumAssetEntity, RemoteAlbumAssetEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ RemoteAlbumAssetEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {assetId, albumId};
+ @override
+ RemoteAlbumAssetEntityData map(
+ Map<String, dynamic> 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;
+ @override
+ List<String> get customConstraints => const [
+ 'PRIMARY KEY(asset_id, album_id)',
+ ];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class RemoteAlbumAssetEntityData extends DataClass
+ implements Insertable<RemoteAlbumAssetEntityData> {
+ final String assetId;
+ final String albumId;
+ const RemoteAlbumAssetEntityData({
+ required this.assetId,
+ required this.albumId,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['asset_id'] = Variable<String>(assetId);
+ map['album_id'] = Variable<String>(albumId);
+ return map;
+ }
+
+ factory RemoteAlbumAssetEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return RemoteAlbumAssetEntityData(
+ assetId: serializer.fromJson<String>(json['assetId']),
+ albumId: serializer.fromJson<String>(json['albumId']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'assetId': serializer.toJson<String>(assetId),
+ 'albumId': serializer.toJson<String>(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<RemoteAlbumAssetEntityData> {
+ final Value<String> assetId;
+ final Value<String> 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<RemoteAlbumAssetEntityData> custom({
+ Expression<String>? assetId,
+ Expression<String>? albumId,
+ }) {
+ return RawValuesInsertable({
+ if (assetId != null) 'asset_id': assetId,
+ if (albumId != null) 'album_id': albumId,
+ });
+ }
+
+ RemoteAlbumAssetEntityCompanion copyWith({
+ Value<String>? assetId,
+ Value<String>? albumId,
+ }) {
+ return RemoteAlbumAssetEntityCompanion(
+ assetId: assetId ?? this.assetId,
+ albumId: albumId ?? this.albumId,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (albumId.present) {
+ map['album_id'] = Variable<String>(albumId.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('RemoteAlbumAssetEntityCompanion(')
+ ..write('assetId: $assetId, ')
+ ..write('albumId: $albumId')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class RemoteAlbumUserEntity extends Table
+ with TableInfo<RemoteAlbumUserEntity, RemoteAlbumUserEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ RemoteAlbumUserEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_album_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> userId = GeneratedColumn<String>(
+ 'user_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<int> role = GeneratedColumn<int>(
+ 'role',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {albumId, userId};
+ @override
+ RemoteAlbumUserEntityData map(
+ Map<String, dynamic> 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;
+ @override
+ List<String> get customConstraints => const [
+ 'PRIMARY KEY(album_id, user_id)',
+ ];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class RemoteAlbumUserEntityData extends DataClass
+ implements Insertable<RemoteAlbumUserEntityData> {
+ final String albumId;
+ final String userId;
+ final int role;
+ const RemoteAlbumUserEntityData({
+ required this.albumId,
+ required this.userId,
+ required this.role,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['album_id'] = Variable<String>(albumId);
+ map['user_id'] = Variable<String>(userId);
+ map['role'] = Variable<int>(role);
+ return map;
+ }
+
+ factory RemoteAlbumUserEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return RemoteAlbumUserEntityData(
+ albumId: serializer.fromJson<String>(json['albumId']),
+ userId: serializer.fromJson<String>(json['userId']),
+ role: serializer.fromJson<int>(json['role']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'albumId': serializer.toJson<String>(albumId),
+ 'userId': serializer.toJson<String>(userId),
+ 'role': serializer.toJson<int>(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<RemoteAlbumUserEntityData> {
+ final Value<String> albumId;
+ final Value<String> userId;
+ final Value<int> 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<RemoteAlbumUserEntityData> custom({
+ Expression<String>? albumId,
+ Expression<String>? userId,
+ Expression<int>? role,
+ }) {
+ return RawValuesInsertable({
+ if (albumId != null) 'album_id': albumId,
+ if (userId != null) 'user_id': userId,
+ if (role != null) 'role': role,
+ });
+ }
+
+ RemoteAlbumUserEntityCompanion copyWith({
+ Value<String>? albumId,
+ Value<String>? userId,
+ Value<int>? role,
+ }) {
+ return RemoteAlbumUserEntityCompanion(
+ albumId: albumId ?? this.albumId,
+ userId: userId ?? this.userId,
+ role: role ?? this.role,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (albumId.present) {
+ map['album_id'] = Variable<String>(albumId.value);
+ }
+ if (userId.present) {
+ map['user_id'] = Variable<String>(userId.value);
+ }
+ if (role.present) {
+ map['role'] = Variable<int>(role.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('RemoteAlbumUserEntityCompanion(')
+ ..write('albumId: $albumId, ')
+ ..write('userId: $userId, ')
+ ..write('role: $role')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class RemoteAssetCloudIdEntity extends Table
+ with TableInfo<RemoteAssetCloudIdEntity, RemoteAssetCloudIdEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ RemoteAssetCloudIdEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> cloudId = GeneratedColumn<String>(
+ 'cloud_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> adjustmentTime = GeneratedColumn<String>(
+ 'adjustment_time',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> latitude = GeneratedColumn<double>(
+ 'latitude',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<double> longitude = GeneratedColumn<double>(
+ 'longitude',
+ aliasedName,
+ true,
+ type: DriftSqlType.double,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ assetId,
+ cloudId,
+ createdAt,
+ adjustmentTime,
+ latitude,
+ longitude,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'remote_asset_cloud_id_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {assetId};
+ @override
+ RemoteAssetCloudIdEntityData map(
+ Map<String, dynamic> data, {
+ String? tablePrefix,
+ }) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return RemoteAssetCloudIdEntityData(
+ assetId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}asset_id'],
+ )!,
+ cloudId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}cloud_id'],
+ ),
+ createdAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}created_at'],
+ ),
+ adjustmentTime: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}adjustment_time'],
+ ),
+ latitude: attachedDatabase.typeMapping.read(
+ DriftSqlType.double,
+ data['${effectivePrefix}latitude'],
+ ),
+ longitude: attachedDatabase.typeMapping.read(
+ DriftSqlType.double,
+ data['${effectivePrefix}longitude'],
+ ),
+ );
+ }
+
+ @override
+ RemoteAssetCloudIdEntity createAlias(String alias) {
+ return RemoteAssetCloudIdEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(asset_id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class RemoteAssetCloudIdEntityData extends DataClass
+ implements Insertable<RemoteAssetCloudIdEntityData> {
+ final String assetId;
+ final String? cloudId;
+ final String? createdAt;
+ final String? adjustmentTime;
+ final double? latitude;
+ final double? longitude;
+ const RemoteAssetCloudIdEntityData({
+ required this.assetId,
+ this.cloudId,
+ this.createdAt,
+ this.adjustmentTime,
+ this.latitude,
+ this.longitude,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['asset_id'] = Variable<String>(assetId);
+ if (!nullToAbsent || cloudId != null) {
+ map['cloud_id'] = Variable<String>(cloudId);
+ }
+ if (!nullToAbsent || createdAt != null) {
+ map['created_at'] = Variable<String>(createdAt);
+ }
+ if (!nullToAbsent || adjustmentTime != null) {
+ map['adjustment_time'] = Variable<String>(adjustmentTime);
+ }
+ if (!nullToAbsent || latitude != null) {
+ map['latitude'] = Variable<double>(latitude);
+ }
+ if (!nullToAbsent || longitude != null) {
+ map['longitude'] = Variable<double>(longitude);
+ }
+ return map;
+ }
+
+ factory RemoteAssetCloudIdEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return RemoteAssetCloudIdEntityData(
+ assetId: serializer.fromJson<String>(json['assetId']),
+ cloudId: serializer.fromJson<String?>(json['cloudId']),
+ createdAt: serializer.fromJson<String?>(json['createdAt']),
+ adjustmentTime: serializer.fromJson<String?>(json['adjustmentTime']),
+ latitude: serializer.fromJson<double?>(json['latitude']),
+ longitude: serializer.fromJson<double?>(json['longitude']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'assetId': serializer.toJson<String>(assetId),
+ 'cloudId': serializer.toJson<String?>(cloudId),
+ 'createdAt': serializer.toJson<String?>(createdAt),
+ 'adjustmentTime': serializer.toJson<String?>(adjustmentTime),
+ 'latitude': serializer.toJson<double?>(latitude),
+ 'longitude': serializer.toJson<double?>(longitude),
+ };
+ }
+
+ RemoteAssetCloudIdEntityData copyWith({
+ String? assetId,
+ Value<String?> cloudId = const Value.absent(),
+ Value<String?> createdAt = const Value.absent(),
+ Value<String?> adjustmentTime = const Value.absent(),
+ Value<double?> latitude = const Value.absent(),
+ Value<double?> longitude = const Value.absent(),
+ }) => RemoteAssetCloudIdEntityData(
+ assetId: assetId ?? this.assetId,
+ cloudId: cloudId.present ? cloudId.value : this.cloudId,
+ createdAt: createdAt.present ? createdAt.value : this.createdAt,
+ adjustmentTime: adjustmentTime.present
+ ? adjustmentTime.value
+ : this.adjustmentTime,
+ latitude: latitude.present ? latitude.value : this.latitude,
+ longitude: longitude.present ? longitude.value : this.longitude,
+ );
+ RemoteAssetCloudIdEntityData copyWithCompanion(
+ RemoteAssetCloudIdEntityCompanion data,
+ ) {
+ return RemoteAssetCloudIdEntityData(
+ assetId: data.assetId.present ? data.assetId.value : this.assetId,
+ cloudId: data.cloudId.present ? data.cloudId.value : this.cloudId,
+ createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
+ adjustmentTime: data.adjustmentTime.present
+ ? data.adjustmentTime.value
+ : this.adjustmentTime,
+ latitude: data.latitude.present ? data.latitude.value : this.latitude,
+ longitude: data.longitude.present ? data.longitude.value : this.longitude,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('RemoteAssetCloudIdEntityData(')
+ ..write('assetId: $assetId, ')
+ ..write('cloudId: $cloudId, ')
+ ..write('createdAt: $createdAt, ')
+ ..write('adjustmentTime: $adjustmentTime, ')
+ ..write('latitude: $latitude, ')
+ ..write('longitude: $longitude')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ assetId,
+ cloudId,
+ createdAt,
+ adjustmentTime,
+ latitude,
+ longitude,
+ );
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is RemoteAssetCloudIdEntityData &&
+ other.assetId == this.assetId &&
+ other.cloudId == this.cloudId &&
+ other.createdAt == this.createdAt &&
+ other.adjustmentTime == this.adjustmentTime &&
+ other.latitude == this.latitude &&
+ other.longitude == this.longitude);
+}
+
+class RemoteAssetCloudIdEntityCompanion
+ extends UpdateCompanion<RemoteAssetCloudIdEntityData> {
+ final Value<String> assetId;
+ final Value<String?> cloudId;
+ final Value<String?> createdAt;
+ final Value<String?> adjustmentTime;
+ final Value<double?> latitude;
+ final Value<double?> longitude;
+ const RemoteAssetCloudIdEntityCompanion({
+ this.assetId = const Value.absent(),
+ this.cloudId = const Value.absent(),
+ this.createdAt = const Value.absent(),
+ this.adjustmentTime = const Value.absent(),
+ this.latitude = const Value.absent(),
+ this.longitude = const Value.absent(),
+ });
+ RemoteAssetCloudIdEntityCompanion.insert({
+ required String assetId,
+ this.cloudId = const Value.absent(),
+ this.createdAt = const Value.absent(),
+ this.adjustmentTime = const Value.absent(),
+ this.latitude = const Value.absent(),
+ this.longitude = const Value.absent(),
+ }) : assetId = Value(assetId);
+ static Insertable<RemoteAssetCloudIdEntityData> custom({
+ Expression<String>? assetId,
+ Expression<String>? cloudId,
+ Expression<String>? createdAt,
+ Expression<String>? adjustmentTime,
+ Expression<double>? latitude,
+ Expression<double>? longitude,
+ }) {
+ return RawValuesInsertable({
+ if (assetId != null) 'asset_id': assetId,
+ if (cloudId != null) 'cloud_id': cloudId,
+ if (createdAt != null) 'created_at': createdAt,
+ if (adjustmentTime != null) 'adjustment_time': adjustmentTime,
+ if (latitude != null) 'latitude': latitude,
+ if (longitude != null) 'longitude': longitude,
+ });
+ }
+
+ RemoteAssetCloudIdEntityCompanion copyWith({
+ Value<String>? assetId,
+ Value<String?>? cloudId,
+ Value<String?>? createdAt,
+ Value<String?>? adjustmentTime,
+ Value<double?>? latitude,
+ Value<double?>? longitude,
+ }) {
+ return RemoteAssetCloudIdEntityCompanion(
+ assetId: assetId ?? this.assetId,
+ cloudId: cloudId ?? this.cloudId,
+ createdAt: createdAt ?? this.createdAt,
+ adjustmentTime: adjustmentTime ?? this.adjustmentTime,
+ latitude: latitude ?? this.latitude,
+ longitude: longitude ?? this.longitude,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (cloudId.present) {
+ map['cloud_id'] = Variable<String>(cloudId.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (adjustmentTime.present) {
+ map['adjustment_time'] = Variable<String>(adjustmentTime.value);
+ }
+ if (latitude.present) {
+ map['latitude'] = Variable<double>(latitude.value);
+ }
+ if (longitude.present) {
+ map['longitude'] = Variable<double>(longitude.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('RemoteAssetCloudIdEntityCompanion(')
+ ..write('assetId: $assetId, ')
+ ..write('cloudId: $cloudId, ')
+ ..write('createdAt: $createdAt, ')
+ ..write('adjustmentTime: $adjustmentTime, ')
+ ..write('latitude: $latitude, ')
+ ..write('longitude: $longitude')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class MemoryEntity extends Table
+ with TableInfo<MemoryEntity, MemoryEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ MemoryEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> deletedAt = GeneratedColumn<String>(
+ 'deleted_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
+ 'owner_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<int> type = GeneratedColumn<int>(
+ 'type',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> data = GeneratedColumn<String>(
+ 'data',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> isSaved = GeneratedColumn<int>(
+ 'is_saved',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_saved IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<String> memoryAt = GeneratedColumn<String>(
+ 'memory_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> seenAt = GeneratedColumn<String>(
+ 'seen_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> showAt = GeneratedColumn<String>(
+ 'show_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> hideAt = GeneratedColumn<String>(
+ 'hide_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> 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<GeneratedColumn> get $primaryKey => {id};
+ @override
+ MemoryEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return MemoryEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ createdAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}updated_at'],
+ )!,
+ deletedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ 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.int,
+ data['${effectivePrefix}is_saved'],
+ )!,
+ memoryAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}memory_at'],
+ )!,
+ seenAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}seen_at'],
+ ),
+ showAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}show_at'],
+ ),
+ hideAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}hide_at'],
+ ),
+ );
+ }
+
+ @override
+ MemoryEntity createAlias(String alias) {
+ return MemoryEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class MemoryEntityData extends DataClass
+ implements Insertable<MemoryEntityData> {
+ final String id;
+ final String createdAt;
+ final String updatedAt;
+ final String? deletedAt;
+ final String ownerId;
+ final int type;
+ final String data;
+ final int isSaved;
+ final String memoryAt;
+ final String? seenAt;
+ final String? showAt;
+ final String? 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ if (!nullToAbsent || deletedAt != null) {
+ map['deleted_at'] = Variable<String>(deletedAt);
+ }
+ map['owner_id'] = Variable<String>(ownerId);
+ map['type'] = Variable<int>(type);
+ map['data'] = Variable<String>(data);
+ map['is_saved'] = Variable<int>(isSaved);
+ map['memory_at'] = Variable<String>(memoryAt);
+ if (!nullToAbsent || seenAt != null) {
+ map['seen_at'] = Variable<String>(seenAt);
+ }
+ if (!nullToAbsent || showAt != null) {
+ map['show_at'] = Variable<String>(showAt);
+ }
+ if (!nullToAbsent || hideAt != null) {
+ map['hide_at'] = Variable<String>(hideAt);
+ }
+ return map;
+ }
+
+ factory MemoryEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return MemoryEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ deletedAt: serializer.fromJson<String?>(json['deletedAt']),
+ ownerId: serializer.fromJson<String>(json['ownerId']),
+ type: serializer.fromJson<int>(json['type']),
+ data: serializer.fromJson<String>(json['data']),
+ isSaved: serializer.fromJson<int>(json['isSaved']),
+ memoryAt: serializer.fromJson<String>(json['memoryAt']),
+ seenAt: serializer.fromJson<String?>(json['seenAt']),
+ showAt: serializer.fromJson<String?>(json['showAt']),
+ hideAt: serializer.fromJson<String?>(json['hideAt']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'deletedAt': serializer.toJson<String?>(deletedAt),
+ 'ownerId': serializer.toJson<String>(ownerId),
+ 'type': serializer.toJson<int>(type),
+ 'data': serializer.toJson<String>(data),
+ 'isSaved': serializer.toJson<int>(isSaved),
+ 'memoryAt': serializer.toJson<String>(memoryAt),
+ 'seenAt': serializer.toJson<String?>(seenAt),
+ 'showAt': serializer.toJson<String?>(showAt),
+ 'hideAt': serializer.toJson<String?>(hideAt),
+ };
+ }
+
+ MemoryEntityData copyWith({
+ String? id,
+ String? createdAt,
+ String? updatedAt,
+ Value<String?> deletedAt = const Value.absent(),
+ String? ownerId,
+ int? type,
+ String? data,
+ int? isSaved,
+ String? memoryAt,
+ Value<String?> seenAt = const Value.absent(),
+ Value<String?> showAt = const Value.absent(),
+ Value<String?> 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<MemoryEntityData> {
+ final Value<String> id;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<String?> deletedAt;
+ final Value<String> ownerId;
+ final Value<int> type;
+ final Value<String> data;
+ final Value<int> isSaved;
+ final Value<String> memoryAt;
+ final Value<String?> seenAt;
+ final Value<String?> showAt;
+ final Value<String?> 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 String 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<MemoryEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<String>? deletedAt,
+ Expression<String>? ownerId,
+ Expression<int>? type,
+ Expression<String>? data,
+ Expression<int>? isSaved,
+ Expression<String>? memoryAt,
+ Expression<String>? seenAt,
+ Expression<String>? showAt,
+ Expression<String>? 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<String>? id,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<String?>? deletedAt,
+ Value<String>? ownerId,
+ Value<int>? type,
+ Value<String>? data,
+ Value<int>? isSaved,
+ Value<String>? memoryAt,
+ Value<String?>? seenAt,
+ Value<String?>? showAt,
+ Value<String?>? 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<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (deletedAt.present) {
+ map['deleted_at'] = Variable<String>(deletedAt.value);
+ }
+ if (ownerId.present) {
+ map['owner_id'] = Variable<String>(ownerId.value);
+ }
+ if (type.present) {
+ map['type'] = Variable<int>(type.value);
+ }
+ if (data.present) {
+ map['data'] = Variable<String>(data.value);
+ }
+ if (isSaved.present) {
+ map['is_saved'] = Variable<int>(isSaved.value);
+ }
+ if (memoryAt.present) {
+ map['memory_at'] = Variable<String>(memoryAt.value);
+ }
+ if (seenAt.present) {
+ map['seen_at'] = Variable<String>(seenAt.value);
+ }
+ if (showAt.present) {
+ map['show_at'] = Variable<String>(showAt.value);
+ }
+ if (hideAt.present) {
+ map['hide_at'] = Variable<String>(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<MemoryAssetEntity, MemoryAssetEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ MemoryAssetEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> memoryId = GeneratedColumn<String>(
+ 'memory_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES memory_entity(id)ON DELETE CASCADE',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [assetId, memoryId];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'memory_asset_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {assetId, memoryId};
+ @override
+ MemoryAssetEntityData map(Map<String, dynamic> 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;
+ @override
+ List<String> get customConstraints => const [
+ 'PRIMARY KEY(asset_id, memory_id)',
+ ];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class MemoryAssetEntityData extends DataClass
+ implements Insertable<MemoryAssetEntityData> {
+ final String assetId;
+ final String memoryId;
+ const MemoryAssetEntityData({required this.assetId, required this.memoryId});
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['asset_id'] = Variable<String>(assetId);
+ map['memory_id'] = Variable<String>(memoryId);
+ return map;
+ }
+
+ factory MemoryAssetEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return MemoryAssetEntityData(
+ assetId: serializer.fromJson<String>(json['assetId']),
+ memoryId: serializer.fromJson<String>(json['memoryId']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'assetId': serializer.toJson<String>(assetId),
+ 'memoryId': serializer.toJson<String>(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<MemoryAssetEntityData> {
+ final Value<String> assetId;
+ final Value<String> 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<MemoryAssetEntityData> custom({
+ Expression<String>? assetId,
+ Expression<String>? memoryId,
+ }) {
+ return RawValuesInsertable({
+ if (assetId != null) 'asset_id': assetId,
+ if (memoryId != null) 'memory_id': memoryId,
+ });
+ }
+
+ MemoryAssetEntityCompanion copyWith({
+ Value<String>? assetId,
+ Value<String>? memoryId,
+ }) {
+ return MemoryAssetEntityCompanion(
+ assetId: assetId ?? this.assetId,
+ memoryId: memoryId ?? this.memoryId,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (memoryId.present) {
+ map['memory_id'] = Variable<String>(memoryId.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('MemoryAssetEntityCompanion(')
+ ..write('assetId: $assetId, ')
+ ..write('memoryId: $memoryId')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class PersonEntity extends Table
+ with TableInfo<PersonEntity, PersonEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ PersonEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> ownerId = GeneratedColumn<String>(
+ 'owner_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL REFERENCES user_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> faceAssetId = GeneratedColumn<String>(
+ 'face_asset_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> isFavorite = GeneratedColumn<int>(
+ 'is_favorite',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL CHECK (is_favorite IN (0, 1))',
+ );
+ late final GeneratedColumn<int> isHidden = GeneratedColumn<int>(
+ 'is_hidden',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL CHECK (is_hidden IN (0, 1))',
+ );
+ late final GeneratedColumn<String> color = GeneratedColumn<String>(
+ 'color',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> birthDate = GeneratedColumn<String>(
+ 'birth_date',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ id,
+ createdAt,
+ updatedAt,
+ ownerId,
+ name,
+ faceAssetId,
+ isFavorite,
+ isHidden,
+ color,
+ birthDate,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'person_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ PersonEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return PersonEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ createdAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ 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'],
+ ),
+ isFavorite: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_favorite'],
+ )!,
+ isHidden: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_hidden'],
+ )!,
+ color: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}color'],
+ ),
+ birthDate: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}birth_date'],
+ ),
+ );
+ }
+
+ @override
+ PersonEntity createAlias(String alias) {
+ return PersonEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class PersonEntityData extends DataClass
+ implements Insertable<PersonEntityData> {
+ final String id;
+ final String createdAt;
+ final String updatedAt;
+ final String ownerId;
+ final String name;
+ final String? faceAssetId;
+ final int isFavorite;
+ final int isHidden;
+ final String? color;
+ final String? birthDate;
+ const PersonEntityData({
+ required this.id,
+ required this.createdAt,
+ required this.updatedAt,
+ required this.ownerId,
+ required this.name,
+ this.faceAssetId,
+ required this.isFavorite,
+ required this.isHidden,
+ this.color,
+ this.birthDate,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ map['owner_id'] = Variable<String>(ownerId);
+ map['name'] = Variable<String>(name);
+ if (!nullToAbsent || faceAssetId != null) {
+ map['face_asset_id'] = Variable<String>(faceAssetId);
+ }
+ map['is_favorite'] = Variable<int>(isFavorite);
+ map['is_hidden'] = Variable<int>(isHidden);
+ if (!nullToAbsent || color != null) {
+ map['color'] = Variable<String>(color);
+ }
+ if (!nullToAbsent || birthDate != null) {
+ map['birth_date'] = Variable<String>(birthDate);
+ }
+ return map;
+ }
+
+ factory PersonEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return PersonEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ ownerId: serializer.fromJson<String>(json['ownerId']),
+ name: serializer.fromJson<String>(json['name']),
+ faceAssetId: serializer.fromJson<String?>(json['faceAssetId']),
+ isFavorite: serializer.fromJson<int>(json['isFavorite']),
+ isHidden: serializer.fromJson<int>(json['isHidden']),
+ color: serializer.fromJson<String?>(json['color']),
+ birthDate: serializer.fromJson<String?>(json['birthDate']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'ownerId': serializer.toJson<String>(ownerId),
+ 'name': serializer.toJson<String>(name),
+ 'faceAssetId': serializer.toJson<String?>(faceAssetId),
+ 'isFavorite': serializer.toJson<int>(isFavorite),
+ 'isHidden': serializer.toJson<int>(isHidden),
+ 'color': serializer.toJson<String?>(color),
+ 'birthDate': serializer.toJson<String?>(birthDate),
+ };
+ }
+
+ PersonEntityData copyWith({
+ String? id,
+ String? createdAt,
+ String? updatedAt,
+ String? ownerId,
+ String? name,
+ Value<String?> faceAssetId = const Value.absent(),
+ int? isFavorite,
+ int? isHidden,
+ Value<String?> color = const Value.absent(),
+ Value<String?> 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,
+ 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,
+ 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('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,
+ 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.isFavorite == this.isFavorite &&
+ other.isHidden == this.isHidden &&
+ other.color == this.color &&
+ other.birthDate == this.birthDate);
+}
+
+class PersonEntityCompanion extends UpdateCompanion<PersonEntityData> {
+ final Value<String> id;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<String> ownerId;
+ final Value<String> name;
+ final Value<String?> faceAssetId;
+ final Value<int> isFavorite;
+ final Value<int> isHidden;
+ final Value<String?> color;
+ final Value<String?> 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.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 int isFavorite,
+ required int isHidden,
+ this.color = const Value.absent(),
+ this.birthDate = const Value.absent(),
+ }) : id = Value(id),
+ ownerId = Value(ownerId),
+ name = Value(name),
+ isFavorite = Value(isFavorite),
+ isHidden = Value(isHidden);
+ static Insertable<PersonEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<String>? ownerId,
+ Expression<String>? name,
+ Expression<String>? faceAssetId,
+ Expression<int>? isFavorite,
+ Expression<int>? isHidden,
+ Expression<String>? color,
+ Expression<String>? 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 (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<String>? id,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<String>? ownerId,
+ Value<String>? name,
+ Value<String?>? faceAssetId,
+ Value<int>? isFavorite,
+ Value<int>? isHidden,
+ Value<String?>? color,
+ Value<String?>? 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,
+ isFavorite: isFavorite ?? this.isFavorite,
+ isHidden: isHidden ?? this.isHidden,
+ color: color ?? this.color,
+ birthDate: birthDate ?? this.birthDate,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (ownerId.present) {
+ map['owner_id'] = Variable<String>(ownerId.value);
+ }
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (faceAssetId.present) {
+ map['face_asset_id'] = Variable<String>(faceAssetId.value);
+ }
+ if (isFavorite.present) {
+ map['is_favorite'] = Variable<int>(isFavorite.value);
+ }
+ if (isHidden.present) {
+ map['is_hidden'] = Variable<int>(isHidden.value);
+ }
+ if (color.present) {
+ map['color'] = Variable<String>(color.value);
+ }
+ if (birthDate.present) {
+ map['birth_date'] = Variable<String>(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('isFavorite: $isFavorite, ')
+ ..write('isHidden: $isHidden, ')
+ ..write('color: $color, ')
+ ..write('birthDate: $birthDate')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class AssetFaceEntity extends Table
+ with TableInfo<AssetFaceEntity, AssetFaceEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ AssetFaceEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<String> personId = GeneratedColumn<String>(
+ 'person_id',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL REFERENCES person_entity(id)ON DELETE SET NULL',
+ );
+ late final GeneratedColumn<int> imageWidth = GeneratedColumn<int>(
+ 'image_width',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> imageHeight = GeneratedColumn<int>(
+ 'image_height',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> boundingBoxX1 = GeneratedColumn<int>(
+ 'bounding_box_x1',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> boundingBoxY1 = GeneratedColumn<int>(
+ 'bounding_box_y1',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> boundingBoxX2 = GeneratedColumn<int>(
+ 'bounding_box_x2',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> boundingBoxY2 = GeneratedColumn<int>(
+ 'bounding_box_y2',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> sourceType = GeneratedColumn<String>(
+ 'source_type',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> isVisible = GeneratedColumn<int>(
+ 'is_visible',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 1 CHECK (is_visible IN (0, 1))',
+ defaultValue: const CustomExpression('1'),
+ );
+ late final GeneratedColumn<String> deletedAt = GeneratedColumn<String>(
+ 'deleted_at',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ id,
+ assetId,
+ personId,
+ imageWidth,
+ imageHeight,
+ boundingBoxX1,
+ boundingBoxY1,
+ boundingBoxX2,
+ boundingBoxY2,
+ sourceType,
+ isVisible,
+ deletedAt,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'asset_face_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ AssetFaceEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return AssetFaceEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ assetId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}asset_id'],
+ )!,
+ personId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}person_id'],
+ ),
+ imageWidth: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}image_width'],
+ )!,
+ imageHeight: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}image_height'],
+ )!,
+ boundingBoxX1: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}bounding_box_x1'],
+ )!,
+ boundingBoxY1: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}bounding_box_y1'],
+ )!,
+ boundingBoxX2: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}bounding_box_x2'],
+ )!,
+ boundingBoxY2: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}bounding_box_y2'],
+ )!,
+ sourceType: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}source_type'],
+ )!,
+ isVisible: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_visible'],
+ )!,
+ deletedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}deleted_at'],
+ ),
+ );
+ }
+
+ @override
+ AssetFaceEntity createAlias(String alias) {
+ return AssetFaceEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class AssetFaceEntityData extends DataClass
+ implements Insertable<AssetFaceEntityData> {
+ final String id;
+ final String assetId;
+ final String? personId;
+ final int imageWidth;
+ final int imageHeight;
+ final int boundingBoxX1;
+ final int boundingBoxY1;
+ final int boundingBoxX2;
+ final int boundingBoxY2;
+ final String sourceType;
+ final int isVisible;
+ final String? deletedAt;
+ const AssetFaceEntityData({
+ required this.id,
+ required this.assetId,
+ this.personId,
+ required this.imageWidth,
+ required this.imageHeight,
+ required this.boundingBoxX1,
+ required this.boundingBoxY1,
+ required this.boundingBoxX2,
+ required this.boundingBoxY2,
+ required this.sourceType,
+ required this.isVisible,
+ this.deletedAt,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['asset_id'] = Variable<String>(assetId);
+ if (!nullToAbsent || personId != null) {
+ map['person_id'] = Variable<String>(personId);
+ }
+ map['image_width'] = Variable<int>(imageWidth);
+ map['image_height'] = Variable<int>(imageHeight);
+ map['bounding_box_x1'] = Variable<int>(boundingBoxX1);
+ map['bounding_box_y1'] = Variable<int>(boundingBoxY1);
+ map['bounding_box_x2'] = Variable<int>(boundingBoxX2);
+ map['bounding_box_y2'] = Variable<int>(boundingBoxY2);
+ map['source_type'] = Variable<String>(sourceType);
+ map['is_visible'] = Variable<int>(isVisible);
+ if (!nullToAbsent || deletedAt != null) {
+ map['deleted_at'] = Variable<String>(deletedAt);
+ }
+ return map;
+ }
+
+ factory AssetFaceEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return AssetFaceEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ assetId: serializer.fromJson<String>(json['assetId']),
+ personId: serializer.fromJson<String?>(json['personId']),
+ imageWidth: serializer.fromJson<int>(json['imageWidth']),
+ imageHeight: serializer.fromJson<int>(json['imageHeight']),
+ boundingBoxX1: serializer.fromJson<int>(json['boundingBoxX1']),
+ boundingBoxY1: serializer.fromJson<int>(json['boundingBoxY1']),
+ boundingBoxX2: serializer.fromJson<int>(json['boundingBoxX2']),
+ boundingBoxY2: serializer.fromJson<int>(json['boundingBoxY2']),
+ sourceType: serializer.fromJson<String>(json['sourceType']),
+ isVisible: serializer.fromJson<int>(json['isVisible']),
+ deletedAt: serializer.fromJson<String?>(json['deletedAt']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'assetId': serializer.toJson<String>(assetId),
+ 'personId': serializer.toJson<String?>(personId),
+ 'imageWidth': serializer.toJson<int>(imageWidth),
+ 'imageHeight': serializer.toJson<int>(imageHeight),
+ 'boundingBoxX1': serializer.toJson<int>(boundingBoxX1),
+ 'boundingBoxY1': serializer.toJson<int>(boundingBoxY1),
+ 'boundingBoxX2': serializer.toJson<int>(boundingBoxX2),
+ 'boundingBoxY2': serializer.toJson<int>(boundingBoxY2),
+ 'sourceType': serializer.toJson<String>(sourceType),
+ 'isVisible': serializer.toJson<int>(isVisible),
+ 'deletedAt': serializer.toJson<String?>(deletedAt),
+ };
+ }
+
+ AssetFaceEntityData copyWith({
+ String? id,
+ String? assetId,
+ Value<String?> personId = const Value.absent(),
+ int? imageWidth,
+ int? imageHeight,
+ int? boundingBoxX1,
+ int? boundingBoxY1,
+ int? boundingBoxX2,
+ int? boundingBoxY2,
+ String? sourceType,
+ int? isVisible,
+ Value<String?> deletedAt = const Value.absent(),
+ }) => AssetFaceEntityData(
+ id: id ?? this.id,
+ assetId: assetId ?? this.assetId,
+ personId: personId.present ? personId.value : this.personId,
+ imageWidth: imageWidth ?? this.imageWidth,
+ imageHeight: imageHeight ?? this.imageHeight,
+ boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1,
+ boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1,
+ boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2,
+ boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2,
+ sourceType: sourceType ?? this.sourceType,
+ isVisible: isVisible ?? this.isVisible,
+ deletedAt: deletedAt.present ? deletedAt.value : this.deletedAt,
+ );
+ AssetFaceEntityData copyWithCompanion(AssetFaceEntityCompanion data) {
+ return AssetFaceEntityData(
+ id: data.id.present ? data.id.value : this.id,
+ assetId: data.assetId.present ? data.assetId.value : this.assetId,
+ personId: data.personId.present ? data.personId.value : this.personId,
+ imageWidth: data.imageWidth.present
+ ? data.imageWidth.value
+ : this.imageWidth,
+ imageHeight: data.imageHeight.present
+ ? data.imageHeight.value
+ : this.imageHeight,
+ boundingBoxX1: data.boundingBoxX1.present
+ ? data.boundingBoxX1.value
+ : this.boundingBoxX1,
+ boundingBoxY1: data.boundingBoxY1.present
+ ? data.boundingBoxY1.value
+ : this.boundingBoxY1,
+ boundingBoxX2: data.boundingBoxX2.present
+ ? data.boundingBoxX2.value
+ : this.boundingBoxX2,
+ boundingBoxY2: data.boundingBoxY2.present
+ ? data.boundingBoxY2.value
+ : this.boundingBoxY2,
+ sourceType: data.sourceType.present
+ ? data.sourceType.value
+ : this.sourceType,
+ isVisible: data.isVisible.present ? data.isVisible.value : this.isVisible,
+ deletedAt: data.deletedAt.present ? data.deletedAt.value : this.deletedAt,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('AssetFaceEntityData(')
+ ..write('id: $id, ')
+ ..write('assetId: $assetId, ')
+ ..write('personId: $personId, ')
+ ..write('imageWidth: $imageWidth, ')
+ ..write('imageHeight: $imageHeight, ')
+ ..write('boundingBoxX1: $boundingBoxX1, ')
+ ..write('boundingBoxY1: $boundingBoxY1, ')
+ ..write('boundingBoxX2: $boundingBoxX2, ')
+ ..write('boundingBoxY2: $boundingBoxY2, ')
+ ..write('sourceType: $sourceType, ')
+ ..write('isVisible: $isVisible, ')
+ ..write('deletedAt: $deletedAt')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ id,
+ assetId,
+ personId,
+ imageWidth,
+ imageHeight,
+ boundingBoxX1,
+ boundingBoxY1,
+ boundingBoxX2,
+ boundingBoxY2,
+ sourceType,
+ isVisible,
+ deletedAt,
+ );
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is AssetFaceEntityData &&
+ other.id == this.id &&
+ other.assetId == this.assetId &&
+ other.personId == this.personId &&
+ other.imageWidth == this.imageWidth &&
+ other.imageHeight == this.imageHeight &&
+ other.boundingBoxX1 == this.boundingBoxX1 &&
+ other.boundingBoxY1 == this.boundingBoxY1 &&
+ other.boundingBoxX2 == this.boundingBoxX2 &&
+ other.boundingBoxY2 == this.boundingBoxY2 &&
+ other.sourceType == this.sourceType &&
+ other.isVisible == this.isVisible &&
+ other.deletedAt == this.deletedAt);
+}
+
+class AssetFaceEntityCompanion extends UpdateCompanion<AssetFaceEntityData> {
+ final Value<String> id;
+ final Value<String> assetId;
+ final Value<String?> personId;
+ final Value<int> imageWidth;
+ final Value<int> imageHeight;
+ final Value<int> boundingBoxX1;
+ final Value<int> boundingBoxY1;
+ final Value<int> boundingBoxX2;
+ final Value<int> boundingBoxY2;
+ final Value<String> sourceType;
+ final Value<int> isVisible;
+ final Value<String?> deletedAt;
+ const AssetFaceEntityCompanion({
+ this.id = const Value.absent(),
+ this.assetId = const Value.absent(),
+ this.personId = const Value.absent(),
+ this.imageWidth = const Value.absent(),
+ this.imageHeight = const Value.absent(),
+ this.boundingBoxX1 = const Value.absent(),
+ this.boundingBoxY1 = const Value.absent(),
+ this.boundingBoxX2 = const Value.absent(),
+ this.boundingBoxY2 = const Value.absent(),
+ this.sourceType = const Value.absent(),
+ this.isVisible = const Value.absent(),
+ this.deletedAt = const Value.absent(),
+ });
+ AssetFaceEntityCompanion.insert({
+ required String id,
+ required String assetId,
+ this.personId = const Value.absent(),
+ required int imageWidth,
+ required int imageHeight,
+ required int boundingBoxX1,
+ required int boundingBoxY1,
+ required int boundingBoxX2,
+ required int boundingBoxY2,
+ required String sourceType,
+ this.isVisible = const Value.absent(),
+ this.deletedAt = const Value.absent(),
+ }) : id = Value(id),
+ assetId = Value(assetId),
+ imageWidth = Value(imageWidth),
+ imageHeight = Value(imageHeight),
+ boundingBoxX1 = Value(boundingBoxX1),
+ boundingBoxY1 = Value(boundingBoxY1),
+ boundingBoxX2 = Value(boundingBoxX2),
+ boundingBoxY2 = Value(boundingBoxY2),
+ sourceType = Value(sourceType);
+ static Insertable<AssetFaceEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? assetId,
+ Expression<String>? personId,
+ Expression<int>? imageWidth,
+ Expression<int>? imageHeight,
+ Expression<int>? boundingBoxX1,
+ Expression<int>? boundingBoxY1,
+ Expression<int>? boundingBoxX2,
+ Expression<int>? boundingBoxY2,
+ Expression<String>? sourceType,
+ Expression<int>? isVisible,
+ Expression<String>? deletedAt,
+ }) {
+ return RawValuesInsertable({
+ if (id != null) 'id': id,
+ if (assetId != null) 'asset_id': assetId,
+ if (personId != null) 'person_id': personId,
+ if (imageWidth != null) 'image_width': imageWidth,
+ if (imageHeight != null) 'image_height': imageHeight,
+ if (boundingBoxX1 != null) 'bounding_box_x1': boundingBoxX1,
+ if (boundingBoxY1 != null) 'bounding_box_y1': boundingBoxY1,
+ if (boundingBoxX2 != null) 'bounding_box_x2': boundingBoxX2,
+ if (boundingBoxY2 != null) 'bounding_box_y2': boundingBoxY2,
+ if (sourceType != null) 'source_type': sourceType,
+ if (isVisible != null) 'is_visible': isVisible,
+ if (deletedAt != null) 'deleted_at': deletedAt,
+ });
+ }
+
+ AssetFaceEntityCompanion copyWith({
+ Value<String>? id,
+ Value<String>? assetId,
+ Value<String?>? personId,
+ Value<int>? imageWidth,
+ Value<int>? imageHeight,
+ Value<int>? boundingBoxX1,
+ Value<int>? boundingBoxY1,
+ Value<int>? boundingBoxX2,
+ Value<int>? boundingBoxY2,
+ Value<String>? sourceType,
+ Value<int>? isVisible,
+ Value<String?>? deletedAt,
+ }) {
+ return AssetFaceEntityCompanion(
+ id: id ?? this.id,
+ assetId: assetId ?? this.assetId,
+ personId: personId ?? this.personId,
+ imageWidth: imageWidth ?? this.imageWidth,
+ imageHeight: imageHeight ?? this.imageHeight,
+ boundingBoxX1: boundingBoxX1 ?? this.boundingBoxX1,
+ boundingBoxY1: boundingBoxY1 ?? this.boundingBoxY1,
+ boundingBoxX2: boundingBoxX2 ?? this.boundingBoxX2,
+ boundingBoxY2: boundingBoxY2 ?? this.boundingBoxY2,
+ sourceType: sourceType ?? this.sourceType,
+ isVisible: isVisible ?? this.isVisible,
+ deletedAt: deletedAt ?? this.deletedAt,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (personId.present) {
+ map['person_id'] = Variable<String>(personId.value);
+ }
+ if (imageWidth.present) {
+ map['image_width'] = Variable<int>(imageWidth.value);
+ }
+ if (imageHeight.present) {
+ map['image_height'] = Variable<int>(imageHeight.value);
+ }
+ if (boundingBoxX1.present) {
+ map['bounding_box_x1'] = Variable<int>(boundingBoxX1.value);
+ }
+ if (boundingBoxY1.present) {
+ map['bounding_box_y1'] = Variable<int>(boundingBoxY1.value);
+ }
+ if (boundingBoxX2.present) {
+ map['bounding_box_x2'] = Variable<int>(boundingBoxX2.value);
+ }
+ if (boundingBoxY2.present) {
+ map['bounding_box_y2'] = Variable<int>(boundingBoxY2.value);
+ }
+ if (sourceType.present) {
+ map['source_type'] = Variable<String>(sourceType.value);
+ }
+ if (isVisible.present) {
+ map['is_visible'] = Variable<int>(isVisible.value);
+ }
+ if (deletedAt.present) {
+ map['deleted_at'] = Variable<String>(deletedAt.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('AssetFaceEntityCompanion(')
+ ..write('id: $id, ')
+ ..write('assetId: $assetId, ')
+ ..write('personId: $personId, ')
+ ..write('imageWidth: $imageWidth, ')
+ ..write('imageHeight: $imageHeight, ')
+ ..write('boundingBoxX1: $boundingBoxX1, ')
+ ..write('boundingBoxY1: $boundingBoxY1, ')
+ ..write('boundingBoxX2: $boundingBoxX2, ')
+ ..write('boundingBoxY2: $boundingBoxY2, ')
+ ..write('sourceType: $sourceType, ')
+ ..write('isVisible: $isVisible, ')
+ ..write('deletedAt: $deletedAt')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class StoreEntity extends Table with TableInfo<StoreEntity, StoreEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ StoreEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<int> id = GeneratedColumn<int>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> stringValue = GeneratedColumn<String>(
+ 'string_value',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> intValue = GeneratedColumn<int>(
+ 'int_value',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [id, stringValue, intValue];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'store_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ StoreEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return StoreEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}id'],
+ )!,
+ stringValue: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}string_value'],
+ ),
+ intValue: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}int_value'],
+ ),
+ );
+ }
+
+ @override
+ StoreEntity createAlias(String alias) {
+ return StoreEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class StoreEntityData extends DataClass implements Insertable<StoreEntityData> {
+ final int id;
+ final String? stringValue;
+ final int? intValue;
+ const StoreEntityData({required this.id, this.stringValue, this.intValue});
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<int>(id);
+ if (!nullToAbsent || stringValue != null) {
+ map['string_value'] = Variable<String>(stringValue);
+ }
+ if (!nullToAbsent || intValue != null) {
+ map['int_value'] = Variable<int>(intValue);
+ }
+ return map;
+ }
+
+ factory StoreEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return StoreEntityData(
+ id: serializer.fromJson<int>(json['id']),
+ stringValue: serializer.fromJson<String?>(json['stringValue']),
+ intValue: serializer.fromJson<int?>(json['intValue']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<int>(id),
+ 'stringValue': serializer.toJson<String?>(stringValue),
+ 'intValue': serializer.toJson<int?>(intValue),
+ };
+ }
+
+ StoreEntityData copyWith({
+ int? id,
+ Value<String?> stringValue = const Value.absent(),
+ Value<int?> intValue = const Value.absent(),
+ }) => StoreEntityData(
+ id: id ?? this.id,
+ stringValue: stringValue.present ? stringValue.value : this.stringValue,
+ intValue: intValue.present ? intValue.value : this.intValue,
+ );
+ StoreEntityData copyWithCompanion(StoreEntityCompanion data) {
+ return StoreEntityData(
+ id: data.id.present ? data.id.value : this.id,
+ stringValue: data.stringValue.present
+ ? data.stringValue.value
+ : this.stringValue,
+ intValue: data.intValue.present ? data.intValue.value : this.intValue,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('StoreEntityData(')
+ ..write('id: $id, ')
+ ..write('stringValue: $stringValue, ')
+ ..write('intValue: $intValue')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(id, stringValue, intValue);
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is StoreEntityData &&
+ other.id == this.id &&
+ other.stringValue == this.stringValue &&
+ other.intValue == this.intValue);
+}
+
+class StoreEntityCompanion extends UpdateCompanion<StoreEntityData> {
+ final Value<int> id;
+ final Value<String?> stringValue;
+ final Value<int?> intValue;
+ const StoreEntityCompanion({
+ this.id = const Value.absent(),
+ this.stringValue = const Value.absent(),
+ this.intValue = const Value.absent(),
+ });
+ StoreEntityCompanion.insert({
+ required int id,
+ this.stringValue = const Value.absent(),
+ this.intValue = const Value.absent(),
+ }) : id = Value(id);
+ static Insertable<StoreEntityData> custom({
+ Expression<int>? id,
+ Expression<String>? stringValue,
+ Expression<int>? intValue,
+ }) {
+ return RawValuesInsertable({
+ if (id != null) 'id': id,
+ if (stringValue != null) 'string_value': stringValue,
+ if (intValue != null) 'int_value': intValue,
+ });
+ }
+
+ StoreEntityCompanion copyWith({
+ Value<int>? id,
+ Value<String?>? stringValue,
+ Value<int?>? intValue,
+ }) {
+ return StoreEntityCompanion(
+ id: id ?? this.id,
+ stringValue: stringValue ?? this.stringValue,
+ intValue: intValue ?? this.intValue,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<int>(id.value);
+ }
+ if (stringValue.present) {
+ map['string_value'] = Variable<String>(stringValue.value);
+ }
+ if (intValue.present) {
+ map['int_value'] = Variable<int>(intValue.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('StoreEntityCompanion(')
+ ..write('id: $id, ')
+ ..write('stringValue: $stringValue, ')
+ ..write('intValue: $intValue')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class TrashedLocalAssetEntity extends Table
+ with TableInfo<TrashedLocalAssetEntity, TrashedLocalAssetEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ TrashedLocalAssetEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> name = GeneratedColumn<String>(
+ 'name',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> type = GeneratedColumn<int>(
+ 'type',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> createdAt = GeneratedColumn<String>(
+ 'created_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<String> updatedAt = GeneratedColumn<String>(
+ 'updated_at',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT CURRENT_TIMESTAMP',
+ defaultValue: const CustomExpression('CURRENT_TIMESTAMP'),
+ );
+ late final GeneratedColumn<int> width = GeneratedColumn<int>(
+ 'width',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> height = GeneratedColumn<int>(
+ 'height',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> durationMs = GeneratedColumn<int>(
+ 'duration_ms',
+ aliasedName,
+ true,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> albumId = GeneratedColumn<String>(
+ 'album_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> checksum = GeneratedColumn<String>(
+ 'checksum',
+ aliasedName,
+ true,
+ type: DriftSqlType.string,
+ requiredDuringInsert: false,
+ $customConstraints: 'NULL',
+ );
+ late final GeneratedColumn<int> isFavorite = GeneratedColumn<int>(
+ 'is_favorite',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0 CHECK (is_favorite IN (0, 1))',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<int> orientation = GeneratedColumn<int>(
+ 'orientation',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ late final GeneratedColumn<int> source = GeneratedColumn<int>(
+ 'source',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> playbackStyle = GeneratedColumn<int>(
+ 'playback_style',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: false,
+ $customConstraints: 'NOT NULL DEFAULT 0',
+ defaultValue: const CustomExpression('0'),
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ name,
+ type,
+ createdAt,
+ updatedAt,
+ width,
+ height,
+ durationMs,
+ id,
+ albumId,
+ checksum,
+ isFavorite,
+ orientation,
+ source,
+ playbackStyle,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'trashed_local_asset_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id, albumId};
+ @override
+ TrashedLocalAssetEntityData map(
+ Map<String, dynamic> data, {
+ String? tablePrefix,
+ }) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return TrashedLocalAssetEntityData(
+ name: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}name'],
+ )!,
+ type: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}type'],
+ )!,
+ createdAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}created_at'],
+ )!,
+ updatedAt: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}updated_at'],
+ )!,
+ width: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}width'],
+ ),
+ height: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}height'],
+ ),
+ durationMs: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}duration_ms'],
+ ),
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ albumId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}album_id'],
+ )!,
+ checksum: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}checksum'],
+ ),
+ isFavorite: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}is_favorite'],
+ )!,
+ orientation: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}orientation'],
+ )!,
+ source: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}source'],
+ )!,
+ playbackStyle: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}playback_style'],
+ )!,
+ );
+ }
+
+ @override
+ TrashedLocalAssetEntity createAlias(String alias) {
+ return TrashedLocalAssetEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id, album_id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class TrashedLocalAssetEntityData extends DataClass
+ implements Insertable<TrashedLocalAssetEntityData> {
+ final String name;
+ final int type;
+ final String createdAt;
+ final String updatedAt;
+ final int? width;
+ final int? height;
+ final int? durationMs;
+ final String id;
+ final String albumId;
+ final String? checksum;
+ final int isFavorite;
+ final int orientation;
+ final int source;
+ final int playbackStyle;
+ const TrashedLocalAssetEntityData({
+ required this.name,
+ required this.type,
+ required this.createdAt,
+ required this.updatedAt,
+ this.width,
+ this.height,
+ this.durationMs,
+ required this.id,
+ required this.albumId,
+ this.checksum,
+ required this.isFavorite,
+ required this.orientation,
+ required this.source,
+ required this.playbackStyle,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['name'] = Variable<String>(name);
+ map['type'] = Variable<int>(type);
+ map['created_at'] = Variable<String>(createdAt);
+ map['updated_at'] = Variable<String>(updatedAt);
+ if (!nullToAbsent || width != null) {
+ map['width'] = Variable<int>(width);
+ }
+ if (!nullToAbsent || height != null) {
+ map['height'] = Variable<int>(height);
+ }
+ if (!nullToAbsent || durationMs != null) {
+ map['duration_ms'] = Variable<int>(durationMs);
+ }
+ map['id'] = Variable<String>(id);
+ map['album_id'] = Variable<String>(albumId);
+ if (!nullToAbsent || checksum != null) {
+ map['checksum'] = Variable<String>(checksum);
+ }
+ map['is_favorite'] = Variable<int>(isFavorite);
+ map['orientation'] = Variable<int>(orientation);
+ map['source'] = Variable<int>(source);
+ map['playback_style'] = Variable<int>(playbackStyle);
+ return map;
+ }
+
+ factory TrashedLocalAssetEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return TrashedLocalAssetEntityData(
+ name: serializer.fromJson<String>(json['name']),
+ type: serializer.fromJson<int>(json['type']),
+ createdAt: serializer.fromJson<String>(json['createdAt']),
+ updatedAt: serializer.fromJson<String>(json['updatedAt']),
+ width: serializer.fromJson<int?>(json['width']),
+ height: serializer.fromJson<int?>(json['height']),
+ durationMs: serializer.fromJson<int?>(json['durationMs']),
+ id: serializer.fromJson<String>(json['id']),
+ albumId: serializer.fromJson<String>(json['albumId']),
+ checksum: serializer.fromJson<String?>(json['checksum']),
+ isFavorite: serializer.fromJson<int>(json['isFavorite']),
+ orientation: serializer.fromJson<int>(json['orientation']),
+ source: serializer.fromJson<int>(json['source']),
+ playbackStyle: serializer.fromJson<int>(json['playbackStyle']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'name': serializer.toJson<String>(name),
+ 'type': serializer.toJson<int>(type),
+ 'createdAt': serializer.toJson<String>(createdAt),
+ 'updatedAt': serializer.toJson<String>(updatedAt),
+ 'width': serializer.toJson<int?>(width),
+ 'height': serializer.toJson<int?>(height),
+ 'durationMs': serializer.toJson<int?>(durationMs),
+ 'id': serializer.toJson<String>(id),
+ 'albumId': serializer.toJson<String>(albumId),
+ 'checksum': serializer.toJson<String?>(checksum),
+ 'isFavorite': serializer.toJson<int>(isFavorite),
+ 'orientation': serializer.toJson<int>(orientation),
+ 'source': serializer.toJson<int>(source),
+ 'playbackStyle': serializer.toJson<int>(playbackStyle),
+ };
+ }
+
+ TrashedLocalAssetEntityData copyWith({
+ String? name,
+ int? type,
+ String? createdAt,
+ String? updatedAt,
+ Value<int?> width = const Value.absent(),
+ Value<int?> height = const Value.absent(),
+ Value<int?> durationMs = const Value.absent(),
+ String? id,
+ String? albumId,
+ Value<String?> checksum = const Value.absent(),
+ int? isFavorite,
+ int? orientation,
+ int? source,
+ int? playbackStyle,
+ }) => TrashedLocalAssetEntityData(
+ 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,
+ durationMs: durationMs.present ? durationMs.value : this.durationMs,
+ id: id ?? this.id,
+ albumId: albumId ?? this.albumId,
+ checksum: checksum.present ? checksum.value : this.checksum,
+ isFavorite: isFavorite ?? this.isFavorite,
+ orientation: orientation ?? this.orientation,
+ source: source ?? this.source,
+ playbackStyle: playbackStyle ?? this.playbackStyle,
+ );
+ TrashedLocalAssetEntityData copyWithCompanion(
+ TrashedLocalAssetEntityCompanion data,
+ ) {
+ return TrashedLocalAssetEntityData(
+ 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,
+ durationMs: data.durationMs.present
+ ? data.durationMs.value
+ : this.durationMs,
+ id: data.id.present ? data.id.value : this.id,
+ albumId: data.albumId.present ? data.albumId.value : this.albumId,
+ 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,
+ source: data.source.present ? data.source.value : this.source,
+ playbackStyle: data.playbackStyle.present
+ ? data.playbackStyle.value
+ : this.playbackStyle,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('TrashedLocalAssetEntityData(')
+ ..write('name: $name, ')
+ ..write('type: $type, ')
+ ..write('createdAt: $createdAt, ')
+ ..write('updatedAt: $updatedAt, ')
+ ..write('width: $width, ')
+ ..write('height: $height, ')
+ ..write('durationMs: $durationMs, ')
+ ..write('id: $id, ')
+ ..write('albumId: $albumId, ')
+ ..write('checksum: $checksum, ')
+ ..write('isFavorite: $isFavorite, ')
+ ..write('orientation: $orientation, ')
+ ..write('source: $source, ')
+ ..write('playbackStyle: $playbackStyle')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ name,
+ type,
+ createdAt,
+ updatedAt,
+ width,
+ height,
+ durationMs,
+ id,
+ albumId,
+ checksum,
+ isFavorite,
+ orientation,
+ source,
+ playbackStyle,
+ );
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is TrashedLocalAssetEntityData &&
+ 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.durationMs == this.durationMs &&
+ other.id == this.id &&
+ other.albumId == this.albumId &&
+ other.checksum == this.checksum &&
+ other.isFavorite == this.isFavorite &&
+ other.orientation == this.orientation &&
+ other.source == this.source &&
+ other.playbackStyle == this.playbackStyle);
+}
+
+class TrashedLocalAssetEntityCompanion
+ extends UpdateCompanion<TrashedLocalAssetEntityData> {
+ final Value<String> name;
+ final Value<int> type;
+ final Value<String> createdAt;
+ final Value<String> updatedAt;
+ final Value<int?> width;
+ final Value<int?> height;
+ final Value<int?> durationMs;
+ final Value<String> id;
+ final Value<String> albumId;
+ final Value<String?> checksum;
+ final Value<int> isFavorite;
+ final Value<int> orientation;
+ final Value<int> source;
+ final Value<int> playbackStyle;
+ const TrashedLocalAssetEntityCompanion({
+ 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.durationMs = const Value.absent(),
+ this.id = const Value.absent(),
+ this.albumId = const Value.absent(),
+ this.checksum = const Value.absent(),
+ this.isFavorite = const Value.absent(),
+ this.orientation = const Value.absent(),
+ this.source = const Value.absent(),
+ this.playbackStyle = const Value.absent(),
+ });
+ TrashedLocalAssetEntityCompanion.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.durationMs = const Value.absent(),
+ required String id,
+ required String albumId,
+ this.checksum = const Value.absent(),
+ this.isFavorite = const Value.absent(),
+ this.orientation = const Value.absent(),
+ required int source,
+ this.playbackStyle = const Value.absent(),
+ }) : name = Value(name),
+ type = Value(type),
+ id = Value(id),
+ albumId = Value(albumId),
+ source = Value(source);
+ static Insertable<TrashedLocalAssetEntityData> custom({
+ Expression<String>? name,
+ Expression<int>? type,
+ Expression<String>? createdAt,
+ Expression<String>? updatedAt,
+ Expression<int>? width,
+ Expression<int>? height,
+ Expression<int>? durationMs,
+ Expression<String>? id,
+ Expression<String>? albumId,
+ Expression<String>? checksum,
+ Expression<int>? isFavorite,
+ Expression<int>? orientation,
+ Expression<int>? source,
+ Expression<int>? playbackStyle,
+ }) {
+ 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 (durationMs != null) 'duration_ms': durationMs,
+ if (id != null) 'id': id,
+ if (albumId != null) 'album_id': albumId,
+ if (checksum != null) 'checksum': checksum,
+ if (isFavorite != null) 'is_favorite': isFavorite,
+ if (orientation != null) 'orientation': orientation,
+ if (source != null) 'source': source,
+ if (playbackStyle != null) 'playback_style': playbackStyle,
+ });
+ }
+
+ TrashedLocalAssetEntityCompanion copyWith({
+ Value<String>? name,
+ Value<int>? type,
+ Value<String>? createdAt,
+ Value<String>? updatedAt,
+ Value<int?>? width,
+ Value<int?>? height,
+ Value<int?>? durationMs,
+ Value<String>? id,
+ Value<String>? albumId,
+ Value<String?>? checksum,
+ Value<int>? isFavorite,
+ Value<int>? orientation,
+ Value<int>? source,
+ Value<int>? playbackStyle,
+ }) {
+ return TrashedLocalAssetEntityCompanion(
+ name: name ?? this.name,
+ type: type ?? this.type,
+ createdAt: createdAt ?? this.createdAt,
+ updatedAt: updatedAt ?? this.updatedAt,
+ width: width ?? this.width,
+ height: height ?? this.height,
+ durationMs: durationMs ?? this.durationMs,
+ id: id ?? this.id,
+ albumId: albumId ?? this.albumId,
+ checksum: checksum ?? this.checksum,
+ isFavorite: isFavorite ?? this.isFavorite,
+ orientation: orientation ?? this.orientation,
+ source: source ?? this.source,
+ playbackStyle: playbackStyle ?? this.playbackStyle,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (name.present) {
+ map['name'] = Variable<String>(name.value);
+ }
+ if (type.present) {
+ map['type'] = Variable<int>(type.value);
+ }
+ if (createdAt.present) {
+ map['created_at'] = Variable<String>(createdAt.value);
+ }
+ if (updatedAt.present) {
+ map['updated_at'] = Variable<String>(updatedAt.value);
+ }
+ if (width.present) {
+ map['width'] = Variable<int>(width.value);
+ }
+ if (height.present) {
+ map['height'] = Variable<int>(height.value);
+ }
+ if (durationMs.present) {
+ map['duration_ms'] = Variable<int>(durationMs.value);
+ }
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (albumId.present) {
+ map['album_id'] = Variable<String>(albumId.value);
+ }
+ if (checksum.present) {
+ map['checksum'] = Variable<String>(checksum.value);
+ }
+ if (isFavorite.present) {
+ map['is_favorite'] = Variable<int>(isFavorite.value);
+ }
+ if (orientation.present) {
+ map['orientation'] = Variable<int>(orientation.value);
+ }
+ if (source.present) {
+ map['source'] = Variable<int>(source.value);
+ }
+ if (playbackStyle.present) {
+ map['playback_style'] = Variable<int>(playbackStyle.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('TrashedLocalAssetEntityCompanion(')
+ ..write('name: $name, ')
+ ..write('type: $type, ')
+ ..write('createdAt: $createdAt, ')
+ ..write('updatedAt: $updatedAt, ')
+ ..write('width: $width, ')
+ ..write('height: $height, ')
+ ..write('durationMs: $durationMs, ')
+ ..write('id: $id, ')
+ ..write('albumId: $albumId, ')
+ ..write('checksum: $checksum, ')
+ ..write('isFavorite: $isFavorite, ')
+ ..write('orientation: $orientation, ')
+ ..write('source: $source, ')
+ ..write('playbackStyle: $playbackStyle')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class AssetEditEntity extends Table
+ with TableInfo<AssetEditEntity, AssetEditEntityData> {
+ @override
+ final GeneratedDatabase attachedDatabase;
+ final String? _alias;
+ AssetEditEntity(this.attachedDatabase, [this._alias]);
+ late final GeneratedColumn<String> id = GeneratedColumn<String>(
+ 'id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<String> assetId = GeneratedColumn<String>(
+ 'asset_id',
+ aliasedName,
+ false,
+ type: DriftSqlType.string,
+ requiredDuringInsert: true,
+ $customConstraints:
+ 'NOT NULL REFERENCES remote_asset_entity(id)ON DELETE CASCADE',
+ );
+ late final GeneratedColumn<int> action = GeneratedColumn<int>(
+ 'action',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<i2.Uint8List> parameters =
+ GeneratedColumn<i2.Uint8List>(
+ 'parameters',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ late final GeneratedColumn<int> sequence = GeneratedColumn<int>(
+ 'sequence',
+ aliasedName,
+ false,
+ type: DriftSqlType.int,
+ requiredDuringInsert: true,
+ $customConstraints: 'NOT NULL',
+ );
+ @override
+ List<GeneratedColumn> get $columns => [
+ id,
+ assetId,
+ action,
+ parameters,
+ sequence,
+ ];
+ @override
+ String get aliasedName => _alias ?? actualTableName;
+ @override
+ String get actualTableName => $name;
+ static const String $name = 'asset_edit_entity';
+ @override
+ Set<GeneratedColumn> get $primaryKey => {id};
+ @override
+ AssetEditEntityData map(Map<String, dynamic> data, {String? tablePrefix}) {
+ final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
+ return AssetEditEntityData(
+ id: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}id'],
+ )!,
+ assetId: attachedDatabase.typeMapping.read(
+ DriftSqlType.string,
+ data['${effectivePrefix}asset_id'],
+ )!,
+ action: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}action'],
+ )!,
+ parameters: attachedDatabase.typeMapping.read(
+ DriftSqlType.blob,
+ data['${effectivePrefix}parameters'],
+ )!,
+ sequence: attachedDatabase.typeMapping.read(
+ DriftSqlType.int,
+ data['${effectivePrefix}sequence'],
+ )!,
+ );
+ }
+
+ @override
+ AssetEditEntity createAlias(String alias) {
+ return AssetEditEntity(attachedDatabase, alias);
+ }
+
+ @override
+ bool get withoutRowId => true;
+ @override
+ bool get isStrict => true;
+ @override
+ List<String> get customConstraints => const ['PRIMARY KEY(id)'];
+ @override
+ bool get dontWriteConstraints => true;
+}
+
+class AssetEditEntityData extends DataClass
+ implements Insertable<AssetEditEntityData> {
+ final String id;
+ final String assetId;
+ final int action;
+ final i2.Uint8List parameters;
+ final int sequence;
+ const AssetEditEntityData({
+ required this.id,
+ required this.assetId,
+ required this.action,
+ required this.parameters,
+ required this.sequence,
+ });
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ map['id'] = Variable<String>(id);
+ map['asset_id'] = Variable<String>(assetId);
+ map['action'] = Variable<int>(action);
+ map['parameters'] = Variable<i2.Uint8List>(parameters);
+ map['sequence'] = Variable<int>(sequence);
+ return map;
+ }
+
+ factory AssetEditEntityData.fromJson(
+ Map<String, dynamic> json, {
+ ValueSerializer? serializer,
+ }) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return AssetEditEntityData(
+ id: serializer.fromJson<String>(json['id']),
+ assetId: serializer.fromJson<String>(json['assetId']),
+ action: serializer.fromJson<int>(json['action']),
+ parameters: serializer.fromJson<i2.Uint8List>(json['parameters']),
+ sequence: serializer.fromJson<int>(json['sequence']),
+ );
+ }
+ @override
+ Map<String, dynamic> toJson({ValueSerializer? serializer}) {
+ serializer ??= driftRuntimeOptions.defaultSerializer;
+ return <String, dynamic>{
+ 'id': serializer.toJson<String>(id),
+ 'assetId': serializer.toJson<String>(assetId),
+ 'action': serializer.toJson<int>(action),
+ 'parameters': serializer.toJson<i2.Uint8List>(parameters),
+ 'sequence': serializer.toJson<int>(sequence),
+ };
+ }
+
+ AssetEditEntityData copyWith({
+ String? id,
+ String? assetId,
+ int? action,
+ i2.Uint8List? parameters,
+ int? sequence,
+ }) => AssetEditEntityData(
+ id: id ?? this.id,
+ assetId: assetId ?? this.assetId,
+ action: action ?? this.action,
+ parameters: parameters ?? this.parameters,
+ sequence: sequence ?? this.sequence,
+ );
+ AssetEditEntityData copyWithCompanion(AssetEditEntityCompanion data) {
+ return AssetEditEntityData(
+ id: data.id.present ? data.id.value : this.id,
+ assetId: data.assetId.present ? data.assetId.value : this.assetId,
+ action: data.action.present ? data.action.value : this.action,
+ parameters: data.parameters.present
+ ? data.parameters.value
+ : this.parameters,
+ sequence: data.sequence.present ? data.sequence.value : this.sequence,
+ );
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('AssetEditEntityData(')
+ ..write('id: $id, ')
+ ..write('assetId: $assetId, ')
+ ..write('action: $action, ')
+ ..write('parameters: $parameters, ')
+ ..write('sequence: $sequence')
+ ..write(')'))
+ .toString();
+ }
+
+ @override
+ int get hashCode => Object.hash(
+ id,
+ assetId,
+ action,
+ $driftBlobEquality.hash(parameters),
+ sequence,
+ );
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ (other is AssetEditEntityData &&
+ other.id == this.id &&
+ other.assetId == this.assetId &&
+ other.action == this.action &&
+ $driftBlobEquality.equals(other.parameters, this.parameters) &&
+ other.sequence == this.sequence);
+}
+
+class AssetEditEntityCompanion extends UpdateCompanion<AssetEditEntityData> {
+ final Value<String> id;
+ final Value<String> assetId;
+ final Value<int> action;
+ final Value<i2.Uint8List> parameters;
+ final Value<int> sequence;
+ const AssetEditEntityCompanion({
+ this.id = const Value.absent(),
+ this.assetId = const Value.absent(),
+ this.action = const Value.absent(),
+ this.parameters = const Value.absent(),
+ this.sequence = const Value.absent(),
+ });
+ AssetEditEntityCompanion.insert({
+ required String id,
+ required String assetId,
+ required int action,
+ required i2.Uint8List parameters,
+ required int sequence,
+ }) : id = Value(id),
+ assetId = Value(assetId),
+ action = Value(action),
+ parameters = Value(parameters),
+ sequence = Value(sequence);
+ static Insertable<AssetEditEntityData> custom({
+ Expression<String>? id,
+ Expression<String>? assetId,
+ Expression<int>? action,
+ Expression<i2.Uint8List>? parameters,
+ Expression<int>? sequence,
+ }) {
+ return RawValuesInsertable({
+ if (id != null) 'id': id,
+ if (assetId != null) 'asset_id': assetId,
+ if (action != null) 'action': action,
+ if (parameters != null) 'parameters': parameters,
+ if (sequence != null) 'sequence': sequence,
+ });
+ }
+
+ AssetEditEntityCompanion copyWith({
+ Value<String>? id,
+ Value<String>? assetId,
+ Value<int>? action,
+ Value<i2.Uint8List>? parameters,
+ Value<int>? sequence,
+ }) {
+ return AssetEditEntityCompanion(
+ id: id ?? this.id,
+ assetId: assetId ?? this.assetId,
+ action: action ?? this.action,
+ parameters: parameters ?? this.parameters,
+ sequence: sequence ?? this.sequence,
+ );
+ }
+
+ @override
+ Map<String, Expression> toColumns(bool nullToAbsent) {
+ final map = <String, Expression>{};
+ if (id.present) {
+ map['id'] = Variable<String>(id.value);
+ }
+ if (assetId.present) {
+ map['asset_id'] = Variable<String>(assetId.value);
+ }
+ if (action.present) {
+ map['action'] = Variable<int>(action.value);
+ }
+ if (parameters.present) {
+ map['parameters'] = Variable<i2.Uint8List>(parameters.value);
+ }
+ if (sequence.present) {
+ map['sequence'] = Variable<int>(sequence.value);
+ }
+ return map;
+ }
+
+ @override
+ String toString() {
+ return (StringBuffer('AssetEditEntityCompanion(')
+ ..write('id: $id, ')
+ ..write('assetId: $assetId, ')
+ ..write('action: $action, ')
+ ..write('parameters: $parameters, ')
+ ..write('sequence: $sequence')
+ ..write(')'))
+ .toString();
+ }
+}
+
+class DatabaseAtV23 extends GeneratedDatabase {
+ DatabaseAtV23(QueryExecutor e) : super(e);
+ late final UserEntity userEntity = UserEntity(this);
+ late final RemoteAssetEntity remoteAssetEntity = RemoteAssetEntity(this);
+ late final StackEntity stackEntity = StackEntity(this);
+ late final LocalAssetEntity localAssetEntity = LocalAssetEntity(this);
+ late final RemoteAlbumEntity remoteAlbumEntity = RemoteAlbumEntity(this);
+ late final LocalAlbumEntity localAlbumEntity = LocalAlbumEntity(this);
+ late final LocalAlbumAssetEntity localAlbumAssetEntity =
+ LocalAlbumAssetEntity(this);
+ late final Index idxLocalAlbumAssetAlbumAsset = Index(
+ 'idx_local_album_asset_album_asset',
+ 'CREATE INDEX IF NOT EXISTS idx_local_album_asset_album_asset ON local_album_asset_entity (album_id, asset_id)',
+ );
+ late final Index idxRemoteAlbumOwnerId = Index(
+ 'idx_remote_album_owner_id',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_album_owner_id ON remote_album_entity (owner_id)',
+ );
+ late final Index idxLocalAssetChecksum = Index(
+ 'idx_local_asset_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_local_asset_checksum ON local_asset_entity (checksum)',
+ );
+ late final Index idxLocalAssetCloudId = Index(
+ 'idx_local_asset_cloud_id',
+ 'CREATE INDEX IF NOT EXISTS idx_local_asset_cloud_id ON local_asset_entity (i_cloud_id)',
+ );
+ late final Index idxStackPrimaryAssetId = Index(
+ 'idx_stack_primary_asset_id',
+ 'CREATE INDEX IF NOT EXISTS idx_stack_primary_asset_id ON stack_entity (primary_asset_id)',
+ );
+ late final Index idxRemoteAssetOwnerChecksum = Index(
+ 'idx_remote_asset_owner_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_owner_checksum ON remote_asset_entity (owner_id, checksum)',
+ );
+ late final Index uQRemoteAssetsOwnerChecksum = Index(
+ 'UQ_remote_assets_owner_checksum',
+ 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_checksum ON remote_asset_entity (owner_id, checksum) WHERE(library_id IS NULL)',
+ );
+ late final Index uQRemoteAssetsOwnerLibraryChecksum = Index(
+ 'UQ_remote_assets_owner_library_checksum',
+ 'CREATE UNIQUE INDEX IF NOT EXISTS UQ_remote_assets_owner_library_checksum ON remote_asset_entity (owner_id, library_id, checksum) WHERE(library_id IS NOT NULL)',
+ );
+ late final Index idxRemoteAssetChecksum = Index(
+ 'idx_remote_asset_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_checksum ON remote_asset_entity (checksum)',
+ );
+ late final Index idxRemoteAssetStackId = Index(
+ 'idx_remote_asset_stack_id',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_stack_id ON remote_asset_entity (stack_id)',
+ );
+ late final Index idxRemoteAssetLocalDateTimeDay = Index(
+ 'idx_remote_asset_local_date_time_day',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_day ON remote_asset_entity (STRFTIME(\'%Y-%m-%d\', local_date_time))',
+ );
+ late final Index idxRemoteAssetLocalDateTimeMonth = Index(
+ 'idx_remote_asset_local_date_time_month',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_local_date_time_month ON remote_asset_entity (STRFTIME(\'%Y-%m\', local_date_time))',
+ );
+ late final AuthUserEntity authUserEntity = AuthUserEntity(this);
+ late final UserMetadataEntity userMetadataEntity = UserMetadataEntity(this);
+ late final PartnerEntity partnerEntity = PartnerEntity(this);
+ late final RemoteExifEntity remoteExifEntity = RemoteExifEntity(this);
+ late final RemoteAlbumAssetEntity remoteAlbumAssetEntity =
+ RemoteAlbumAssetEntity(this);
+ late final RemoteAlbumUserEntity remoteAlbumUserEntity =
+ RemoteAlbumUserEntity(this);
+ late final RemoteAssetCloudIdEntity remoteAssetCloudIdEntity =
+ RemoteAssetCloudIdEntity(this);
+ late final MemoryEntity memoryEntity = MemoryEntity(this);
+ late final MemoryAssetEntity memoryAssetEntity = MemoryAssetEntity(this);
+ late final PersonEntity personEntity = PersonEntity(this);
+ late final AssetFaceEntity assetFaceEntity = AssetFaceEntity(this);
+ late final StoreEntity storeEntity = StoreEntity(this);
+ late final TrashedLocalAssetEntity trashedLocalAssetEntity =
+ TrashedLocalAssetEntity(this);
+ late final AssetEditEntity assetEditEntity = AssetEditEntity(this);
+ late final Index idxPartnerSharedWithId = Index(
+ 'idx_partner_shared_with_id',
+ 'CREATE INDEX IF NOT EXISTS idx_partner_shared_with_id ON partner_entity (shared_with_id)',
+ );
+ late final Index idxLatLng = Index(
+ 'idx_lat_lng',
+ 'CREATE INDEX IF NOT EXISTS idx_lat_lng ON remote_exif_entity (latitude, longitude)',
+ );
+ late final Index idxRemoteAlbumAssetAlbumAsset = Index(
+ 'idx_remote_album_asset_album_asset',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_album_asset_album_asset ON remote_album_asset_entity (album_id, asset_id)',
+ );
+ late final Index idxRemoteAssetCloudId = Index(
+ 'idx_remote_asset_cloud_id',
+ 'CREATE INDEX IF NOT EXISTS idx_remote_asset_cloud_id ON remote_asset_cloud_id_entity (cloud_id)',
+ );
+ late final Index idxPersonOwnerId = Index(
+ 'idx_person_owner_id',
+ 'CREATE INDEX IF NOT EXISTS idx_person_owner_id ON person_entity (owner_id)',
+ );
+ late final Index idxAssetFacePersonId = Index(
+ 'idx_asset_face_person_id',
+ 'CREATE INDEX IF NOT EXISTS idx_asset_face_person_id ON asset_face_entity (person_id)',
+ );
+ late final Index idxAssetFaceAssetId = Index(
+ 'idx_asset_face_asset_id',
+ 'CREATE INDEX IF NOT EXISTS idx_asset_face_asset_id ON asset_face_entity (asset_id)',
+ );
+ late final Index idxTrashedLocalAssetChecksum = Index(
+ 'idx_trashed_local_asset_checksum',
+ 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_checksum ON trashed_local_asset_entity (checksum)',
+ );
+ late final Index idxTrashedLocalAssetAlbum = Index(
+ 'idx_trashed_local_asset_album',
+ 'CREATE INDEX IF NOT EXISTS idx_trashed_local_asset_album ON trashed_local_asset_entity (album_id)',
+ );
+ late final Index idxAssetEditAssetId = Index(
+ 'idx_asset_edit_asset_id',
+ 'CREATE INDEX IF NOT EXISTS idx_asset_edit_asset_id ON asset_edit_entity (asset_id)',
+ );
+ @override
+ Iterable<TableInfo<Table, Object?>> get allTables =>
+ allSchemaEntities.whereType<TableInfo<Table, Object?>>();
+ @override
+ List<DatabaseSchemaEntity> get allSchemaEntities => [
+ userEntity,
+ remoteAssetEntity,
+ stackEntity,
+ localAssetEntity,
+ remoteAlbumEntity,
+ localAlbumEntity,
+ localAlbumAssetEntity,
+ idxLocalAlbumAssetAlbumAsset,
+ idxRemoteAlbumOwnerId,
+ idxLocalAssetChecksum,
+ idxLocalAssetCloudId,
+ idxStackPrimaryAssetId,
+ idxRemoteAssetOwnerChecksum,
+ uQRemoteAssetsOwnerChecksum,
+ uQRemoteAssetsOwnerLibraryChecksum,
+ idxRemoteAssetChecksum,
+ idxRemoteAssetStackId,
+ idxRemoteAssetLocalDateTimeDay,
+ idxRemoteAssetLocalDateTimeMonth,
+ authUserEntity,
+ userMetadataEntity,
+ partnerEntity,
+ remoteExifEntity,
+ remoteAlbumAssetEntity,
+ remoteAlbumUserEntity,
+ remoteAssetCloudIdEntity,
+ memoryEntity,
+ memoryAssetEntity,
+ personEntity,
+ assetFaceEntity,
+ storeEntity,
+ trashedLocalAssetEntity,
+ assetEditEntity,
+ idxPartnerSharedWithId,
+ idxLatLng,
+ idxRemoteAlbumAssetAlbumAsset,
+ idxRemoteAssetCloudId,
+ idxPersonOwnerId,
+ idxAssetFacePersonId,
+ idxAssetFaceAssetId,
+ idxTrashedLocalAssetChecksum,
+ idxTrashedLocalAssetAlbum,
+ idxAssetEditAssetId,
+ ];
+ @override
+ StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('remote_asset_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('stack_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('remote_album_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('remote_album_entity', kind: UpdateKind.update)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_album_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('local_album_entity', kind: UpdateKind.update)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'local_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('local_album_asset_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'local_album_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('local_album_asset_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('user_metadata_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('partner_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('partner_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('remote_exif_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_album_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('remote_album_asset_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_album_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('remote_album_user_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('remote_album_user_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [
+ TableUpdate('remote_asset_cloud_id_entity', kind: UpdateKind.delete),
+ ],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('memory_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'memory_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('memory_asset_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'user_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('person_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('asset_face_entity', kind: UpdateKind.delete)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'person_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('asset_face_entity', kind: UpdateKind.update)],
+ ),
+ WritePropagation(
+ on: TableUpdateQuery.onTableName(
+ 'remote_asset_entity',
+ limitUpdateKind: UpdateKind.delete,
+ ),
+ result: [TableUpdate('asset_edit_entity', kind: UpdateKind.delete)],
+ ),
+ ]);
+ @override
+ int get schemaVersion => 23;
+ @override
+ DriftDatabaseOptions get options =>
+ const DriftDatabaseOptions(storeDateTimeAsText: true);
+}
diff --git a/mobile/test/drift/main/generated/schema_v3.dart b/mobile/test/drift/main/generated/schema_v3.dart
index e4382a9fb9..ecfe09dfd7 100644
--- a/mobile/test/drift/main/generated/schema_v3.dart
+++ b/mobile/test/drift/main/generated/schema_v3.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -1971,13 +1973,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2021,7 +2024,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2032,7 +2035,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2044,7 +2047,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2053,14 +2056,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2099,7 +2102,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2108,14 +2111,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2127,7 +2130,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2146,7 +2149,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v4.dart b/mobile/test/drift/main/generated/schema_v4.dart
index 9eabea714f..8321f23a0d 100644
--- a/mobile/test/drift/main/generated/schema_v4.dart
+++ b/mobile/test/drift/main/generated/schema_v4.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -2492,13 +2494,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2542,7 +2545,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2553,7 +2556,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2565,7 +2568,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2574,14 +2577,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2620,7 +2623,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2629,14 +2632,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2648,7 +2651,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2667,7 +2670,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v5.dart b/mobile/test/drift/main/generated/schema_v5.dart
index 5c94ff26cb..e9f276c6bc 100644
--- a/mobile/test/drift/main/generated/schema_v5.dart
+++ b/mobile/test/drift/main/generated/schema_v5.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -2453,13 +2455,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2503,7 +2506,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2514,7 +2517,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2526,7 +2529,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2535,14 +2538,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2581,7 +2584,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2590,14 +2593,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2609,7 +2612,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2628,7 +2631,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v6.dart b/mobile/test/drift/main/generated/schema_v6.dart
index 97b91caa07..0a3fe51fb9 100644
--- a/mobile/test/drift/main/generated/schema_v6.dart
+++ b/mobile/test/drift/main/generated/schema_v6.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -2489,13 +2491,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2539,7 +2542,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2550,7 +2553,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2562,7 +2565,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2571,14 +2574,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2617,7 +2620,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2626,14 +2629,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2645,7 +2648,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2664,7 +2667,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v7.dart b/mobile/test/drift/main/generated/schema_v7.dart
index 276a0cdc74..e08c1ca445 100644
--- a/mobile/test/drift/main/generated/schema_v7.dart
+++ b/mobile/test/drift/main/generated/schema_v7.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -2489,13 +2491,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2539,7 +2542,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2550,7 +2553,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2562,7 +2565,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2571,14 +2574,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2617,7 +2620,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2626,14 +2629,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2645,7 +2648,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2664,7 +2667,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v8.dart b/mobile/test/drift/main/generated/schema_v8.dart
index 13520e6372..55a9d3ef4f 100644
--- a/mobile/test/drift/main/generated/schema_v8.dart
+++ b/mobile/test/drift/main/generated/schema_v8.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -2489,13 +2491,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -2539,7 +2542,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -2550,7 +2553,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -2562,7 +2565,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -2571,14 +2574,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -2617,7 +2620,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -2626,14 +2629,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -2645,7 +2648,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -2664,7 +2667,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/drift/main/generated/schema_v9.dart b/mobile/test/drift/main/generated/schema_v9.dart
index c2ccb58737..f09db1a378 100644
--- a/mobile/test/drift/main/generated/schema_v9.dart
+++ b/mobile/test/drift/main/generated/schema_v9.dart
@@ -1,6 +1,8 @@
// dart format width=80
-// GENERATED CODE, DO NOT EDIT BY HAND.
-// ignore_for_file: type=lint
+import 'dart:typed_data' as i2;
+// GENERATED BY drift_dev, DO NOT MODIFY.
+// ignore_for_file: type=lint,unused_import
+//
import 'package:drift/drift.dart';
class UserEntity extends Table with TableInfo<UserEntity, UserEntityData> {
@@ -2985,13 +2987,14 @@ class UserMetadataEntity extends Table
type: DriftSqlType.int,
requiredDuringInsert: true,
);
- late final GeneratedColumn<Uint8List> value = GeneratedColumn<Uint8List>(
- 'value',
- aliasedName,
- false,
- type: DriftSqlType.blob,
- requiredDuringInsert: true,
- );
+ late final GeneratedColumn<i2.Uint8List> value =
+ GeneratedColumn<i2.Uint8List>(
+ 'value',
+ aliasedName,
+ false,
+ type: DriftSqlType.blob,
+ requiredDuringInsert: true,
+ );
@override
List<GeneratedColumn> get $columns => [userId, key, value];
@override
@@ -3035,7 +3038,7 @@ class UserMetadataEntityData extends DataClass
implements Insertable<UserMetadataEntityData> {
final String userId;
final int key;
- final Uint8List value;
+ final i2.Uint8List value;
const UserMetadataEntityData({
required this.userId,
required this.key,
@@ -3046,7 +3049,7 @@ class UserMetadataEntityData extends DataClass
final map = <String, Expression>{};
map['user_id'] = Variable<String>(userId);
map['key'] = Variable<int>(key);
- map['value'] = Variable<Uint8List>(value);
+ map['value'] = Variable<i2.Uint8List>(value);
return map;
}
@@ -3058,7 +3061,7 @@ class UserMetadataEntityData extends DataClass
return UserMetadataEntityData(
userId: serializer.fromJson<String>(json['userId']),
key: serializer.fromJson<int>(json['key']),
- value: serializer.fromJson<Uint8List>(json['value']),
+ value: serializer.fromJson<i2.Uint8List>(json['value']),
);
}
@override
@@ -3067,14 +3070,14 @@ class UserMetadataEntityData extends DataClass
return <String, dynamic>{
'userId': serializer.toJson<String>(userId),
'key': serializer.toJson<int>(key),
- 'value': serializer.toJson<Uint8List>(value),
+ 'value': serializer.toJson<i2.Uint8List>(value),
};
}
UserMetadataEntityData copyWith({
String? userId,
int? key,
- Uint8List? value,
+ i2.Uint8List? value,
}) => UserMetadataEntityData(
userId: userId ?? this.userId,
key: key ?? this.key,
@@ -3113,7 +3116,7 @@ class UserMetadataEntityCompanion
extends UpdateCompanion<UserMetadataEntityData> {
final Value<String> userId;
final Value<int> key;
- final Value<Uint8List> value;
+ final Value<i2.Uint8List> value;
const UserMetadataEntityCompanion({
this.userId = const Value.absent(),
this.key = const Value.absent(),
@@ -3122,14 +3125,14 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion.insert({
required String userId,
required int key,
- required Uint8List value,
+ required i2.Uint8List value,
}) : userId = Value(userId),
key = Value(key),
value = Value(value);
static Insertable<UserMetadataEntityData> custom({
Expression<String>? userId,
Expression<int>? key,
- Expression<Uint8List>? value,
+ Expression<i2.Uint8List>? value,
}) {
return RawValuesInsertable({
if (userId != null) 'user_id': userId,
@@ -3141,7 +3144,7 @@ class UserMetadataEntityCompanion
UserMetadataEntityCompanion copyWith({
Value<String>? userId,
Value<int>? key,
- Value<Uint8List>? value,
+ Value<i2.Uint8List>? value,
}) {
return UserMetadataEntityCompanion(
userId: userId ?? this.userId,
@@ -3160,7 +3163,7 @@ class UserMetadataEntityCompanion
map['key'] = Variable<int>(key.value);
}
if (value.present) {
- map['value'] = Variable<Uint8List>(value.value);
+ map['value'] = Variable<i2.Uint8List>(value.value);
}
return map;
}
diff --git a/mobile/test/medium/repository_context.dart b/mobile/test/medium/repository_context.dart
index b6e1c4f0d5..da19ded9f7 100644
--- a/mobile/test/medium/repository_context.dart
+++ b/mobile/test/medium/repository_context.dart
@@ -77,7 +77,7 @@ class MediumRepositoryContext {
DateTime? deletedAt,
AssetType? type,
AssetVisibility? visibility,
- int? durationInSeconds,
+ int? durationMs,
int? width,
int? height,
bool? isFavorite,
@@ -102,7 +102,7 @@ class MediumRepositoryContext {
ownerId: Value(TestUtils.uuid(ownerId)),
visibility: Value(visibility ?? AssetVisibility.timeline),
deletedAt: Value(deletedAt),
- durationInSeconds: Value(durationInSeconds ?? 0),
+ durationMs: Value(durationMs ?? 0),
width: Value(width ?? _random.nextInt(1000)),
height: Value(height ?? _random.nextInt(1000)),
isFavorite: Value(isFavorite ?? false),
@@ -189,7 +189,7 @@ class MediumRepositoryContext {
double? longitude,
int? width,
int? height,
- int? durationInSeconds,
+ int? durationMs,
int? orientation,
DateTime? updatedAt,
}) async {
@@ -202,7 +202,7 @@ class MediumRepositoryContext {
name: Value(name ?? 'local_$id.jpg'),
height: Value(height ?? _random.nextInt(1000)),
width: Value(width ?? _random.nextInt(1000)),
- durationInSeconds: Value(durationInSeconds ?? 0),
+ durationMs: Value(durationMs ?? 0),
orientation: Value(orientation ?? 0),
updatedAt: Value(TestUtils.date(updatedAt)),
checksum: _resolveUndefined(checksum, checksumOption, const Uuid().v4()),
diff --git a/mobile/test/modules/extensions/builtin_extensions_test.dart b/mobile/test/modules/extensions/builtin_extensions_test.dart
index e52362f3d3..f506070722 100644
--- a/mobile/test/modules/extensions/builtin_extensions_test.dart
+++ b/mobile/test/modules/extensions/builtin_extensions_test.dart
@@ -7,6 +7,11 @@ void main() {
test('ok', () {
expect("1:02:33".toDuration(), const Duration(hours: 1, minutes: 2, seconds: 33));
});
+ test('fractional seconds', () {
+ expect("0:00:00.500000".toDuration(), const Duration(milliseconds: 500));
+ expect("0:00:01.250000".toDuration(), const Duration(seconds: 1, milliseconds: 250));
+ expect("1:02:33.123456".toDuration(), const Duration(hours: 1, minutes: 2, seconds: 33, milliseconds: 123));
+ });
test('malformed', () {
expect("".toDuration(), isNull);
expect("1:2".toDuration(), isNull);
diff --git a/mobile/test/test_utils.dart b/mobile/test/test_utils.dart
index 75a41b46fb..f29b29050a 100644
--- a/mobile/test/test_utils.dart
+++ b/mobile/test/test_utils.dart
@@ -58,7 +58,7 @@ abstract final class TestUtils {
type: domain.AssetType.image,
createdAt: DateTime(2024, 1, 1),
updatedAt: DateTime(2024, 1, 1),
- durationInSeconds: 0,
+ durationMs: 0,
isFavorite: false,
width: width,
height: height,
@@ -81,7 +81,7 @@ abstract final class TestUtils {
type: domain.AssetType.image,
createdAt: DateTime(2024, 1, 1),
updatedAt: DateTime(2024, 1, 1),
- durationInSeconds: 0,
+ durationMs: 0,
isFavorite: false,
width: width,
height: height,