Последняя активность 1729146591

Версия ffaf4158f24edcb3702e4d050779a1c9a3c29b16

TypeORM-readme-43.sh Исходник
1import {
2 Entity,
3 PrimaryGeneratedColumn,
4 Column,
5 ManyToMany,
6 JoinTable,
7} from "typeorm"
8
9@Entity()
10export class Album {
11 @PrimaryGeneratedColumn()
12 id: number
13
14 @Column()
15 name: string
16
17 @ManyToMany(() => Photo, (photo) => photo.albums)
18 @JoinTable()
19 photos: Photo[]
20}