mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +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": {
|
"isFavorite": {
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
|
"livePhotoVideoId": {
|
||||||
|
"nullable": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"localDateTime": {
|
"localDateTime": {
|
||||||
"format": "date-time",
|
"format": "date-time",
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
|
|
@ -13829,6 +13833,10 @@
|
||||||
"ownerId": {
|
"ownerId": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"stackId": {
|
||||||
|
"nullable": true,
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"thumbhash": {
|
"thumbhash": {
|
||||||
"nullable": true,
|
"nullable": true,
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
@ -13856,9 +13864,11 @@
|
||||||
"fileModifiedAt",
|
"fileModifiedAt",
|
||||||
"id",
|
"id",
|
||||||
"isFavorite",
|
"isFavorite",
|
||||||
|
"livePhotoVideoId",
|
||||||
"localDateTime",
|
"localDateTime",
|
||||||
"originalFileName",
|
"originalFileName",
|
||||||
"ownerId",
|
"ownerId",
|
||||||
|
"stackId",
|
||||||
"thumbhash",
|
"thumbhash",
|
||||||
"type",
|
"type",
|
||||||
"visibility"
|
"visibility"
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,8 @@ export const columns = {
|
||||||
'asset.isFavorite',
|
'asset.isFavorite',
|
||||||
'asset.visibility',
|
'asset.visibility',
|
||||||
'asset.duration',
|
'asset.duration',
|
||||||
|
'asset.livePhotoVideoId',
|
||||||
|
'asset.stackId',
|
||||||
],
|
],
|
||||||
syncAlbumUser: ['album_user.albumsId as albumId', 'album_user.usersId as userId', 'album_user.role'],
|
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'],
|
syncStack: ['stack.id', 'stack.createdAt', 'stack.updatedAt', 'stack.primaryAssetId', 'stack.ownerId'],
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,8 @@ export class SyncAssetV1 {
|
||||||
isFavorite!: boolean;
|
isFavorite!: boolean;
|
||||||
@ApiProperty({ enumName: 'AssetVisibility', enum: AssetVisibility })
|
@ApiProperty({ enumName: 'AssetVisibility', enum: AssetVisibility })
|
||||||
visibility!: AssetVisibility;
|
visibility!: AssetVisibility;
|
||||||
|
livePhotoVideoId!: string | null;
|
||||||
|
stackId!: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ExtraModel()
|
@ExtraModel()
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,8 @@ select
|
||||||
"asset"."isFavorite",
|
"asset"."isFavorite",
|
||||||
"asset"."visibility",
|
"asset"."visibility",
|
||||||
"asset"."duration",
|
"asset"."duration",
|
||||||
|
"asset"."livePhotoVideoId",
|
||||||
|
"asset"."stackId",
|
||||||
"asset"."updateId"
|
"asset"."updateId"
|
||||||
from
|
from
|
||||||
"asset"
|
"asset"
|
||||||
|
|
@ -91,6 +93,8 @@ select
|
||||||
"asset"."isFavorite",
|
"asset"."isFavorite",
|
||||||
"asset"."visibility",
|
"asset"."visibility",
|
||||||
"asset"."duration",
|
"asset"."duration",
|
||||||
|
"asset"."livePhotoVideoId",
|
||||||
|
"asset"."stackId",
|
||||||
"asset"."updateId"
|
"asset"."updateId"
|
||||||
from
|
from
|
||||||
"asset"
|
"asset"
|
||||||
|
|
@ -351,6 +355,8 @@ select
|
||||||
"asset"."isFavorite",
|
"asset"."isFavorite",
|
||||||
"asset"."visibility",
|
"asset"."visibility",
|
||||||
"asset"."duration",
|
"asset"."duration",
|
||||||
|
"asset"."livePhotoVideoId",
|
||||||
|
"asset"."stackId",
|
||||||
"asset"."updateId"
|
"asset"."updateId"
|
||||||
from
|
from
|
||||||
"asset"
|
"asset"
|
||||||
|
|
@ -539,6 +545,8 @@ select
|
||||||
"asset"."isFavorite",
|
"asset"."isFavorite",
|
||||||
"asset"."visibility",
|
"asset"."visibility",
|
||||||
"asset"."duration",
|
"asset"."duration",
|
||||||
|
"asset"."livePhotoVideoId",
|
||||||
|
"asset"."stackId",
|
||||||
"asset"."updateId"
|
"asset"."updateId"
|
||||||
from
|
from
|
||||||
"asset"
|
"asset"
|
||||||
|
|
@ -584,6 +592,8 @@ select
|
||||||
"asset"."isFavorite",
|
"asset"."isFavorite",
|
||||||
"asset"."visibility",
|
"asset"."visibility",
|
||||||
"asset"."duration",
|
"asset"."duration",
|
||||||
|
"asset"."livePhotoVideoId",
|
||||||
|
"asset"."stackId",
|
||||||
"asset"."updateId"
|
"asset"."updateId"
|
||||||
from
|
from
|
||||||
"asset"
|
"asset"
|
||||||
|
|
|
||||||
|
|
@ -380,6 +380,8 @@ export class JobService extends BaseService {
|
||||||
deletedAt: asset.deletedAt,
|
deletedAt: asset.deletedAt,
|
||||||
isFavorite: asset.isFavorite,
|
isFavorite: asset.isFavorite,
|
||||||
visibility: asset.visibility,
|
visibility: asset.visibility,
|
||||||
|
livePhotoVideoId: asset.livePhotoVideoId,
|
||||||
|
stackId: asset.stackId,
|
||||||
},
|
},
|
||||||
exif: {
|
exif: {
|
||||||
assetId: exif.assetId,
|
assetId: exif.assetId,
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ describe(SyncRequestType.AlbumAssetsV1, () => {
|
||||||
localDateTime: date,
|
localDateTime: date,
|
||||||
deletedAt: null,
|
deletedAt: null,
|
||||||
duration: '0:10:00.00000',
|
duration: '0:10:00.00000',
|
||||||
|
livePhotoVideoId: null,
|
||||||
|
stackId: null,
|
||||||
});
|
});
|
||||||
const { album } = await ctx.newAlbum({ ownerId: user2.id });
|
const { album } = await ctx.newAlbum({ ownerId: user2.id });
|
||||||
await ctx.newAlbumAsset({ albumId: album.id, assetId: asset.id });
|
await ctx.newAlbumAsset({ albumId: album.id, assetId: asset.id });
|
||||||
|
|
@ -60,6 +62,8 @@ describe(SyncRequestType.AlbumAssetsV1, () => {
|
||||||
type: asset.type,
|
type: asset.type,
|
||||||
visibility: asset.visibility,
|
visibility: asset.visibility,
|
||||||
duration: asset.duration,
|
duration: asset.duration,
|
||||||
|
livePhotoVideoId: asset.livePhotoVideoId,
|
||||||
|
stackId: asset.stackId,
|
||||||
},
|
},
|
||||||
type: SyncEntityType.AlbumAssetV1,
|
type: SyncEntityType.AlbumAssetV1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@ describe(SyncEntityType.AssetV1, () => {
|
||||||
type: asset.type,
|
type: asset.type,
|
||||||
visibility: asset.visibility,
|
visibility: asset.visibility,
|
||||||
duration: asset.duration,
|
duration: asset.duration,
|
||||||
|
stackId: null,
|
||||||
|
livePhotoVideoId: null,
|
||||||
},
|
},
|
||||||
type: 'AssetV1',
|
type: 'AssetV1',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@ describe(SyncRequestType.PartnerAssetsV1, () => {
|
||||||
type: asset.type,
|
type: asset.type,
|
||||||
visibility: asset.visibility,
|
visibility: asset.visibility,
|
||||||
duration: asset.duration,
|
duration: asset.duration,
|
||||||
|
stackId: null,
|
||||||
|
livePhotoVideoId: null,
|
||||||
},
|
},
|
||||||
type: SyncEntityType.PartnerAssetV1,
|
type: SyncEntityType.PartnerAssetV1,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue