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