mirror of
https://github.com/samsonjs/immich.git
synced 2026-03-25 09:15:56 +00:00
chore: asset sync FKs (#19927)
This commit is contained in:
parent
a97ba4862f
commit
805ec3e351
9 changed files with 34 additions and 0 deletions
BIN
mobile/openapi/lib/model/sync_asset_v1.dart
generated
BIN
mobile/openapi/lib/model/sync_asset_v1.dart
generated
Binary file not shown.
|
|
@ -13818,6 +13818,10 @@
|
|||
"isFavorite": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"livePhotoVideoId": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"localDateTime": {
|
||||
"format": "date-time",
|
||||
"nullable": true,
|
||||
|
|
@ -13829,6 +13833,10 @@
|
|||
"ownerId": {
|
||||
"type": "string"
|
||||
},
|
||||
"stackId": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"thumbhash": {
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
|
|
@ -13856,9 +13864,11 @@
|
|||
"fileModifiedAt",
|
||||
"id",
|
||||
"isFavorite",
|
||||
"livePhotoVideoId",
|
||||
"localDateTime",
|
||||
"originalFileName",
|
||||
"ownerId",
|
||||
"stackId",
|
||||
"thumbhash",
|
||||
"type",
|
||||
"visibility"
|
||||
|
|
|
|||
|
|
@ -349,6 +349,8 @@ export const columns = {
|
|||
'asset.isFavorite',
|
||||
'asset.visibility',
|
||||
'asset.duration',
|
||||
'asset.livePhotoVideoId',
|
||||
'asset.stackId',
|
||||
],
|
||||
syncAlbumUser: ['album_user.albumsId as albumId', 'album_user.usersId as userId', 'album_user.role'],
|
||||
syncStack: ['stack.id', 'stack.createdAt', 'stack.updatedAt', 'stack.primaryAssetId', 'stack.ownerId'],
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ export class SyncAssetV1 {
|
|||
isFavorite!: boolean;
|
||||
@ApiProperty({ enumName: 'AssetVisibility', enum: AssetVisibility })
|
||||
visibility!: AssetVisibility;
|
||||
livePhotoVideoId!: string | null;
|
||||
stackId!: string | null;
|
||||
}
|
||||
|
||||
@ExtraModel()
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -91,6 +93,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -351,6 +355,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -539,6 +545,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
@ -584,6 +592,8 @@ select
|
|||
"asset"."isFavorite",
|
||||
"asset"."visibility",
|
||||
"asset"."duration",
|
||||
"asset"."livePhotoVideoId",
|
||||
"asset"."stackId",
|
||||
"asset"."updateId"
|
||||
from
|
||||
"asset"
|
||||
|
|
|
|||
|
|
@ -380,6 +380,8 @@ export class JobService extends BaseService {
|
|||
deletedAt: asset.deletedAt,
|
||||
isFavorite: asset.isFavorite,
|
||||
visibility: asset.visibility,
|
||||
livePhotoVideoId: asset.livePhotoVideoId,
|
||||
stackId: asset.stackId,
|
||||
},
|
||||
exif: {
|
||||
assetId: exif.assetId,
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ describe(SyncRequestType.AlbumAssetsV1, () => {
|
|||
localDateTime: date,
|
||||
deletedAt: null,
|
||||
duration: '0:10:00.00000',
|
||||
livePhotoVideoId: null,
|
||||
stackId: null,
|
||||
});
|
||||
const { album } = await ctx.newAlbum({ ownerId: user2.id });
|
||||
await ctx.newAlbumAsset({ albumId: album.id, assetId: asset.id });
|
||||
|
|
@ -60,6 +62,8 @@ describe(SyncRequestType.AlbumAssetsV1, () => {
|
|||
type: asset.type,
|
||||
visibility: asset.visibility,
|
||||
duration: asset.duration,
|
||||
livePhotoVideoId: asset.livePhotoVideoId,
|
||||
stackId: asset.stackId,
|
||||
},
|
||||
type: SyncEntityType.AlbumAssetV1,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ describe(SyncEntityType.AssetV1, () => {
|
|||
type: asset.type,
|
||||
visibility: asset.visibility,
|
||||
duration: asset.duration,
|
||||
stackId: null,
|
||||
livePhotoVideoId: null,
|
||||
},
|
||||
type: 'AssetV1',
|
||||
},
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ describe(SyncRequestType.PartnerAssetsV1, () => {
|
|||
type: asset.type,
|
||||
visibility: asset.visibility,
|
||||
duration: asset.duration,
|
||||
stackId: null,
|
||||
livePhotoVideoId: null,
|
||||
},
|
||||
type: SyncEntityType.PartnerAssetV1,
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue