Última atividade 1729145460

Revisão 23b66fb92b32c64504c1ca4f8d6da3958829f66c

TypeORM-readme-28.ts Bruto
1import {
2 Entity,
3 Column,
4 PrimaryGeneratedColumn,
5 OneToOne,
6 JoinColumn,
7} from "typeorm"
8import { Photo } from "./Photo"
9
10@Entity()
11export class PhotoMetadata {
12 @PrimaryGeneratedColumn()
13 id: number
14
15 @Column("int")
16 height: number
17
18 @Column("int")
19 width: number
20
21 @Column()
22 orientation: string
23
24 @Column()
25 compressed: boolean
26
27 @Column()
28 comment: string
29
30 @OneToOne(() => Photo)
31 @JoinColumn()
32 photo: Photo
33}