import { User } from 'src/users/entities/user.entity'; import { Column, Entity, JoinTable, ManyToMany, ManyToOne, OneToMany, PrimaryGeneratedColumn, Unique, } from 'typeorm'; import { Word } from './word.entity'; @Entity() export class Topic { @PrimaryGeneratedColumn() id: number; name: string; @ManyToMany((type) => Word, (word) => word.topics) words: Promise; }