* 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
550 B
TypeScript
17 lines
550 B
TypeScript
import { AssetFaceEntity } from 'src/entities/asset-face.entity';
|
|
import { Column, Entity, Index, JoinColumn, OneToOne, PrimaryColumn } from 'typeorm';
|
|
|
|
@Entity('face_search', { synchronize: false })
|
|
export class FaceSearchEntity {
|
|
@OneToOne(() => AssetFaceEntity, { onDelete: 'CASCADE', nullable: true })
|
|
@JoinColumn({ name: 'faceId', referencedColumnName: 'id' })
|
|
face?: AssetFaceEntity;
|
|
|
|
@PrimaryColumn()
|
|
faceId!: string;
|
|
|
|
@Index('face_index', { synchronize: false })
|
|
@Column({ type: 'float4', array: true })
|
|
embedding!: string;
|
|
}
|