@@ -1,5 +1,7 @@
|
||||
import { IsInt } from "class-validator";
|
||||
import { ChildEntity, OneToMany } from "typeorm";
|
||||
import { IsInt, IsOptional } from "class-validator";
|
||||
import { ChildEntity, ManyToOne, OneToMany } from "typeorm";
|
||||
import { Address } from './Address';
|
||||
import { IAddressUser } from './IAddressUser';
|
||||
import { Runner } from './Runner';
|
||||
import { RunnerGroup } from "./RunnerGroup";
|
||||
import { RunnerTeam } from "./RunnerTeam";
|
||||
@@ -9,14 +11,14 @@ import { RunnerTeam } from "./RunnerTeam";
|
||||
* This usually is a school, club or company.
|
||||
*/
|
||||
@ChildEntity()
|
||||
export class RunnerOrganisation extends RunnerGroup {
|
||||
export class RunnerOrganisation extends RunnerGroup implements IAddressUser {
|
||||
|
||||
// /**
|
||||
// * The organisations's address.
|
||||
// */
|
||||
// @IsOptional()
|
||||
// @ManyToOne(() => Address, address => address.groups, { nullable: true })
|
||||
// address?: Address;
|
||||
/**
|
||||
* The organisations's address.
|
||||
*/
|
||||
@IsOptional()
|
||||
@ManyToOne(() => Address, address => address.addressUsers, { nullable: true })
|
||||
address?: Address;
|
||||
|
||||
/**
|
||||
* The organisation's teams.
|
||||
|
||||
Reference in New Issue
Block a user