History: Add HistoryEntry

With this the backend now can hold a history entry.
Also included in this commit are some minor changes to tests and services so they can still work.

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-02-03 21:15:39 +01:00
parent 6bce4c241b
commit b76fa91a3c
7 changed files with 72 additions and 2 deletions

View file

@ -14,6 +14,7 @@ import { Column, OneToMany } from 'typeorm';
import { Note } from '../notes/note.entity';
import { AuthToken } from '../auth/auth-token.entity';
import { Identity } from './identity.entity';
import { HistoryEntry } from '../history/history-entry.entity';
@Entity()
export class User {
@ -51,8 +52,8 @@ export class User {
@OneToMany((_) => Identity, (identity) => identity.user)
identities: Identity[];
// eslint-disable-next-line @typescript-eslint/no-empty-function
private constructor() {}
@OneToMany((_) => HistoryEntry, (historyEntry) => historyEntry.user)
historyEntries: HistoryEntry[];
public static create(
userName: string,