12345678910111213141516 |
- import {Entity, PrimaryColumn, ManyToOne, OneToMany} 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;
- @OneToMany(type => ContestVote, vote => vote.contest)
- votes: ContestVote[];
- }
|