2025-03-29 09:26:24 -04:00
|
|
|
import { AssetFaceTable } from 'src/schema/tables/asset-face.table';
|
2025-03-28 10:40:09 -04:00
|
|
|
import { Column, ColumnIndex, ForeignKeyColumn, Table } from 'src/sql-tools';
|
|
|
|
|
|
|
|
|
|
@Table({ name: 'face_search', primaryConstraintName: 'face_search_pkey' })
|
|
|
|
|
export class FaceSearchTable {
|
|
|
|
|
@ForeignKeyColumn(() => AssetFaceTable, {
|
|
|
|
|
onDelete: 'CASCADE',
|
|
|
|
|
primary: true,
|
|
|
|
|
constraintName: 'face_search_faceId_fkey',
|
|
|
|
|
})
|
|
|
|
|
faceId!: string;
|
|
|
|
|
|
|
|
|
|
@ColumnIndex({ name: 'face_index', synchronize: false })
|
|
|
|
|
@Column({ type: 'vector', array: true, length: 512, synchronize: false })
|
|
|
|
|
embedding!: string;
|
|
|
|
|
}
|