mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
a96bba4b26
* feat: sync assets, partner assets, exif, and partner exif Co-authored-by: Zack Pollard <zack@futo.org> Co-authored-by: Alex Tran <alex.tran1502@gmail.com> * refactor: remove duplicate where clause and orderBy statements in sync queries * fix: asset deletes not filtering by ownerId --------- Co-authored-by: Zack Pollard <zack@futo.org> Co-authored-by: Alex Tran <alex.tran1502@gmail.com> Co-authored-by: Zack Pollard <zackpollard@ymail.com>
20 lines
559 B
TypeScript
20 lines
559 B
TypeScript
import { Column, CreateDateColumn, Entity, Index, PrimaryColumn } from 'typeorm';
|
|
|
|
@Entity('assets_audit')
|
|
export class AssetAuditEntity {
|
|
@PrimaryColumn({ type: 'uuid', nullable: false, default: () => 'immich_uuid_v7()' })
|
|
id!: string;
|
|
|
|
@Index('IDX_assets_audit_asset_id')
|
|
@Column({ type: 'uuid' })
|
|
assetId!: string;
|
|
|
|
@Index('IDX_assets_audit_owner_id')
|
|
@Column({ type: 'uuid' })
|
|
ownerId!: string;
|
|
|
|
@Index('IDX_assets_audit_deleted_at')
|
|
@CreateDateColumn({ type: 'timestamptz', default: () => 'clock_timestamp()' })
|
|
deletedAt!: Date;
|
|
}
|