import { Contest } from "./Contest"; import { ContestEntry } from "./ContestEntry"; import { Entity, PrimaryColumn, ManyToOne, Column } from "typeorm"; @Entity() export class ContestVote { @PrimaryColumn() userId: string; @PrimaryColumn() contestId: number; // @ManyToOne(type => Contest, contest => contest.votes, { primary: true }) @ManyToOne("Contest", "votes", { primary: true }) contest: Contest; // @ManyToOne(type => ContestEntry, entry => entry.votes) @ManyToOne("ContestEntry", "votes") contestEntry: ContestEntry; }