Implemented a possible bugfix

ref #68
This commit is contained in:
2021-01-02 19:56:04 +01:00
parent 9b5d16ae92
commit 2c47436259
5 changed files with 31 additions and 23 deletions

View File

@@ -10,6 +10,7 @@ import {
import { Column, Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
import { config } from '../../config';
import { Address } from "./Address";
import { IAddressUser } from './IAddressUser';
/**
* Defines the Participant entity.
@@ -17,7 +18,7 @@ import { Address } from "./Address";
*/
@Entity()
@TableInheritance({ column: { name: "type", type: "varchar" } })
export abstract class Participant {
export abstract class Participant implements IAddressUser {
/**
* Autogenerated unique id (primary key).
*/
@@ -53,7 +54,7 @@ export abstract class Participant {
* The participant's address.
* This is a address object to prevent any formatting differences.
*/
@ManyToOne(() => Address, address => address.participants, { nullable: true })
@ManyToOne(() => Address, address => address.addressUsers, { nullable: true })
address?: Address;
/**