最後活躍 1729145857

修訂 f2510fa14e018db7f1e357fbfee02f7d5756eff3

TypeORM-readme-34.ts 原始檔案
1import {
2 Entity,
3 Column,
4 PrimaryGeneratedColumn,
5 OneToOne,
6 Relation,
7} from "typeorm"
8import { PhotoMetadata } from "./PhotoMetadata"
9
10@Entity()
11export class Photo {
12 /* ... other columns */
13
14 @OneToOne(() => PhotoMetadata, (photoMetadata) => photoMetadata.photo)
15 metadata: Relation<PhotoMetadata>
16}