mirror of
https://github.com/immich-app/immich.git
synced 2026-01-22 11:47:22 -05:00
19 lines
585 B
TypeScript
19 lines
585 B
TypeScript
import { AssetEntity } from 'src/entities/asset.entity';
|
|
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
|
|
|
@Entity('smart_info', { synchronize: false })
|
|
export class SmartInfoEntity {
|
|
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', nullable: true })
|
|
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
|
|
asset?: AssetEntity;
|
|
|
|
@PrimaryColumn()
|
|
assetId!: string;
|
|
|
|
@Column({ type: 'text', array: true, nullable: true })
|
|
tags!: string[] | null;
|
|
|
|
@Column({ type: 'text', array: true, nullable: true })
|
|
objects!: string[] | null;
|
|
}
|