Utoljára aktív 1729145460

TypeORM-readme-28.ts Eredeti
1import {
2 Entity,
3 Column,
4 PrimaryGeneratedColumn,
5 OneToOne,
6 JoinColumn,
7} from "typeorm"
8import { Photo } from "./Photo"
9
10@Entity()
11export class PhotoMetadata {
12 @PrimaryGeneratedColumn()
13 id: number
14
15 @Column("int")
16 height: number
17
18 @Column("int")
19 width: number
20
21 @Column()
22 orientation: string
23
24 @Column()
25 compressed: boolean
26
27 @Column()
28 comment: string
29
30 @OneToOne(() => Photo)
31 @JoinColumn()
32 photo: Photo
33}