mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(server): improve and refactor get all albums (#2048)
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
2400004f41
commit
c74fba483d
23 changed files with 1027 additions and 752 deletions
|
|
@ -12,6 +12,7 @@ import {
|
|||
Unique,
|
||||
UpdateDateColumn,
|
||||
} from 'typeorm';
|
||||
import { AlbumEntity } from './album.entity';
|
||||
import { ExifEntity } from './exif.entity';
|
||||
import { SharedLinkEntity } from './shared-link.entity';
|
||||
import { SmartInfoEntity } from './smart-info.entity';
|
||||
|
|
@ -99,6 +100,9 @@ export class AssetEntity {
|
|||
@ManyToMany(() => SharedLinkEntity, (link) => link.assets, { cascade: true })
|
||||
@JoinTable({ name: 'shared_link__asset' })
|
||||
sharedLinks!: SharedLinkEntity[];
|
||||
|
||||
@ManyToMany(() => AlbumEntity, (album) => album.assets)
|
||||
albums?: AlbumEntity[];
|
||||
}
|
||||
|
||||
export enum AssetType {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue