changed imports to new ./modules import style

Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
Philip Molares 2020-04-11 12:26:40 +02:00 committed by David Mehren
parent d278a106e8
commit 22683451bd
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
4 changed files with 5 additions and 11 deletions

View file

@ -1,6 +1,5 @@
import { AutoIncrement, Table, Column, DataType, PrimaryKey, Model, BelongsTo, createIndexDecorator, ForeignKey } from 'sequelize-typescript'
import { Note } from './note';
import { User } from './user';
import { Note, User } from './index';
const NoteUserIndex = createIndexDecorator({unique: true});
@ -18,7 +17,7 @@ export class Author extends Model<Author> {
@NoteUserIndex
@Column(DataType.UUID)
noteId: string;
@BelongsTo(() => Note, { foreignKey: 'noteId', onDelete: 'CASCADE', constraints: false, hooks: true })
note: Note;