Compare commits

..

No commits in common. "6464033a58fe7967435cf94d2beea37fb796ecc6" and "1cf35f016b0aeb0f1224648b301044b2ea76dc60" have entirely different histories.

17 changed files with 154 additions and 154 deletions

View File

@ -76,12 +76,12 @@ export class Address {
/**
* Used to link the address to participants.
*/
@OneToMany(() => Participant, participant => participant.address, { nullable: true })
@OneToMany(() => Participant, participant => participant.address)
participants: Participant[];
/**
* Used to link the address to runner groups.
*/
@OneToMany(() => RunnerOrganisation, group => group.address, { nullable: true })
@OneToMany(() => RunnerOrganisation, group => group.address)
groups: RunnerOrganisation[];
}

View File

@ -13,7 +13,7 @@ export class DistanceDonation extends Donation {
* The runner associated.
*/
@IsNotEmpty()
@ManyToOne(() => Runner, runner => runner.distanceDonations, { nullable: true })
@ManyToOne(() => Runner, runner => runner.distanceDonations)
runner: Runner;
/**

View File

@ -24,7 +24,7 @@ export abstract class Donation {
* The donations's donor.
*/
@IsNotEmpty()
@ManyToOne(() => Participant, donor => donor.donations, { nullable: true })
@ManyToOne(() => Participant, donor => donor.donations)
donor: Participant;
/**

View File

@ -55,7 +55,7 @@ export class GroupContact {
* Optional
*/
@IsOptional()
@ManyToOne(() => Address, address => address.participants, { nullable: true })
@ManyToOne(() => Address, address => address.participants)
address?: Address;
/**
@ -79,12 +79,12 @@ export class GroupContact {
/**
* Used to link the contact as the donor of a donation.
*/
@OneToMany(() => Donation, donation => donation.donor, { nullable: true })
@OneToMany(() => Donation, donation => donation.donor)
donations: Donation[];
/**
* Used to link runners to donations.
*/
@OneToMany(() => RunnerGroup, group => group.contact, { nullable: true })
@OneToMany(() => RunnerGroup, group => group.contact)
groups: RunnerGroup[];
}

View File

@ -53,7 +53,7 @@ export abstract class Participant {
* The participant's address.
* Optional
*/
@ManyToOne(() => Address, address => address.participants, { nullable: true })
@ManyToOne(() => Address, address => address.participants)
address?: Address;
/**
@ -77,6 +77,6 @@ export abstract class Participant {
/**
* Used to link the participant as the donor of a donation.
*/
@OneToMany(() => Donation, donation => donation.donor, { nullable: true })
@OneToMany(() => Donation, donation => donation.donor)
donations: Donation[];
}

View File

