@@ -1,7 +1,6 @@
|
||||
import {
|
||||
IsInt,
|
||||
IsNotEmpty,
|
||||
IsOptional
|
||||
IsNotEmpty
|
||||
} from "class-validator";
|
||||
import { Entity, ManyToOne, PrimaryGeneratedColumn, TableInheritance } from "typeorm";
|
||||
import { Participant } from "./Participant";
|
||||
@@ -16,7 +15,6 @@ export abstract class Donation {
|
||||
* Autogenerated unique id (primary key).
|
||||
*/
|
||||
@PrimaryGeneratedColumn()
|
||||
@IsOptional()
|
||||
@IsInt()
|
||||
id: number;
|
||||
|
||||
@@ -24,7 +22,7 @@ export abstract class Donation {
|
||||
* The donations's donor.
|
||||
*/
|
||||
@IsNotEmpty()
|
||||
@ManyToOne(() => Participant, donor => donor.donations, { nullable: true })
|
||||
@ManyToOne(() => Participant, donor => donor.donations)
|
||||
donor: Participant;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user