1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-06 11:56:46 +01:00
immich/server/src/entities/asset-job-status.entity.ts
Jason Rasmussen d9698884bd
refactor(server): track thumbnail jobs in job status table (#11908)
refactor: track thumbnail jobs in job status table
2024-08-19 13:50:00 -04:00

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;
}