joye-backend-utility 5.0.9 → 5.0.11

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
@@ -34,6 +34,7 @@ class database {
34
34
  con.model('User_Recommendation', schema_1.UserRecommendationSchema);
35
35
  con.model('Master_Link_Card', schema_1.MasterLinkCardSchema);
36
36
  con.model('User_Reminder', schema_1.UserReminderSchema);
37
+ con.model('User_Feedback', schema_1.UserFeedbackSchema);
37
38
  };
38
39
  this.connectToDatabase = () => {
39
40
  const env = config_1.NODE_ENV || 'development';
@@ -25,3 +25,4 @@ export { MasterSuggestionsParameterSchema } from './masterSuggestionsParameter.m
25
25
  export { UserRecommendationSchema } from './userRecommendation';
26
26
  export { MasterLinkCardSchema } from './masterLinkCard';
27
27
  export { UserReminderSchema } from '../schema/userReminder';
28
+ export { UserFeedbackSchema } from '../schema/userFeedback';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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");
@@ -55,3 +55,5 @@ var masterLinkCard_1 = require("./masterLinkCard");
55
55
  Object.defineProperty(exports, "MasterLinkCardSchema", { enumerable: true, get: function () { return masterLinkCard_1.MasterLinkCardSchema; } });
56
56
  var userReminder_1 = require("../schema/userReminder");
57
57
  Object.defineProperty(exports, "UserReminderSchema", { enumerable: true, get: function () { return userReminder_1.UserReminderSchema; } });
58
+ var userFeedback_1 = require("../schema/userFeedback");
59
+ Object.defineProperty(exports, "UserFeedbackSchema", { enumerable: true, get: function () { return userFeedback_1.UserFeedbackSchema; } });
@@ -134,6 +134,14 @@ const User = new mongoose_1.Schema({
134
134
  type: Number,
135
135
  required: false,
136
136
  },
137
+ currentStreak: {
138
+ type: Number,
139
+ required: false,
140
+ },
141
+ maxStreak: {
142
+ type: Number,
143
+ required: false,
144
+ },
137
145
  createTimestamp: {
138
146
  type: Number,
139
147
  required: false,
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const UserFeedbackSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserFeedbackSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const UserFeedback = new mongoose_1.Schema({
6
+ employeeId: {
7
+ type: String,
8
+ required: true,
9
+ index: true,
10
+ },
11
+ feedbackTime: {
12
+ type: Number,
13
+ required: true,
14
+ },
15
+ date: {
16
+ type: String,
17
+ required: true,
18
+ },
19
+ details: {
20
+ type: Object,
21
+ required: true,
22
+ },
23
+ });
24
+ exports.UserFeedbackSchema = UserFeedback;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "5.0.9",
3
+ "version": "5.0.11",
4
4
  "description": "Joye backend utility for db functions and common functions",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",