mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
* refactor: flatten infra folders * fix: database migrations * fix: test related import * fix: github actions workflow * chore: rename schemas to typesense-schemas
26 lines
660 B
TypeScript
26 lines
660 B
TypeScript
import { Column, Entity, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
|
import { AssetEntity } from './asset.entity';
|
|
|
|
@Entity('smart_info')
|
|
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;
|
|
|
|
@Column({
|
|
type: 'float4',
|
|
array: true,
|
|
nullable: true,
|
|
})
|
|
clipEmbedding!: number[] | null;
|
|
}
|