import { Entity, ManyToMany } from 'typeorm'; import { MultiNamed } from './bases/multi-named'; import { Book } from './book'; @Entity() export class Author extends MultiNamed { @ManyToMany(() => Book, { nullable: false, onDelete: 'CASCADE', onUpdate: 'CASCADE', }) public books: Promise; }