knox ревизій цього gist . До ревизії
1 file changed, 11 insertions
TypeORM-readme-40.ts(файл створено)
@@ -0,0 +1,11 @@ | |||
1 | + | import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from "typeorm" | |
2 | + | import { PhotoMetadata } from "./PhotoMetadata" | |
3 | + | import { Author } from "./Author" | |
4 | + | ||
5 | + | @Entity() | |
6 | + | export class Photo { | |
7 | + | /* ... other columns */ | |
8 | + | ||
9 | + | @ManyToOne(() => Author, (author) => author.photos) | |
10 | + | author: Author | |
11 | + | } |
Новіше
Пізніше