knox 修订了这个 Gist . 跳至此修订
1 file changed, 22 insertions
TypeORM-readme-18.ts(file created)
@@ -0,0 +1,22 @@ | |||
1 | + | import { Entity, Column, PrimaryGeneratedColumn } from "typeorm" | |
2 | + | ||
3 | + | @Entity() | |
4 | + | export class Photo { | |
5 | + | @PrimaryGeneratedColumn() | |
6 | + | id: number | |
7 | + | ||
8 | + | @Column() | |
9 | + | name: string | |
10 | + | ||
11 | + | @Column() | |
12 | + | description: string | |
13 | + | ||
14 | + | @Column() | |
15 | + | filename: string | |
16 | + | ||
17 | + | @Column() | |
18 | + | views: number | |
19 | + | ||
20 | + | @Column() | |
21 | + | isPublished: boolean | |
22 | + | } |
更新
更早