diff --git a/src/authors/author.entity.ts b/src/authors/author.entity.ts new file mode 100644 index 000000000..47cd3b812 --- /dev/null +++ b/src/authors/author.entity.ts @@ -0,0 +1,11 @@ +import { Entity, PrimaryGeneratedColumn } from 'typeorm'; +import { Note } from '../notes/note.entity'; + +@Entity() +export class Author { + //TODO: Still missing many properties + @PrimaryGeneratedColumn() + id: number; + + note: Note; +} diff --git a/src/authors/authors.module.ts b/src/authors/authors.module.ts new file mode 100644 index 000000000..065ed705f --- /dev/null +++ b/src/authors/authors.module.ts @@ -0,0 +1,8 @@ +import { Module } from '@nestjs/common'; +import { TypeOrmModule } from '@nestjs/typeorm'; +import { Author } from './author.entity'; + +@Module({ + imports: [TypeOrmModule.forFeature([Author])], +}) +export class AuthorsModule {}