最后活跃于 1729145776

knox 修订了这个 Gist 1729145776. 跳至此修订

1 file changed, 10 insertions

TypeORM-readme-32.ts(file created)

@@ -0,0 +1,10 @@
1 + import { Entity, Column, PrimaryGeneratedColumn, OneToOne } from "typeorm"
2 + import { PhotoMetadata } from "./PhotoMetadata"
3 +
4 + @Entity()
5 + export class Photo {
6 + /* ... other columns */
7 +
8 + @OneToOne(() => PhotoMetadata, (photoMetadata) => photoMetadata.photo)
9 + metadata: PhotoMetadata
10 + }
更新 更早