Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
@PrimaryGeneratedColumn() id: number; @Column() title: string; @Column() price: number; @OneToMany((type) => Item, (item) => item.product) items: Item[]; } As we can see, we have defined all the entities by defining required columns in each one and associating them with each other using @ManyToOne