1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
2019-01-27 14:36:42 -05:00

18 lines
407 B
TypeScript

import {Column, Entity, OneToMany, PrimaryGeneratedColumn, Unique, Index} from 'typeorm';
import {FaceRegionEntry} from './FaceRegionEntry';
@Entity()
@Unique(['name'])
export class PersonEntry {
@Index()
@PrimaryGeneratedColumn({unsigned: true})
id: number;
@Column()
name: string;
@OneToMany(type => FaceRegionEntry, faceRegion => faceRegion.person)
public faces: FaceRegionEntry[];
}