-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTeam.ts
More file actions
31 lines (25 loc) · 974 Bytes
/
Team.ts
File metadata and controls
31 lines (25 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { AutoIncrement, BackReference, entity, PrimaryKey, Reference } from "@deepkit/type";
import { IDataObject } from "../types/data";
import { League } from "./League";
import { Match } from "./Match";
import { Player } from "./Player";
import { LeagueTeam } from "./joinerObjects/LeagueTeam";
@(entity.name("team").collection("teams"))
export class Team implements IDataObject {
public id: number & PrimaryKey & AutoIncrement = 0;
public created: Date = new Date();
public modified?: Date;
public name?: string;
leagues?: League[] & BackReference<{ via: LeagueTeam }>;
public matches?: Match[] & BackReference;
public lead?: Player & Reference;
public second?: Player & Reference;
public vice?: Player & Reference;
public skip?: Player & Reference;
public alt1?: Player & Reference;
public alt2?: Player & Reference;
public coach?: Player & Reference;
public doubles1?: Player & Reference;
public doubles2?: Player & Reference;
constructor() {}
}