-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to newest deepkit version and fixed various issues
- Loading branch information
Showing
44 changed files
with
1,971 additions
and
3,932 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
import { AppModuleConfig } from "@deepkit/app"; | ||
import { t } from "@deepkit/type"; | ||
|
||
export const AppConfig = new AppModuleConfig({ | ||
dbPath: t.string.default("./database.sqlite"), | ||
}); | ||
export class AppConfig { | ||
dbPath: string = './database.sqlite'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, entity, PrimaryKey } from "@deepkit/type"; | ||
import { IDataObject } from "../types/data"; | ||
|
||
@(entity.name("address").collectionName("addresses")) | ||
@(entity.name("address").collection("addresses")) | ||
export class Address implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number & PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@t public line2?: string; | ||
public line2?: string; | ||
|
||
constructor(@t public line1: string, @t public city: string, @t public state: string, @t public zip: string) {} | ||
constructor(public line1: string, public city: string, public state: string, public zip: string) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, BackReference, entity, PrimaryKey } from "@deepkit/type"; | ||
import { IDataObject } from "../types/data"; | ||
import { Player } from "./Player"; | ||
import { PlayerClub } from "./joinerObjects/PlayerClub"; | ||
|
||
@(entity.name("club").collectionName("clubs")) | ||
@(entity.name("club").collection("clubs")) | ||
export class Club implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number& PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@(t.array(() => Player).backReference({ via: () => PlayerClub })) | ||
players?: Player[]; | ||
players?: Player[] & BackReference<{via: PlayerClub}>; | ||
|
||
constructor(@t public name: string) {} | ||
constructor(public name: string) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, entity, PrimaryKey, Reference } from "@deepkit/type"; | ||
import { IDataObject } from "../types/data"; | ||
import { League } from "./League"; | ||
|
||
@(entity.name("division").collectionName("divisions")) | ||
@(entity.name("division").collection("divisions")) | ||
export class Division implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number& PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@(t.type(() => League).reference()) public league?: League; | ||
public league?: League & Reference; | ||
|
||
constructor(@t public name: string) {} | ||
constructor(public name: string) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, BackReference, entity, PrimaryKey, Reference } from "@deepkit/type"; | ||
import { IDataObject } from "../types/data"; | ||
import { League } from "./League"; | ||
import { Match } from "./Match"; | ||
|
||
@(entity.name("draw").collectionName("draws")) | ||
@(entity.name("draw").collection("draws")) | ||
export class Draw implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number& PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@(t.type(() => League).reference()) public league?: League; | ||
public league?: League & Reference; | ||
|
||
@(t.array(() => Match).backReference()) public matches?: Match[]; | ||
public matches?: Match[] & BackReference; | ||
|
||
// @(t.type(() => Event).reference()) public event?: Event; | ||
// public event?: Event & Reference; | ||
|
||
constructor(@t public date: Date) {} | ||
constructor(public date: Date) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, BackReference, entity, PrimaryKey } from "@deepkit/type"; | ||
import { IDataObject } from "../types/data"; | ||
import { User } from "./User"; | ||
import { SpareCandidate } from "./joinerObjects/SpareCandidate"; | ||
|
||
@(entity.name("drawTime").collectionName("drawTimes")) | ||
@(entity.name("drawTime").collection("drawTimes")) | ||
export class DrawTime implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number & PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@(t.array(() => User).backReference({ via: () => SpareCandidate })) | ||
availableSpares?: User[]; | ||
availableSpares?: User[] & BackReference<{via: SpareCandidate}>; | ||
|
||
constructor(@t public time: string, @t public dayOfWeek: number) {} | ||
constructor(public time: string, public dayOfWeek: number) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, BackReference, entity, PrimaryKey } from "@deepkit/type"; | ||
import { User } from "./User"; | ||
import { IDataObject } from "../types/data"; | ||
|
||
@(entity.name("emergencyContact").collectionName("emergencyContacts")) | ||
@(entity.name("emergencyContact").collection("emergencyContacts")) | ||
export class EmergencyContact implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number & PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@t.backReference() public user?: User; | ||
public user?: User & BackReference; | ||
|
||
constructor(@t public name: string, @t public phone: string, @t public relationship: string) {} | ||
constructor(public name: string, public phone: string, public relationship: string) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
import { entity, t } from "@deepkit/type"; | ||
import { AutoIncrement, entity, PrimaryKey, Reference } from "@deepkit/type"; | ||
import { IDataObject } from "../types/data"; | ||
import { User } from "./User"; | ||
|
||
@(entity.name("invoice").collectionName("invoices")) | ||
@(entity.name("invoice").collection("invoices")) | ||
export class Invoice implements IDataObject { | ||
@t.primary.autoIncrement public id: number = 0; | ||
@t public created: Date = new Date(); | ||
@t public modified?: Date; | ||
public id: number & PrimaryKey & AutoIncrement = 0; | ||
public created: Date = new Date(); | ||
public modified?: Date; | ||
|
||
@t public payPalInvoiceId?: string; | ||
public payPalInvoiceId?: string; | ||
|
||
@(t.type(() => User).reference()) public user?: User; | ||
public user?: User & Reference; | ||
|
||
constructor( | ||
@t public invoiceNum: number, | ||
@t public dueDate: Date, | ||
@t public invoiceAmount: number, | ||
@t public amountPaid: number | ||
public invoiceNum: number, | ||
public dueDate: Date, | ||
public invoiceAmount: number, | ||
public amountPaid: number | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.