From 80e018692b028aba81b69f725183c571eaa0bffd Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 25 Jul 2020 20:11:08 +0200 Subject: [PATCH] Add AuthorsModule This contains the module and a model which still needs many properties. Signed-off-by: David Mehren --- src/authors/author.entity.ts | 11 +++++++++++ src/authors/authors.module.ts | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/authors/author.entity.ts create mode 100644 src/authors/authors.module.ts 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 {}