import {Entity, PrimaryColumn, Column, ManyToOne, JoinColumn} from "typeorm"; import {Contest} from "./Contest"; import { ContestVote } from "./ContestVote"; @Entity() export class ContestEntry { @PrimaryColumn() msgId: string; @ManyToOne(type => Contest, contest => contest.entries) contest: Contest; @ManyToOne(type => ContestVote, vote => vote.contest) votes: ContestVote[]; }