@lyxa.ai/core 1.4.135 → 1.4.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/libraries/mongo/models/tournament-participant.model.d.ts +4 -3
- package/dist/libraries/mongo/models/tournament-participant.model.js +11 -6
- package/dist/libraries/mongo/models/tournament-participant.model.js.map +1 -1
- package/dist/libraries/mongo/models/tournament.model.d.ts +5 -0
- package/dist/libraries/mongo/models/tournament.model.js +21 -0
- package/dist/libraries/mongo/models/tournament.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -2,9 +2,10 @@ import { Ref } from '@typegoose/typegoose';
|
|
|
2
2
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
3
|
import { Types } from 'mongoose';
|
|
4
4
|
import { User } from './user.model';
|
|
5
|
-
import {
|
|
5
|
+
import { MatchScore, Tournament } from './tournament.model';
|
|
6
6
|
import { Coupon } from './coupon.model';
|
|
7
7
|
export declare class TournamentPredictionEntry {
|
|
8
|
+
_id: Types.ObjectId;
|
|
8
9
|
matchId: Types.ObjectId;
|
|
9
10
|
score: MatchScore;
|
|
10
11
|
predictionTime: Date;
|
|
@@ -14,6 +15,6 @@ export declare class TournamentPredictionEntry {
|
|
|
14
15
|
export declare class TournamentParticipant extends TimeStamps {
|
|
15
16
|
userId: Ref<User>;
|
|
16
17
|
tournamentId: Ref<Tournament>;
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
teamId: Types.ObjectId;
|
|
19
|
+
predictions: TournamentPredictionEntry[];
|
|
19
20
|
}
|
|
@@ -17,6 +17,7 @@ const user_model_1 = require("./user.model");
|
|
|
17
17
|
const tournament_model_1 = require("./tournament.model");
|
|
18
18
|
const coupon_model_1 = require("./coupon.model");
|
|
19
19
|
class TournamentPredictionEntry {
|
|
20
|
+
_id;
|
|
20
21
|
matchId;
|
|
21
22
|
score;
|
|
22
23
|
predictionTime;
|
|
@@ -24,6 +25,10 @@ class TournamentPredictionEntry {
|
|
|
24
25
|
coupon;
|
|
25
26
|
}
|
|
26
27
|
exports.TournamentPredictionEntry = TournamentPredictionEntry;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typegoose_1.prop)({ type: mongoose_1.Types.ObjectId, default: () => new mongoose_1.Types.ObjectId() }),
|
|
30
|
+
__metadata("design:type", mongoose_1.Types.ObjectId)
|
|
31
|
+
], TournamentPredictionEntry.prototype, "_id", void 0);
|
|
27
32
|
__decorate([
|
|
28
33
|
(0, typegoose_1.prop)({ required: true, type: mongoose_1.Types.ObjectId }),
|
|
29
34
|
__metadata("design:type", mongoose_1.Types.ObjectId)
|
|
@@ -47,8 +52,8 @@ __decorate([
|
|
|
47
52
|
let TournamentParticipant = class TournamentParticipant extends defaultClasses_1.TimeStamps {
|
|
48
53
|
userId;
|
|
49
54
|
tournamentId;
|
|
50
|
-
|
|
51
|
-
|
|
55
|
+
teamId;
|
|
56
|
+
predictions;
|
|
52
57
|
};
|
|
53
58
|
exports.TournamentParticipant = TournamentParticipant;
|
|
54
59
|
__decorate([
|
|
@@ -60,13 +65,13 @@ __decorate([
|
|
|
60
65
|
__metadata("design:type", Object)
|
|
61
66
|
], TournamentParticipant.prototype, "tournamentId", void 0);
|
|
62
67
|
__decorate([
|
|
63
|
-
(0, typegoose_1.prop)({ required: true, type:
|
|
64
|
-
__metadata("design:type",
|
|
65
|
-
], TournamentParticipant.prototype, "
|
|
68
|
+
(0, typegoose_1.prop)({ required: true, type: mongoose_1.Types.ObjectId }),
|
|
69
|
+
__metadata("design:type", mongoose_1.Types.ObjectId)
|
|
70
|
+
], TournamentParticipant.prototype, "teamId", void 0);
|
|
66
71
|
__decorate([
|
|
67
72
|
(0, typegoose_1.prop)({ type: () => [TournamentPredictionEntry], default: [] }),
|
|
68
73
|
__metadata("design:type", Array)
|
|
69
|
-
], TournamentParticipant.prototype, "
|
|
74
|
+
], TournamentParticipant.prototype, "predictions", void 0);
|
|
70
75
|
exports.TournamentParticipant = TournamentParticipant = __decorate([
|
|
71
76
|
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'tournamentParticipants', timestamps: true } })
|
|
72
77
|
], TournamentParticipant);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,uCAAiC;AACjC,6CAAoC;AACpC,yDAA4D;AAC5D,iDAAwC;AAExC,MAAa,yBAAyB;IAE9B,OAAO,CAAkB;IAGzB,KAAK,CAAc;IAGnB,cAAc,CAAQ;IAGtB,SAAS,CAAkB;IAG3B,MAAM,CAAe;CAC5B;
|
|
1
|
+
{"version":3,"file":"tournament-participant.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament-participant.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,uCAAiC;AACjC,6CAAoC;AACpC,yDAA4D;AAC5D,iDAAwC;AAExC,MAAa,yBAAyB;IAE9B,GAAG,CAAkB;IAGrB,OAAO,CAAkB;IAGzB,KAAK,CAAc;IAGnB,cAAc,CAAQ;IAGtB,SAAS,CAAkB;IAG3B,MAAM,CAAe;CAC5B;AAlBD,8DAkBC;AAhBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,gBAAK,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,gBAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;8BACvD,gBAAK,CAAC,QAAQ;sDAAC;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,gBAAK,CAAC,QAAQ,EAAE,CAAC;8BAC9B,gBAAK,CAAC,QAAQ;0DAAC;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,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B,CAYjC","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Types } from 'mongoose';\nimport { User } from './user.model';\nimport { MatchScore, Tournament } from './tournament.model';\nimport { Coupon } from './coupon.model';\n\nexport class TournamentPredictionEntry {\n\t@prop({ type: Types.ObjectId, default: () => new Types.ObjectId() })\n\tpublic _id!: Types.ObjectId;\n\n\t@prop({ required: true, type: Types.ObjectId })\n\tpublic matchId!: Types.ObjectId;\n\n\t@prop({ required: true, type: () => MatchScore, _id: false })\n\tpublic score!: MatchScore;\n\n\t@prop({ required: true, type: Date })\n\tpublic predictionTime!: Date;\n\n\t@prop({ type: Boolean, default: null })\n\tpublic succeeded!: boolean | null;\n\n\t@prop({ ref: () => Coupon })\n\tpublic coupon?: Ref<Coupon>;\n}\n\n@modelOptions({ schemaOptions: { collection: 'tournamentParticipants', timestamps: true } })\nexport class TournamentParticipant extends TimeStamps {\n\t@prop({ required: true, ref: () => User })\n\tpublic userId!: Ref<User>;\n\n\t@prop({ required: true, ref: () => Tournament })\n\tpublic tournamentId!: Ref<Tournament>;\n\n\t@prop({ required: true, type: Types.ObjectId })\n\tpublic teamId!: Types.ObjectId;\n\n\t@prop({ type: () => [TournamentPredictionEntry], default: [] })\n\tpublic predictions!: TournamentPredictionEntry[];\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
2
2
|
import { Types } from 'mongoose';
|
|
3
|
+
import { Status } from '../../../utilities/enum';
|
|
3
4
|
export declare class MatchScore {
|
|
4
5
|
team1: number | null;
|
|
5
6
|
team2: number | null;
|
|
@@ -20,11 +21,15 @@ export declare class TournamentMatch {
|
|
|
20
21
|
team1: TournamentMatchTeam;
|
|
21
22
|
team2: TournamentMatchTeam;
|
|
22
23
|
score: MatchScore;
|
|
24
|
+
winnerId: Types.ObjectId | null;
|
|
23
25
|
startingDate: Date;
|
|
24
26
|
endDate?: Date;
|
|
25
27
|
}
|
|
26
28
|
export declare class Tournament extends TimeStamps {
|
|
27
29
|
tag: string;
|
|
30
|
+
startDate: Date;
|
|
31
|
+
endDate: Date;
|
|
32
|
+
status: Status;
|
|
28
33
|
teams: TournamentTeam[];
|
|
29
34
|
matches: TournamentMatch[];
|
|
30
35
|
}
|
|
@@ -13,6 +13,7 @@ exports.Tournament = exports.TournamentMatch = exports.TournamentMatchTeam = exp
|
|
|
13
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
15
|
const mongoose_1 = require("mongoose");
|
|
16
|
+
const enum_1 = require("../../../utilities/enum");
|
|
16
17
|
class MatchScore {
|
|
17
18
|
team1;
|
|
18
19
|
team2;
|
|
@@ -64,6 +65,7 @@ class TournamentMatch {
|
|
|
64
65
|
team1;
|
|
65
66
|
team2;
|
|
66
67
|
score;
|
|
68
|
+
winnerId;
|
|
67
69
|
startingDate;
|
|
68
70
|
endDate;
|
|
69
71
|
}
|
|
@@ -92,6 +94,10 @@ __decorate([
|
|
|
92
94
|
(0, typegoose_1.prop)({ type: () => MatchScore, _id: false, default: () => ({}) }),
|
|
93
95
|
__metadata("design:type", MatchScore)
|
|
94
96
|
], TournamentMatch.prototype, "score", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typegoose_1.prop)({ type: mongoose_1.Types.ObjectId, default: null }),
|
|
99
|
+
__metadata("design:type", Object)
|
|
100
|
+
], TournamentMatch.prototype, "winnerId", void 0);
|
|
95
101
|
__decorate([
|
|
96
102
|
(0, typegoose_1.prop)({ required: true, type: Date }),
|
|
97
103
|
__metadata("design:type", Date)
|
|
@@ -102,6 +108,9 @@ __decorate([
|
|
|
102
108
|
], TournamentMatch.prototype, "endDate", void 0);
|
|
103
109
|
let Tournament = class Tournament extends defaultClasses_1.TimeStamps {
|
|
104
110
|
tag;
|
|
111
|
+
startDate;
|
|
112
|
+
endDate;
|
|
113
|
+
status;
|
|
105
114
|
teams;
|
|
106
115
|
matches;
|
|
107
116
|
};
|
|
@@ -110,6 +119,18 @@ __decorate([
|
|
|
110
119
|
(0, typegoose_1.prop)({ required: true, type: String, trim: true }),
|
|
111
120
|
__metadata("design:type", String)
|
|
112
121
|
], Tournament.prototype, "tag", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
(0, typegoose_1.prop)({ required: true, type: Date }),
|
|
124
|
+
__metadata("design:type", Date)
|
|
125
|
+
], Tournament.prototype, "startDate", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, typegoose_1.prop)({ required: true, type: Date }),
|
|
128
|
+
__metadata("design:type", Date)
|
|
129
|
+
], Tournament.prototype, "endDate", void 0);
|
|
130
|
+
__decorate([
|
|
131
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
|
|
132
|
+
__metadata("design:type", String)
|
|
133
|
+
], Tournament.prototype, "status", void 0);
|
|
113
134
|
__decorate([
|
|
114
135
|
(0, typegoose_1.prop)({ type: () => [TournamentTeam], default: [] }),
|
|
115
136
|
__metadata("design:type", Array)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tournament.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,uCAAiC;
|
|
1
|
+
{"version":3,"file":"tournament.model.js","sourceRoot":"/","sources":["libraries/mongo/models/tournament.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA0D;AAC1D,4EAAqE;AACrE,uCAAiC;AACjC,kDAAiD;AAEjD,MAAa,UAAU;IAEf,KAAK,CAAiB;IAGtB,KAAK,CAAiB;CAC7B;AAND,gCAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;yCAC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AGjB,OAAO,CAAQ;IAGf,MAAM,CAAU;IAGhB,KAAK,CAAoB;IAGzB,OAAO,CAAqB;CACnC,CAAA;AAlBY,gCAAU;AAEf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;uCAC/B;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BAClB,IAAI;6CAAC;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACpB,IAAI;2CAAC;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,aAAM,EAAE,OAAO,EAAE,aAAM,CAAC,MAAM,EAAE,CAAC;;0CACtC;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;yCACpB;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;2CAClB;qBAjBvB,UAAU;IADtB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC;GACpE,UAAU,CAkBtB","sourcesContent":["import { modelOptions, prop } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Types } from 'mongoose';\nimport { Status } from '../../../utilities/enum';\n\nexport class MatchScore {\n\t@prop({ type: Number, default: null })\n\tpublic team1!: number | null;\n\n\t@prop({ type: Number, default: null })\n\tpublic team2!: number | null;\n}\n\nexport class TournamentTeam {\n\t@prop({ type: Types.ObjectId, default: () => new Types.ObjectId() })\n\tpublic _id!: Types.ObjectId;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic name!: string;\n\n\t@prop({ type: String })\n\tpublic picture?: string;\n}\n\nexport class TournamentMatchTeam {\n\t@prop({ required: true, type: Types.ObjectId })\n\tpublic teamId!: Types.ObjectId;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic name!: string;\n}\n\nexport class TournamentMatch {\n\t@prop({ type: Types.ObjectId, default: () => new Types.ObjectId() })\n\tpublic _id!: Types.ObjectId;\n\n\t@prop({ type: String, trim: true })\n\tpublic additionalTag?: string;\n\n\t@prop({ required: true, type: String, trim: true })\n\tpublic stage!: string;\n\n\t@prop({ required: true, type: () => TournamentMatchTeam, _id: false })\n\tpublic team1!: TournamentMatchTeam;\n\n\t@prop({ required: true, type: () => TournamentMatchTeam, _id: false })\n\tpublic team2!: TournamentMatchTeam;\n\n\t@prop({ type: () => MatchScore, _id: false, default: () => ({}) })\n\tpublic score!: MatchScore;\n\n\t@prop({ type: Types.ObjectId, default: null })\n\tpublic winnerId!: Types.ObjectId | null;\n\n\t@prop({ required: true, type: Date })\n\tpublic startingDate!: Date;\n\n\t@prop({ type: Date })\n\tpublic endDate?: Date;\n}\n\n@modelOptions({ schemaOptions: { collection: 'tournaments', timestamps: true } })\nexport class Tournament extends TimeStamps {\n\t@prop({ required: true, type: String, trim: true })\n\tpublic tag!: string;\n\n\t@prop({ required: true, type: Date })\n\tpublic startDate!: Date;\n\n\t@prop({ required: true, type: Date })\n\tpublic endDate!: Date;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status!: Status;\n\n\t@prop({ type: () => [TournamentTeam], default: [] })\n\tpublic teams!: TournamentTeam[];\n\n\t@prop({ type: () => [TournamentMatch], default: [] })\n\tpublic matches!: TournamentMatch[];\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED