mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat: show stacks in asset viewer (#19935)
* feat: show stacks in asset viewer * fix: global key issue and flash on stack asset change * feat(mobile): stack and unstack action (#19941) * feat(mobile): stack and unstack action * add custom model * use stackId from ActionSource * Update mobile/lib/providers/infrastructure/action.provider.dart Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> --------- Co-authored-by: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> * fix: lint * fix: bad merge * fix: test --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: Daimolean <92239625+wuzihao051119@users.noreply.github.com> Co-authored-by: wuzihao051119 <wuzihao051119@outlook.com>
This commit is contained in:
parent
546f841b2c
commit
f32cd74232
41 changed files with 1568 additions and 802 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import 'remote_asset.entity.dart';
|
||||
import 'local_asset.entity.dart';
|
||||
import 'stack.entity.dart';
|
||||
|
||||
mergedAsset: SELECT * FROM
|
||||
(
|
||||
|
|
@ -18,13 +19,33 @@ mergedAsset: SELECT * FROM
|
|||
rae.checksum,
|
||||
rae.owner_id,
|
||||
rae.live_photo_video_id,
|
||||
0 as orientation
|
||||
0 as orientation,
|
||||
rae.stack_id,
|
||||
COALESCE(stack_count.total_count, 0) AS stack_count
|
||||
FROM
|
||||
remote_asset_entity rae
|
||||
LEFT JOIN
|
||||
local_asset_entity lae ON rae.checksum = lae.checksum
|
||||
LEFT JOIN
|
||||
stack_entity se ON rae.stack_id = se.id
|
||||
LEFT JOIN
|
||||
(SELECT
|
||||
stack_id,
|
||||
COUNT(*) AS total_count
|
||||
FROM remote_asset_entity
|
||||
WHERE deleted_at IS NULL
|
||||
AND visibility = 0
|
||||
AND stack_id IS NOT NULL
|
||||
GROUP BY stack_id
|
||||
) AS stack_count ON rae.stack_id = stack_count.stack_id
|
||||
WHERE
|
||||
rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id in ?
|
||||
rae.deleted_at IS NULL
|
||||
AND rae.visibility = 0
|
||||
AND rae.owner_id in ?
|
||||
AND (
|
||||
rae.stack_id IS NULL
|
||||
OR rae.id = se.primary_asset_id
|
||||
)
|
||||
UNION ALL
|
||||
SELECT
|
||||
NULL as remote_id,
|
||||
|
|
@ -41,7 +62,9 @@ mergedAsset: SELECT * FROM
|
|||
lae.checksum,
|
||||
NULL as owner_id,
|
||||
NULL as live_photo_video_id,
|
||||
lae.orientation
|
||||
lae.orientation,
|
||||
NULL as stack_id,
|
||||
0 AS stack_count
|
||||
FROM
|
||||
local_asset_entity lae
|
||||
LEFT JOIN
|
||||
|
|
@ -68,8 +91,16 @@ FROM
|
|||
remote_asset_entity rae
|
||||
LEFT JOIN
|
||||
local_asset_entity lae ON rae.checksum = lae.checksum
|
||||
LEFT JOIN
|
||||
stack_entity se ON rae.stack_id = se.id
|
||||
WHERE
|
||||
rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id in ?
|
||||
rae.deleted_at IS NULL
|
||||
AND rae.visibility = 0
|
||||
AND rae.owner_id in ?
|
||||
AND (
|
||||
rae.stack_id IS NULL
|
||||
OR rae.id = se.primary_asset_id
|
||||
)
|
||||
UNION ALL
|
||||
SELECT
|
||||
lae.name,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@ import 'package:immich_mobile/infrastructure/entities/remote_asset.entity.drift.
|
|||
as i3;
|
||||
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart'
|
||||
as i4;
|
||||
import 'package:immich_mobile/infrastructure/entities/stack.entity.drift.dart'
|
||||
as i5;
|
||||
|
||||
class MergedAssetDrift extends i1.ModularAccessor {
|
||||
MergedAssetDrift(i0.GeneratedDatabase db) : super(db);
|
||||
|
|
@ -18,7 +20,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
final generatedlimit = $write(limit, startIndex: $arrayStartIndex);
|
||||
$arrayStartIndex += generatedlimit.amountOfVariables;
|
||||
return customSelect(
|
||||
'SELECT * FROM (SELECT rae.id AS remote_id, lae.id AS local_id, rae.name, rae.type, rae.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 FROM remote_asset_entity AS rae LEFT JOIN local_asset_entity AS lae ON rae.checksum = lae.checksum WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandedvar1) UNION ALL SELECT NULL AS remote_id, lae.id AS local_id, lae.name, lae.type, lae.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 FROM local_asset_entity AS lae LEFT JOIN remote_asset_entity AS rae ON rae.checksum = lae.checksum WHERE rae.id IS NULL) ORDER BY created_at DESC ${generatedlimit.sql}',
|
||||
'SELECT * FROM (SELECT rae.id AS remote_id, lae.id AS local_id, rae.name, rae.type, rae.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, COALESCE(stack_count.total_count, 0) AS stack_count FROM remote_asset_entity AS rae LEFT JOIN local_asset_entity AS lae ON rae.checksum = lae.checksum LEFT JOIN stack_entity AS se ON rae.stack_id = se.id LEFT JOIN (SELECT stack_id, COUNT(*) AS total_count FROM remote_asset_entity WHERE deleted_at IS NULL AND visibility = 0 AND stack_id IS NOT NULL GROUP BY stack_id) AS stack_count ON rae.stack_id = stack_count.stack_id WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandedvar1) 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, 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, 0 AS stack_count FROM local_asset_entity AS lae LEFT JOIN remote_asset_entity AS rae ON rae.checksum = lae.checksum WHERE rae.id IS NULL) ORDER BY created_at DESC ${generatedlimit.sql}',
|
||||
variables: [
|
||||
for (var $ in var1) i0.Variable<String>($),
|
||||
...generatedlimit.introducedVariables
|
||||
|
|
@ -26,6 +28,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
readsFrom: {
|
||||
remoteAssetEntity,
|
||||
localAssetEntity,
|
||||
stackEntity,
|
||||
...generatedlimit.watchedTables,
|
||||
}).map((i0.QueryRow row) => MergedAssetResult(
|
||||
remoteId: row.readNullable<String>('remote_id'),
|
||||
|
|
@ -44,6 +47,8 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
ownerId: row.readNullable<String>('owner_id'),
|
||||
livePhotoVideoId: row.readNullable<String>('live_photo_video_id'),
|
||||
orientation: row.read<int>('orientation'),
|
||||
stackId: row.readNullable<String>('stack_id'),
|
||||
stackCount: row.read<int>('stack_count'),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -53,7 +58,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
final expandedvar2 = $expandVar($arrayStartIndex, var2.length);
|
||||
$arrayStartIndex += var2.length;
|
||||
return customSelect(
|
||||
'SELECT COUNT(*) AS asset_count, CASE WHEN ?1 = 0 THEN STRFTIME(\'%Y-%m-%d\', created_at, \'localtime\') WHEN ?1 = 1 THEN STRFTIME(\'%Y-%m\', created_at, \'localtime\') END AS bucket_date FROM (SELECT rae.name, rae.created_at FROM remote_asset_entity AS rae LEFT JOIN local_asset_entity AS lae ON rae.checksum = lae.checksum WHERE rae.deleted_at IS NULL AND rae.visibility = 0 AND rae.owner_id IN ($expandedvar2) UNION ALL SELECT lae.name, lae.created_at FROM local_asset_entity AS lae LEFT JOIN remote_asset_entity AS rae ON rae.checksum = lae.checksum WHERE rae.id IS NULL) GROUP BY bucket_date ORDER BY bucket_date DESC',
|
||||
'SELECT COUNT(*) AS asset_count, CASE WHEN ?1 = 0 THEN STRFTIME(\'%Y-%m-%d\', created_at, \'localtime\') WHEN ?1 = 1 THEN STRFTIME(\'%Y-%m\', created_at, \'localtime\') END AS bucket_date FROM (SELECT rae.name, rae.created_at FROM remote_asset_entity AS rae LEFT JOIN local_asset_entity AS lae ON rae.checksum = lae.checksum 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 ($expandedvar2) AND(rae.stack_id IS NULL OR rae.id = se.primary_asset_id)UNION ALL SELECT lae.name, lae.created_at FROM local_asset_entity AS lae LEFT JOIN remote_asset_entity AS rae ON rae.checksum = lae.checksum WHERE rae.id IS NULL) GROUP BY bucket_date ORDER BY bucket_date DESC',
|
||||
variables: [
|
||||
i0.Variable<int>(groupBy),
|
||||
for (var $ in var2) i0.Variable<String>($)
|
||||
|
|
@ -61,6 +66,7 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
readsFrom: {
|
||||
remoteAssetEntity,
|
||||
localAssetEntity,
|
||||
stackEntity,
|
||||
}).map((i0.QueryRow row) => MergedBucketResult(
|
||||
assetCount: row.read<int>('asset_count'),
|
||||
bucketDate: row.read<String>('bucket_date'),
|
||||
|
|
@ -73,6 +79,9 @@ class MergedAssetDrift extends i1.ModularAccessor {
|
|||
i4.$LocalAssetEntityTable get localAssetEntity =>
|
||||
i1.ReadDatabaseContainer(attachedDatabase)
|
||||
.resultSet<i4.$LocalAssetEntityTable>('local_asset_entity');
|
||||
i5.$StackEntityTable get stackEntity =>
|
||||
i1.ReadDatabaseContainer(attachedDatabase)
|
||||
.resultSet<i5.$StackEntityTable>('stack_entity');
|
||||
}
|
||||
|
||||
class MergedAssetResult {
|
||||
|
|
@ -91,6 +100,8 @@ class MergedAssetResult {
|
|||
final String? ownerId;
|
||||
final String? livePhotoVideoId;
|
||||
final int orientation;
|
||||
final String? stackId;
|
||||
final int stackCount;
|
||||
MergedAssetResult({
|
||||
this.remoteId,
|
||||
this.localId,
|
||||
|
|
@ -107,6 +118,8 @@ class MergedAssetResult {
|
|||
this.ownerId,
|
||||
this.livePhotoVideoId,
|
||||
required this.orientation,
|
||||
this.stackId,
|
||||
required this.stackCount,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ class RemoteAssetEntity extends Table
|
|||
|
||||
IntColumn get visibility => intEnum<AssetVisibility>()();
|
||||
|
||||
TextColumn get stackId => text().nullable()();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
}
|
||||
|
|
@ -55,5 +57,6 @@ extension RemoteAssetEntityDataDomainEx on RemoteAssetEntityData {
|
|||
visibility: visibility,
|
||||
livePhotoVideoId: livePhotoVideoId,
|
||||
localId: null,
|
||||
stackId: stackId,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ typedef $$RemoteAssetEntityTableCreateCompanionBuilder
|
|||
i0.Value<DateTime?> deletedAt,
|
||||
i0.Value<String?> livePhotoVideoId,
|
||||
required i2.AssetVisibility visibility,
|
||||
i0.Value<String?> stackId,
|
||||
});
|
||||
typedef $$RemoteAssetEntityTableUpdateCompanionBuilder
|
||||
= i1.RemoteAssetEntityCompanion Function({
|
||||
|
|
@ -48,6 +49,7 @@ typedef $$RemoteAssetEntityTableUpdateCompanionBuilder
|
|||
i0.Value<DateTime?> deletedAt,
|
||||
i0.Value<String?> livePhotoVideoId,
|
||||
i0.Value<i2.AssetVisibility> visibility,
|
||||
i0.Value<String?> stackId,
|
||||
});
|
||||
|
||||
final class $$RemoteAssetEntityTableReferences extends i0.BaseReferences<
|
||||
|
|
@ -145,6 +147,9 @@ class $$RemoteAssetEntityTableFilterComposer
|
|||
column: $table.visibility,
|
||||
builder: (column) => i0.ColumnWithTypeConverterFilters(column));
|
||||
|
||||
i0.ColumnFilters<String> get stackId => $composableBuilder(
|
||||
column: $table.stackId, builder: (column) => i0.ColumnFilters(column));
|
||||
|
||||
i5.$$UserEntityTableFilterComposer get ownerId {
|
||||
final i5.$$UserEntityTableFilterComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
|
|
@ -231,6 +236,9 @@ class $$RemoteAssetEntityTableOrderingComposer
|
|||
column: $table.visibility,
|
||||
builder: (column) => i0.ColumnOrderings(column));
|
||||
|
||||
i0.ColumnOrderings<String> get stackId => $composableBuilder(
|
||||
column: $table.stackId, builder: (column) => i0.ColumnOrderings(column));
|
||||
|
||||
i5.$$UserEntityTableOrderingComposer get ownerId {
|
||||
final i5.$$UserEntityTableOrderingComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
|
|
@ -309,6 +317,9 @@ class $$RemoteAssetEntityTableAnnotationComposer
|
|||
$composableBuilder(
|
||||
column: $table.visibility, builder: (column) => column);
|
||||
|
||||
i0.GeneratedColumn<String> get stackId =>
|
||||
$composableBuilder(column: $table.stackId, builder: (column) => column);
|
||||
|
||||
i5.$$UserEntityTableAnnotationComposer get ownerId {
|
||||
final i5.$$UserEntityTableAnnotationComposer composer = $composerBuilder(
|
||||
composer: this,
|
||||
|
|
@ -373,6 +384,7 @@ class $$RemoteAssetEntityTableTableManager extends i0.RootTableManager<
|
|||
i0.Value<DateTime?> deletedAt = const i0.Value.absent(),
|
||||
i0.Value<String?> livePhotoVideoId = const i0.Value.absent(),
|
||||
i0.Value<i2.AssetVisibility> visibility = const i0.Value.absent(),
|
||||
i0.Value<String?> stackId = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.RemoteAssetEntityCompanion(
|
||||
name: name,
|
||||
|
|
@ -391,6 +403,7 @@ class $$RemoteAssetEntityTableTableManager extends i0.RootTableManager<
|
|||
deletedAt: deletedAt,
|
||||
livePhotoVideoId: livePhotoVideoId,
|
||||
visibility: visibility,
|
||||
stackId: stackId,
|
||||
),
|
||||
createCompanionCallback: ({
|
||||
required String name,
|
||||
|
|
@ -409,6 +422,7 @@ class $$RemoteAssetEntityTableTableManager extends i0.RootTableManager<
|
|||
i0.Value<DateTime?> deletedAt = const i0.Value.absent(),
|
||||
i0.Value<String?> livePhotoVideoId = const i0.Value.absent(),
|
||||
required i2.AssetVisibility visibility,
|
||||
i0.Value<String?> stackId = const i0.Value.absent(),
|
||||
}) =>
|
||||
i1.RemoteAssetEntityCompanion.insert(
|
||||
name: name,
|
||||
|
|
@ -427,6 +441,7 @@ class $$RemoteAssetEntityTableTableManager extends i0.RootTableManager<
|
|||
deletedAt: deletedAt,
|
||||
livePhotoVideoId: livePhotoVideoId,
|
||||
visibility: visibility,
|
||||
stackId: stackId,
|
||||
),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (
|
||||
|
|
@ -602,6 +617,12 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
type: i0.DriftSqlType.int, requiredDuringInsert: true)
|
||||
.withConverter<i2.AssetVisibility>(
|
||||
i1.$RemoteAssetEntityTable.$convertervisibility);
|
||||
static const i0.VerificationMeta _stackIdMeta =
|
||||
const i0.VerificationMeta('stackId');
|
||||
@override
|
||||
late final i0.GeneratedColumn<String> stackId = i0.GeneratedColumn<String>(
|
||||
'stack_id', aliasedName, true,
|
||||
type: i0.DriftSqlType.string, requiredDuringInsert: false);
|
||||
@override
|
||||
List<i0.GeneratedColumn> get $columns => [
|
||||
name,
|
||||
|
|
@ -619,7 +640,8 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
thumbHash,
|
||||
deletedAt,
|
||||
livePhotoVideoId,
|
||||
visibility
|
||||
visibility,
|
||||
stackId
|
||||
];
|
||||
@override
|
||||
String get aliasedName => _alias ?? actualTableName;
|
||||
|
|
@ -703,6 +725,10 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
livePhotoVideoId.isAcceptableOrUnknown(
|
||||
data['live_photo_video_id']!, _livePhotoVideoIdMeta));
|
||||
}
|
||||
if (data.containsKey('stack_id')) {
|
||||
context.handle(_stackIdMeta,
|
||||
stackId.isAcceptableOrUnknown(data['stack_id']!, _stackIdMeta));
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
|
|
@ -748,6 +774,8 @@ class $RemoteAssetEntityTable extends i3.RemoteAssetEntity
|
|||
visibility: i1.$RemoteAssetEntityTable.$convertervisibility.fromSql(
|
||||
attachedDatabase.typeMapping.read(
|
||||
i0.DriftSqlType.int, data['${effectivePrefix}visibility'])!),
|
||||
stackId: attachedDatabase.typeMapping
|
||||
.read(i0.DriftSqlType.string, data['${effectivePrefix}stack_id']),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -785,6 +813,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
final DateTime? deletedAt;
|
||||
final String? livePhotoVideoId;
|
||||
final i2.AssetVisibility visibility;
|
||||
final String? stackId;
|
||||
const RemoteAssetEntityData(
|
||||
{required this.name,
|
||||
required this.type,
|
||||
|
|
@ -801,7 +830,8 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
this.thumbHash,
|
||||
this.deletedAt,
|
||||
this.livePhotoVideoId,
|
||||
required this.visibility});
|
||||
required this.visibility,
|
||||
this.stackId});
|
||||
@override
|
||||
Map<String, i0.Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, i0.Expression>{};
|
||||
|
|
@ -841,6 +871,9 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
map['visibility'] = i0.Variable<int>(
|
||||
i1.$RemoteAssetEntityTable.$convertervisibility.toSql(visibility));
|
||||
}
|
||||
if (!nullToAbsent || stackId != null) {
|
||||
map['stack_id'] = i0.Variable<String>(stackId);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -866,6 +899,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
livePhotoVideoId: serializer.fromJson<String?>(json['livePhotoVideoId']),
|
||||
visibility: i1.$RemoteAssetEntityTable.$convertervisibility
|
||||
.fromJson(serializer.fromJson<int>(json['visibility'])),
|
||||
stackId: serializer.fromJson<String?>(json['stackId']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
|
|
@ -890,6 +924,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
'livePhotoVideoId': serializer.toJson<String?>(livePhotoVideoId),
|
||||
'visibility': serializer.toJson<int>(
|
||||
i1.$RemoteAssetEntityTable.$convertervisibility.toJson(visibility)),
|
||||
'stackId': serializer.toJson<String?>(stackId),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -909,7 +944,8 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
i0.Value<String?> thumbHash = const i0.Value.absent(),
|
||||
i0.Value<DateTime?> deletedAt = const i0.Value.absent(),
|
||||
i0.Value<String?> livePhotoVideoId = const i0.Value.absent(),
|
||||
i2.AssetVisibility? visibility}) =>
|
||||
i2.AssetVisibility? visibility,
|
||||
i0.Value<String?> stackId = const i0.Value.absent()}) =>
|
||||
i1.RemoteAssetEntityData(
|
||||
name: name ?? this.name,
|
||||
type: type ?? this.type,
|
||||
|
|
@ -932,6 +968,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
? livePhotoVideoId.value
|
||||
: this.livePhotoVideoId,
|
||||
visibility: visibility ?? this.visibility,
|
||||
stackId: stackId.present ? stackId.value : this.stackId,
|
||||
);
|
||||
RemoteAssetEntityData copyWithCompanion(i1.RemoteAssetEntityCompanion data) {
|
||||
return RemoteAssetEntityData(
|
||||
|
|
@ -959,6 +996,7 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
: this.livePhotoVideoId,
|
||||
visibility:
|
||||
data.visibility.present ? data.visibility.value : this.visibility,
|
||||
stackId: data.stackId.present ? data.stackId.value : this.stackId,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -980,7 +1018,8 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
..write('thumbHash: $thumbHash, ')
|
||||
..write('deletedAt: $deletedAt, ')
|
||||
..write('livePhotoVideoId: $livePhotoVideoId, ')
|
||||
..write('visibility: $visibility')
|
||||
..write('visibility: $visibility, ')
|
||||
..write('stackId: $stackId')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
|
@ -1002,7 +1041,8 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
thumbHash,
|
||||
deletedAt,
|
||||
livePhotoVideoId,
|
||||
visibility);
|
||||
visibility,
|
||||
stackId);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
|
|
@ -1022,7 +1062,8 @@ class RemoteAssetEntityData extends i0.DataClass
|
|||
other.thumbHash == this.thumbHash &&
|
||||
other.deletedAt == this.deletedAt &&
|
||||
other.livePhotoVideoId == this.livePhotoVideoId &&
|
||||
other.visibility == this.visibility);
|
||||
other.visibility == this.visibility &&
|
||||
other.stackId == this.stackId);
|
||||
}
|
||||
|
||||
class RemoteAssetEntityCompanion
|
||||
|
|
@ -1043,6 +1084,7 @@ class RemoteAssetEntityCompanion
|
|||
final i0.Value<DateTime?> deletedAt;
|
||||
final i0.Value<String?> livePhotoVideoId;
|
||||
final i0.Value<i2.AssetVisibility> visibility;
|
||||
final i0.Value<String?> stackId;
|
||||
const RemoteAssetEntityCompanion({
|
||||
this.name = const i0.Value.absent(),
|
||||
this.type = const i0.Value.absent(),
|
||||
|
|
@ -1060,6 +1102,7 @@ class RemoteAssetEntityCompanion
|
|||
this.deletedAt = const i0.Value.absent(),
|
||||
this.livePhotoVideoId = const i0.Value.absent(),
|
||||
this.visibility = const i0.Value.absent(),
|
||||
this.stackId = const i0.Value.absent(),
|
||||
});
|
||||
RemoteAssetEntityCompanion.insert({
|
||||
required String name,
|
||||
|
|
@ -1078,6 +1121,7 @@ class RemoteAssetEntityCompanion
|
|||
this.deletedAt = const i0.Value.absent(),
|
||||
this.livePhotoVideoId = const i0.Value.absent(),
|
||||
required i2.AssetVisibility visibility,
|
||||
this.stackId = const i0.Value.absent(),
|
||||
}) : name = i0.Value(name),
|
||||
type = i0.Value(type),
|
||||
id = i0.Value(id),
|
||||
|
|
@ -1101,6 +1145,7 @@ class RemoteAssetEntityCompanion
|
|||
i0.Expression<DateTime>? deletedAt,
|
||||
i0.Expression<String>? livePhotoVideoId,
|
||||
i0.Expression<int>? visibility,
|
||||
i0.Expression<String>? stackId,
|
||||
}) {
|
||||
return i0.RawValuesInsertable({
|
||||
if (name != null) 'name': name,
|
||||
|
|
@ -1119,6 +1164,7 @@ class RemoteAssetEntityCompanion
|
|||
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,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1138,7 +1184,8 @@ class RemoteAssetEntityCompanion
|
|||
i0.Value<String?>? thumbHash,
|
||||
i0.Value<DateTime?>? deletedAt,
|
||||
i0.Value<String?>? livePhotoVideoId,
|
||||
i0.Value<i2.AssetVisibility>? visibility}) {
|
||||
i0.Value<i2.AssetVisibility>? visibility,
|
||||
i0.Value<String?>? stackId}) {
|
||||
return i1.RemoteAssetEntityCompanion(
|
||||
name: name ?? this.name,
|
||||
type: type ?? this.type,
|
||||
|
|
@ -1156,6 +1203,7 @@ class RemoteAssetEntityCompanion
|
|||
deletedAt: deletedAt ?? this.deletedAt,
|
||||
livePhotoVideoId: livePhotoVideoId ?? this.livePhotoVideoId,
|
||||
visibility: visibility ?? this.visibility,
|
||||
stackId: stackId ?? this.stackId,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -1213,6 +1261,9 @@ class RemoteAssetEntityCompanion
|
|||
.$RemoteAssetEntityTable.$convertervisibility
|
||||
.toSql(visibility.value));
|
||||
}
|
||||
if (stackId.present) {
|
||||
map['stack_id'] = i0.Variable<String>(stackId.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
@ -1234,7 +1285,8 @@ class RemoteAssetEntityCompanion
|
|||
..write('thumbHash: $thumbHash, ')
|
||||
..write('deletedAt: $deletedAt, ')
|
||||
..write('livePhotoVideoId: $livePhotoVideoId, ')
|
||||
..write('visibility: $visibility')
|
||||
..write('visibility: $visibility, ')
|
||||
..write('stackId: $stackId')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue