mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 11:56:46 +01:00
d9698884bd
refactor: track thumbnail jobs in job status table
27 lines
785 B
TypeScript
27 lines
785 B
TypeScript
import { AssetEntity } from 'src/entities/asset.entity';
|
|
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
|
|
|
@Entity('asset_job_status')
|
|
export class AssetJobStatusEntity {
|
|
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', onUpdate: 'CASCADE' })
|
|
@JoinColumn()
|
|
asset!: AssetEntity;
|
|
|
|
@PrimaryColumn()
|
|
assetId!: string;
|
|
|
|
@Column({ type: 'timestamptz', nullable: true })
|
|
facesRecognizedAt!: Date | null;
|
|
|
|
@Column({ type: 'timestamptz', nullable: true })
|
|
metadataExtractedAt!: Date | null;
|
|
|
|
@Column({ type: 'timestamptz', nullable: true })
|
|
duplicatesDetectedAt!: Date | null;
|
|
|
|
@Column({ type: 'timestamptz', nullable: true })
|
|
previewAt!: Date | null;
|
|
|
|
@Column({ type: 'timestamptz', nullable: true })
|
|
thumbnailAt!: Date | null;
|
|
}
|