knox gist felülvizsgálása . Revízióhoz ugrás
1 file changed, 33 insertions
TypeORM-readme-28.ts(fájl létrehozva)
@@ -0,0 +1,33 @@ | |||
1 | + | import { | |
2 | + | Entity, | |
3 | + | Column, | |
4 | + | PrimaryGeneratedColumn, | |
5 | + | OneToOne, | |
6 | + | JoinColumn, | |
7 | + | } from "typeorm" | |
8 | + | import { Photo } from "./Photo" | |
9 | + | ||
10 | + | @Entity() | |
11 | + | export 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 | + | } |
Újabb
Régebbi