Zuletzt aktiv 1729146247

TypeORM-readme-40.ts Orginalformat
1import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from "typeorm"
2import { PhotoMetadata } from "./PhotoMetadata"
3import { Author } from "./Author"
4
5@Entity()
6export class Photo {
7 /* ... other columns */
8
9 @ManyToOne(() => Author, (author) => author.photos)
10 author: Author
11}