mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-21 17:26:29 -05:00
Add AuthorsModule
This contains the module and a model which still needs many properties. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
9d4e3a54d7
commit
80e018692b
2 changed files with 19 additions and 0 deletions
11
src/authors/author.entity.ts
Normal file
11
src/authors/author.entity.ts
Normal file
|
@ -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;
|
||||
}
|
8
src/authors/authors.module.ts
Normal file
8
src/authors/authors.module.ts
Normal file
|
@ -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 {}
|
Loading…
Reference in a new issue