|
@@ -1,4 +1,4 @@
|
|
-import {Entity, PrimaryColumn, Column, ManyToOne, JoinColumn} from "typeorm";
|
|
|
|
|
|
+import {Entity, PrimaryColumn, ManyToOne, OneToMany} from "typeorm";
|
|
import {Contest} from "./Contest";
|
|
import {Contest} from "./Contest";
|
|
import { ContestVote } from "./ContestVote";
|
|
import { ContestVote } from "./ContestVote";
|
|
|
|
|
|
@@ -11,6 +11,6 @@ export class ContestEntry {
|
|
@ManyToOne(type => Contest, contest => contest.entries)
|
|
@ManyToOne(type => Contest, contest => contest.entries)
|
|
contest: Contest;
|
|
contest: Contest;
|
|
|
|
|
|
- @ManyToOne(type => ContestVote, vote => vote.contest)
|
|
|
|
|
|
+ @OneToMany(type => ContestVote, vote => vote.contest)
|
|
votes: ContestVote[];
|
|
votes: ContestVote[];
|
|
}
|
|
}
|