joye-backend-utility 5.1.45 → 5.1.47
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/database.js
CHANGED
|
@@ -51,6 +51,7 @@ class database {
|
|
|
51
51
|
con.model('AI_Responses_Tracking', schema_1.AIResponsesTrackingSchema);
|
|
52
52
|
con.model('User_Analytic', schema_1.UserAnalyticSchema);
|
|
53
53
|
con.model('AI_Prompts', schema_1.AIPromptsSchema);
|
|
54
|
+
con.model('Page_View', schema_1.PageViewSchema);
|
|
54
55
|
};
|
|
55
56
|
this.connectToDatabase = () => {
|
|
56
57
|
const env = config_1.NODE_ENV || 'development';
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -42,3 +42,4 @@ export { UserProfileSchema } from './userProfile';
|
|
|
42
42
|
export { AIResponsesTrackingSchema } from './ai_responses_tracking';
|
|
43
43
|
export { UserAnalyticSchema } from './user_analytic';
|
|
44
44
|
export { AIPromptsSchema } from './ai_prompts';
|
|
45
|
+
export { PageViewSchema } from './pageView';
|
package/dist/schema/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AIPromptsSchema = exports.UserAnalyticSchema = exports.AIResponsesTrackingSchema = exports.UserProfileSchema = exports.UserChatSessionSchema = exports.FeatureFeedbackSchema = exports.UserWeekActivitySchema = exports.UserTrainingWeekDataSchema = exports.UserTrainingDataSchema = exports.MasterTrainingWeekSchema = exports.MasterTrainingSchema = exports.userJoyLevelQaSchema = exports.userGoalSchema = exports.OrganizationUserAttrPermissionSchema = exports.TimezoneSchema = exports.UserVideoSchema = exports.UserFeedbackSchema = exports.UserReminderSchema = exports.MasterLinkCardSchema = exports.UserRecommendationSchema = exports.MasterSuggestionsParameterSchema = exports.MasterSuggestionsMessageSchema = exports.MasterBlessingsDataSchema = exports.MasterVideoSchema = exports.DatabaseInfoSchema = exports.UserSchema = exports.UserMessageLogSchema = exports.UserMessageSchema = exports.UserMeetingSchema = exports.UserLogSchema = exports.PlatformSchema = exports.OrganizationSchema = exports.MasterThemeMessageSchema = exports.MasterThemeDataSchema = exports.MasterPredictionEmotionsMessageMappingSchema = exports.MasterPredictionEmotionMessageSchema = exports.MasterPredictionEmotionSchema = exports.MasterPodcastSchema = exports.MasterEmotionMessageTypeThemeMappingSchema = exports.MasterEmotionsMessageMappingSchema = exports.MasterEmotionsSchema = exports.MasterDataSchema = exports.MasterAppSettingSchema = exports.BrewSchema = void 0;
|
|
3
|
+
exports.PageViewSchema = exports.AIPromptsSchema = exports.UserAnalyticSchema = exports.AIResponsesTrackingSchema = exports.UserProfileSchema = exports.UserChatSessionSchema = exports.FeatureFeedbackSchema = exports.UserWeekActivitySchema = exports.UserTrainingWeekDataSchema = exports.UserTrainingDataSchema = exports.MasterTrainingWeekSchema = exports.MasterTrainingSchema = exports.userJoyLevelQaSchema = exports.userGoalSchema = exports.OrganizationUserAttrPermissionSchema = exports.TimezoneSchema = exports.UserVideoSchema = exports.UserFeedbackSchema = exports.UserReminderSchema = exports.MasterLinkCardSchema = exports.UserRecommendationSchema = exports.MasterSuggestionsParameterSchema = exports.MasterSuggestionsMessageSchema = exports.MasterBlessingsDataSchema = exports.MasterVideoSchema = exports.DatabaseInfoSchema = exports.UserSchema = exports.UserMessageLogSchema = exports.UserMessageSchema = exports.UserMeetingSchema = exports.UserLogSchema = exports.PlatformSchema = exports.OrganizationSchema = exports.MasterThemeMessageSchema = exports.MasterThemeDataSchema = exports.MasterPredictionEmotionsMessageMappingSchema = exports.MasterPredictionEmotionMessageSchema = exports.MasterPredictionEmotionSchema = exports.MasterPodcastSchema = exports.MasterEmotionMessageTypeThemeMappingSchema = exports.MasterEmotionsMessageMappingSchema = exports.MasterEmotionsSchema = exports.MasterDataSchema = exports.MasterAppSettingSchema = exports.BrewSchema = void 0;
|
|
4
4
|
var brew_1 = require("./brew");
|
|
5
5
|
Object.defineProperty(exports, "BrewSchema", { enumerable: true, get: function () { return brew_1.BrewSchema; } });
|
|
6
6
|
var masterAppSetting_1 = require("./masterAppSetting");
|
|
@@ -89,3 +89,5 @@ var user_analytic_1 = require("./user_analytic");
|
|
|
89
89
|
Object.defineProperty(exports, "UserAnalyticSchema", { enumerable: true, get: function () { return user_analytic_1.UserAnalyticSchema; } });
|
|
90
90
|
var ai_prompts_1 = require("./ai_prompts");
|
|
91
91
|
Object.defineProperty(exports, "AIPromptsSchema", { enumerable: true, get: function () { return ai_prompts_1.AIPromptsSchema; } });
|
|
92
|
+
var pageView_1 = require("./pageView");
|
|
93
|
+
Object.defineProperty(exports, "PageViewSchema", { enumerable: true, get: function () { return pageView_1.PageViewSchema; } });
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PageViewSchema = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
const pageView = new mongoose_1.Schema({
|
|
6
|
+
employeeId: {
|
|
7
|
+
type: String,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
date: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
page: {
|
|
15
|
+
type: String,
|
|
16
|
+
index: true,
|
|
17
|
+
},
|
|
18
|
+
count: {
|
|
19
|
+
type: Number,
|
|
20
|
+
required: true,
|
|
21
|
+
},
|
|
22
|
+
time: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
pageView.index({ employeeId: 1, date: -1, page: 1 }, {
|
|
28
|
+
unique: false,
|
|
29
|
+
});
|
|
30
|
+
pageView.index({ date: 1, page: -1 }, {
|
|
31
|
+
unique: false,
|
|
32
|
+
});
|
|
33
|
+
exports.PageViewSchema = pageView;
|
|
@@ -88,6 +88,9 @@ const UserAnalytic = new mongoose_1.Schema({
|
|
|
88
88
|
before: { type: Number, default: 0 },
|
|
89
89
|
},
|
|
90
90
|
},
|
|
91
|
+
goal: {
|
|
92
|
+
type: Array,
|
|
93
|
+
},
|
|
91
94
|
});
|
|
92
95
|
UserAnalytic.index({ employeeId: 1, weekNumber: -1, year: -1, date: -1 });
|
|
93
96
|
UserAnalytic.index({ employeeId: 1, month: -1, year: -1, date: -1 });
|