@ -23,13 +23,13 @@ export abstract class Permission {
/**
* users
*/
@OneToMany(() => User, user => user.permissions, { nullable: true })
@OneToMany(() => User, user => user.permissions)
users: User[]
/**
* groups
*/
@OneToMany(() => UserGroup, group => group.permissions, { nullable: true })
@OneToMany(() => UserGroup, group => group.permissions)
groups: UserGroup[]
/**

View File

@ -15,25 +15,25 @@ export class Runner extends Participant {
* The runner's associated group.
*/
@IsNotEmpty()
@ManyToOne(() => RunnerGroup, group => group.runners, { nullable: true })
@ManyToOne(() => RunnerGroup, group => group.runners)
group: RunnerGroup;
/**
* Used to link runners to donations.
*/
@OneToMany(() => DistanceDonation, distanceDonation => distanceDonation.runner, { nullable: true })
@OneToMany(() => DistanceDonation, distanceDonation => distanceDonation.runner)
distanceDonations: DistanceDonation[];
/**
* Used to link runners to cards.
*/
@OneToMany(() => RunnerCard, card => card.runner, { nullable: true })
@OneToMany(() => RunnerCard, card => card.runner)
cards: RunnerCard[];
/**
* Used to link runners to a scans
*/
@OneToMany(() => Scan, scan => scan.runner, { nullable: true })
@OneToMany(() => Scan, scan => scan.runner)
scans: Scan[];
@IsInt()

View File

@ -26,7 +26,7 @@ export class RunnerCard {
* The runner that is currently associated with this card.
*/
@IsOptional()
@ManyToOne(() => Runner, runner => runner.cards, { nullable: true })
@ManyToOne(() => Runner, runner => runner.cards)
runner: Runner;
/**
@ -51,6 +51,6 @@ export class RunnerCard {
/**
* Used to link cards to a track scans.
*/
@OneToMany(() => TrackScan, scan => scan.track, { nullable: true })
@OneToMany(() => TrackScan, scan => scan.track)
scans: TrackScan[];
}

View File

@ -35,12 +35,12 @@ export abstract class RunnerGroup {
* Optional
*/
@IsOptional()
@ManyToOne(() => GroupContact, contact => contact.groups, { nullable: true })
@ManyToOne(() => GroupContact, contact => contact.groups)
contact?: GroupContact;
/**
* Used to link runners to a runner group.
*/
@OneToMany(() => Runner, runner => runner.group, { nullable: true })
@OneToMany(() => Runner, runner => runner.group)
runners: Runner[];
}

View File

@ -15,12 +15,12 @@ export class RunnerOrganisation extends RunnerGroup {
* Optional
*/
@IsOptional()
@ManyToOne(() => Address, address => address.groups, { nullable: true })
@ManyToOne(() => Address, address => address.groups)
address?: Address;
/**
* Used to link teams to runner groups.
*/
@OneToMany(() => RunnerTeam, team => team.parentGroup, { nullable: true })
@OneToMany(() => RunnerTeam, team => team.parentGroup)
teams: RunnerTeam[];
}

View File

@ -14,6 +14,6 @@ export class RunnerTeam extends RunnerGroup {
* Optional
*/
@IsNotEmpty()
@ManyToOne(() => RunnerOrganisation, org => org.teams, { nullable: true })
@ManyToOne(() => RunnerOrganisation, org => org.teams)
parentGroup?: RunnerOrganisation;
}

View File

@ -25,7 +25,7 @@ export abstract class Scan {
* The associated runner.
*/
@IsNotEmpty()
@ManyToOne(() => Runner, runner => runner.scans, { nullable: true })
@ManyToOne(() => Runner, runner => runner.scans)
runner: Runner;
/**

View File

@ -34,7 +34,7 @@ export class ScanStation {
* The track this station is associated with.
*/
@IsNotEmpty()
@ManyToOne(() => Track, track => track.stations, { nullable: true })
@ManyToOne(() => Track, track => track.stations)
track: Track;
/**
@ -56,6 +56,6 @@ export class ScanStation {
/**
* Used to link track scans to a scan station.
*/
@OneToMany(() => TrackScan, scan => scan.track, { nullable: true })
@OneToMany(() => TrackScan, scan => scan.track)
scans: TrackScan[];
}

View File

@ -41,12 +41,12 @@ export class Track {
/**
* Used to link scan stations to track.
*/
@OneToMany(() => ScanStation, station => station.track, { nullable: true })
@OneToMany(() => ScanStation, station => station.track)
stations: ScanStation[];
/**
* Used to link track scans to a track.
*/
@OneToMany(() => TrackScan, scan => scan.track, { nullable: true })
@OneToMany(() => TrackScan, scan => scan.track)
scans: TrackScan[];
}

View File

@ -22,21 +22,21 @@ export class TrackScan extends Scan {
* The associated track.
*/
@IsNotEmpty()
@ManyToOne(() => Track, track => track.scans, { nullable: true })
@ManyToOne(() => Track, track => track.scans)
track: Track;
/**
* The associated card.
*/
@IsNotEmpty()
@ManyToOne(() => RunnerCard, card => card.scans, { nullable: true })
@ManyToOne(() => RunnerCard, card => card.scans)
card: RunnerCard;
/**
* The scanning station.
*/
@IsNotEmpty()
@ManyToOne(() => ScanStation, station => station.scans, { nullable: true })
@ManyToOne(() => ScanStation, station => station.scans)
station: ScanStation;
/**

View File

@ -68,7 +68,7 @@ export class User {
/**
* permissions
*/
@ManyToOne(() => Permission, permission => permission.users, { nullable: true })
@ManyToOne(() => Permission, permission => permission.users)
permissions: Permission[];
/**

View File

@ -23,7 +23,7 @@ export abstract class UserGroup {
/**
* permissions
*/
@ManyToOne(() => Permission, permission => permission.groups, { nullable: true })
@ManyToOne(() => Permission, permission => permission.groups)
permissions: Permission[];
/**