@kipicore/dbcore 1.1.164 → 1.1.165
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/interfaces/campusCarnivalInterface.d.ts +6 -0
- package/dist/interfaces/competitionInterface.d.ts +1 -3
- package/dist/interfaces/competitionUsersInterface.d.ts +2 -2
- package/dist/models/mongodb/campusCarnivalModel.d.ts +2 -2
- package/dist/models/mongodb/campusCarnivalModel.js +20 -1
- package/dist/models/mongodb/competitionModel.js +0 -8
- package/package.json +1 -1
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Document } from 'mongoose';
|
|
2
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
3
3
|
import { CAMPUS_CARNIVAL_STATUS } from '../constants/app';
|
|
4
|
+
export interface IMaxParticipantsPerStandardAttributes {
|
|
5
|
+
standardId: string;
|
|
6
|
+
numberOfCompetition: number;
|
|
7
|
+
maxParticipants: number;
|
|
8
|
+
}
|
|
4
9
|
export interface ICampusCarnivalModelAttributes extends IDefaultAttributes, Document {
|
|
5
10
|
id: string;
|
|
6
11
|
name: string;
|
|
@@ -11,4 +16,5 @@ export interface ICampusCarnivalModelAttributes extends IDefaultAttributes, Docu
|
|
|
11
16
|
status: CAMPUS_CARNIVAL_STATUS;
|
|
12
17
|
academicCalendarId: string;
|
|
13
18
|
instituteId: string;
|
|
19
|
+
maxParticipantsPerStandard: [IMaxParticipantsPerStandardAttributes];
|
|
14
20
|
}
|
|
@@ -11,8 +11,6 @@ export interface IRoundsInformationAttributes {
|
|
|
11
11
|
}
|
|
12
12
|
export interface IStandardsInformationAttributes {
|
|
13
13
|
standardId: string;
|
|
14
|
-
numberOfParticipants: number;
|
|
15
|
-
maxParticipants: number;
|
|
16
14
|
batchId: string[];
|
|
17
15
|
}
|
|
18
16
|
export interface ICompetitionAttributes extends IDefaultAttributes, Document {
|
|
@@ -30,7 +28,7 @@ export interface ICompetitionAttributes extends IDefaultAttributes, Document {
|
|
|
30
28
|
status: CAMPUS_CARNIVAL_STATUS;
|
|
31
29
|
judges: string[];
|
|
32
30
|
coordinator: string[];
|
|
33
|
-
standards: [
|
|
31
|
+
standards: IStandardsInformationAttributes[];
|
|
34
32
|
academicCalendarId: string;
|
|
35
33
|
instituteId: string;
|
|
36
34
|
campusCarnivalId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Document } from 'mongoose';
|
|
2
2
|
import { IDefaultAttributes } from './commonInterface';
|
|
3
3
|
import { COMPETITION_STATUS, COMPETITION_USER_ROLE, RESULT_STATUS, STATUS_BY_PARENTS } from '../constants/app';
|
|
4
|
-
export interface
|
|
4
|
+
export interface IRoundsAttributionSchema {
|
|
5
5
|
id: string;
|
|
6
6
|
status: COMPETITION_STATUS;
|
|
7
7
|
rank: number;
|
|
@@ -15,7 +15,7 @@ export interface ICompetitionUsersModelAttributes extends IDefaultAttributes, Do
|
|
|
15
15
|
statusByParent: STATUS_BY_PARENTS;
|
|
16
16
|
userId: string;
|
|
17
17
|
groupId: string;
|
|
18
|
-
round:
|
|
18
|
+
round: IRoundsAttributionSchema[];
|
|
19
19
|
competitionId: string;
|
|
20
20
|
competitionEventId: string;
|
|
21
21
|
userRole: COMPETITION_USER_ROLE;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model } from
|
|
2
|
-
import { ICampusCarnivalModelAttributes } from
|
|
1
|
+
import { Model } from 'mongoose';
|
|
2
|
+
import { ICampusCarnivalModelAttributes } from '../../interfaces/campusCarnivalInterface';
|
|
3
3
|
declare const CampusCarnivalModel: Model<ICampusCarnivalModelAttributes>;
|
|
4
4
|
export default CampusCarnivalModel;
|
|
@@ -35,6 +35,21 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const mongoose_1 = __importStar(require("mongoose"));
|
|
37
37
|
const app_1 = require("../../constants/app");
|
|
38
|
+
const MaxParticipantsPerStandardAttributes = new mongoose_1.Schema({
|
|
39
|
+
standardId: {
|
|
40
|
+
type: String,
|
|
41
|
+
required: false,
|
|
42
|
+
},
|
|
43
|
+
numberOfCompetition: {
|
|
44
|
+
type: Number,
|
|
45
|
+
required: false,
|
|
46
|
+
},
|
|
47
|
+
maxParticipants: {
|
|
48
|
+
type: Number,
|
|
49
|
+
required: false,
|
|
50
|
+
default: -1,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
38
53
|
const CampusCarnivalSchema = new mongoose_1.Schema({
|
|
39
54
|
name: {
|
|
40
55
|
type: String,
|
|
@@ -69,6 +84,10 @@ const CampusCarnivalSchema = new mongoose_1.Schema({
|
|
|
69
84
|
type: String,
|
|
70
85
|
required: false,
|
|
71
86
|
},
|
|
87
|
+
maxParticipantsPerStandard: {
|
|
88
|
+
type: [MaxParticipantsPerStandardAttributes],
|
|
89
|
+
required: false,
|
|
90
|
+
},
|
|
72
91
|
createdBy: {
|
|
73
92
|
type: String,
|
|
74
93
|
},
|
|
@@ -82,5 +101,5 @@ const CampusCarnivalSchema = new mongoose_1.Schema({
|
|
|
82
101
|
timestamps: true,
|
|
83
102
|
versionKey: false,
|
|
84
103
|
});
|
|
85
|
-
const CampusCarnivalModel = mongoose_1.default.model(
|
|
104
|
+
const CampusCarnivalModel = mongoose_1.default.model('campus_carnival', CampusCarnivalSchema);
|
|
86
105
|
exports.default = CampusCarnivalModel;
|
|
@@ -67,14 +67,6 @@ const StandardsInformationSchema = new mongoose_1.Schema({
|
|
|
67
67
|
type: String,
|
|
68
68
|
required: false,
|
|
69
69
|
},
|
|
70
|
-
numberOfParticipants: {
|
|
71
|
-
type: Number,
|
|
72
|
-
required: false,
|
|
73
|
-
},
|
|
74
|
-
maxParticipants: {
|
|
75
|
-
type: Number,
|
|
76
|
-
required: false,
|
|
77
|
-
},
|
|
78
70
|
batchId: {
|
|
79
71
|
type: [String],
|
|
80
72
|
required: false,
|
package/package.json
CHANGED