1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/backend/model/sql/enitites/PersonEntry.ts
Patrik J. Braun 0d3b8823e4 ui directory refactoring
adding thumbnail loader for faces
2019-03-03 10:30:12 +01:00

25 lines
585 B
TypeScript

import {Column, Entity, Index, OneToMany, PrimaryGeneratedColumn, Unique} from 'typeorm';
import {FaceRegionEntry} from './FaceRegionEntry';
import {PersonDTO} from '../../../../common/entities/PersonDTO';
@Entity()
@Unique(['name'])
export class PersonEntry implements PersonDTO {
@Index()
@PrimaryGeneratedColumn({unsigned: true})
id: number;
@Column()
name: string;
@Column('int', {unsigned: true, default: 0})
count: number;
@OneToMany(type => FaceRegionEntry, faceRegion => faceRegion.person)
public faces: FaceRegionEntry[];
readyThumbnail: boolean;
}