Template
feat : working on word submission
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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: Word[];
|
||||
}
|
||||
Reference in New Issue
Block a user