ContestVote.ts 433 B

123456789101112131415161718
  1. import { Contest } from "./Contest";
  2. import { ContestEntry } from "./ContestEntry";
  3. import { Entity, PrimaryColumn, ManyToOne } from "typeorm";
  4. @Entity()
  5. export class ContestVote {
  6. @PrimaryColumn()
  7. userId: string;
  8. // :thonq
  9. @PrimaryColumn()
  10. @ManyToOne(type => Contest, contest => contest.votes)
  11. contest: Contest;
  12. @ManyToOne(type => ContestEntry, entry => entry.votes)
  13. contestEntry: ContestEntry;
  14. }