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, OneToMany, PrimaryGeneratedColumn } from "typeorm";
import { config } from '../../config';
import { Address } from "./Address";
import { IAddressUser } from './IAddressUser';
import { RunnerGroup } from "./RunnerGroup";
/**
@@ -17,7 +18,7 @@ import { RunnerGroup } from "./RunnerGroup";
* Mainly it's own class to reduce duplicate code and enable contact's to be associated with multiple groups.
*/
@Entity()
export class GroupContact {
export class GroupContact implements IAddressUser {
/**
* Autogenerated unique id (primary key).
*/
@@ -54,7 +55,7 @@ export class GroupContact {
* This is a address object to prevent any formatting differences.
*/
@IsOptional()
@ManyToOne(() => Address, address => address.participants, { nullable: true })
@ManyToOne(() => Address, address => address.addressUsers, { nullable: true })
address?: Address;
/**