mirror of
https://github.com/immich-app/immich.git
synced 2025-12-26 01:11:47 +03:00
* refactor: migrate person repository to kysely * `asVector` begone * linting * fix metadata faces * update test --------- Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
17 lines
538 B
TypeScript
17 lines
538 B
TypeScript
import { AssetEntity } from 'src/entities/asset.entity';
|
|
import { Column, Entity, Index, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
|
|
|
@Entity('smart_search', { synchronize: false })
|
|
export class SmartSearchEntity {
|
|
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', nullable: true })
|
|
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
|
|
asset?: AssetEntity;
|
|
|
|
@PrimaryColumn()
|
|
assetId!: string;
|
|
|
|
@Index('clip_index', { synchronize: false })
|
|
@Column({ type: 'float4', array: true })
|
|
embedding!: string;
|
|
}
|