@kipicore/dbcore 1.1.148 → 1.1.149
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.
|
@@ -1175,7 +1175,8 @@ export declare enum COMPETITION_ERROR_MESSAGES {
|
|
|
1175
1175
|
GET_FAIL = "Unable to retrieve competition data!",
|
|
1176
1176
|
UPDATE_FAIL = "Unable to update competition data!",
|
|
1177
1177
|
DELETE_FAIL = "Unable to delete competition data!",
|
|
1178
|
-
NOT_FOUND = "Unable to find competition data!"
|
|
1178
|
+
NOT_FOUND = "Unable to find competition data!",
|
|
1179
|
+
INVALID_DATE_RANGE = "Competition startTime and endTime must be within the campus carnival duration."
|
|
1179
1180
|
}
|
|
1180
1181
|
export declare enum COMPETITION_GROUP_ERROR_MESSAGES {
|
|
1181
1182
|
CREATE_FAIL = "Unable to save competition group data!",
|
|
@@ -1304,6 +1304,7 @@ var COMPETITION_ERROR_MESSAGES;
|
|
|
1304
1304
|
COMPETITION_ERROR_MESSAGES["UPDATE_FAIL"] = "Unable to update competition data!";
|
|
1305
1305
|
COMPETITION_ERROR_MESSAGES["DELETE_FAIL"] = "Unable to delete competition data!";
|
|
1306
1306
|
COMPETITION_ERROR_MESSAGES["NOT_FOUND"] = "Unable to find competition data!";
|
|
1307
|
+
COMPETITION_ERROR_MESSAGES["INVALID_DATE_RANGE"] = "Competition startTime and endTime must be within the campus carnival duration.";
|
|
1307
1308
|
})(COMPETITION_ERROR_MESSAGES || (exports.COMPETITION_ERROR_MESSAGES = COMPETITION_ERROR_MESSAGES = {}));
|
|
1308
1309
|
var COMPETITION_GROUP_ERROR_MESSAGES;
|
|
1309
1310
|
(function (COMPETITION_GROUP_ERROR_MESSAGES) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Document } from 'mongoose';
|
|
2
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
3
|
-
import { CAMPUS_CARNIVAL_STATUS, COMPETITION_TYPE_CATEGORY } from '../constants/app';
|
|
3
|
+
import { CAMPUS_CARNIVAL_STATUS, COMPETITION_TYPE, COMPETITION_TYPE_CATEGORY } from '../constants/app';
|
|
4
4
|
export interface IRoundsInformationAttributes {
|
|
5
5
|
id: string;
|
|
6
6
|
startTime: Date;
|
|
@@ -19,21 +19,21 @@ export interface ICompetitionAttributes extends IDefaultAttributes, Document {
|
|
|
19
19
|
id: string;
|
|
20
20
|
name: string;
|
|
21
21
|
description: string;
|
|
22
|
-
type:
|
|
22
|
+
type: COMPETITION_TYPE;
|
|
23
23
|
subCategory: string;
|
|
24
24
|
rules: string;
|
|
25
25
|
maxGroupSize: number;
|
|
26
26
|
venue: string;
|
|
27
27
|
rounds: IRoundsInformationAttributes[];
|
|
28
|
-
competitionPoster: string[];
|
|
29
28
|
startTime: Date;
|
|
30
29
|
endTime: Date;
|
|
31
30
|
status: CAMPUS_CARNIVAL_STATUS;
|
|
32
|
-
|
|
31
|
+
judges: string[];
|
|
33
32
|
coordinator: string[];
|
|
34
33
|
standards: [IStandardsInformationAttributes];
|
|
35
34
|
academicCalendarId: string;
|
|
36
35
|
instituteId: string;
|
|
37
|
-
|
|
36
|
+
campusCarnivalId: string;
|
|
38
37
|
isNeedApproval: boolean;
|
|
38
|
+
categoryType: COMPETITION_TYPE_CATEGORY;
|
|
39
39
|
}
|
|
@@ -90,6 +90,11 @@ const CompetitionSchema = new mongoose_1.Schema({
|
|
|
90
90
|
required: true,
|
|
91
91
|
},
|
|
92
92
|
type: {
|
|
93
|
+
type: String,
|
|
94
|
+
enum: Object.values(app_1.COMPETITION_TYPE),
|
|
95
|
+
required: true,
|
|
96
|
+
},
|
|
97
|
+
categoryType: {
|
|
93
98
|
type: String,
|
|
94
99
|
enum: Object.values(app_1.COMPETITION_TYPE_CATEGORY),
|
|
95
100
|
required: true,
|
|
@@ -110,10 +115,6 @@ const CompetitionSchema = new mongoose_1.Schema({
|
|
|
110
115
|
type: [RoundsInformationSchema],
|
|
111
116
|
required: true,
|
|
112
117
|
},
|
|
113
|
-
competitionPoster: {
|
|
114
|
-
type: [String],
|
|
115
|
-
required: true,
|
|
116
|
-
},
|
|
117
118
|
startTime: {
|
|
118
119
|
type: Date,
|
|
119
120
|
required: true,
|
|
@@ -127,7 +128,7 @@ const CompetitionSchema = new mongoose_1.Schema({
|
|
|
127
128
|
enum: Object.values(app_1.CAMPUS_CARNIVAL_STATUS),
|
|
128
129
|
required: true,
|
|
129
130
|
},
|
|
130
|
-
|
|
131
|
+
judges: {
|
|
131
132
|
type: [String],
|
|
132
133
|
required: true,
|
|
133
134
|
},
|
|
@@ -155,7 +156,7 @@ const CompetitionSchema = new mongoose_1.Schema({
|
|
|
155
156
|
type: String,
|
|
156
157
|
required: true,
|
|
157
158
|
},
|
|
158
|
-
|
|
159
|
+
campusCarnivalId: {
|
|
159
160
|
type: String,
|
|
160
161
|
required: true,
|
|
161
162
|
},
|
package/package.json
CHANGED