mirror of
https://github.com/immich-app/immich.git
synced 2025-12-06 04:41:40 -08:00
* Refactor docker-compose to its own folder * Added FastAPI development environment * Added support for GPU in docker file * Added image classification * creating endpoint for smart Image info * added logo with white background on ios * Added endpoint and trigger for image tagging * Classify image and save into database * Update readme
20 lines
552 B
TypeScript
20 lines
552 B
TypeScript
import { Column, Entity, Index, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
|
import { AssetEntity } from './asset.entity';
|
|
|
|
@Entity('smart_info')
|
|
export class SmartInfoEntity {
|
|
@PrimaryGeneratedColumn()
|
|
id: string;
|
|
|
|
@Index({ unique: true })
|
|
@Column({ type: 'uuid' })
|
|
assetId: string;
|
|
|
|
@Column({ type: 'text', array: true, nullable: true })
|
|
tags: string[];
|
|
|
|
@OneToOne(() => AssetEntity, { onDelete: 'CASCADE', nullable: true })
|
|
@JoinColumn({ name: 'assetId', referencedColumnName: 'id' })
|
|
asset: SmartInfoEntity;
|
|
}
|