joye-backend-utility 5.0.44 → 5.0.46

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
@@ -38,6 +38,7 @@ class database {
38
38
  con.model('User_Video', schema_1.UserVideoSchema);
39
39
  con.model('Timezone', schema_1.TimezoneSchema);
40
40
  con.model('Organization_User_Attr_Permission', schema_1.OrganizationUserAttrPermissionSchema);
41
+ con.model('User_Goal', schema_1.userGoalSchema);
41
42
  };
42
43
  this.connectToDatabase = () => {
43
44
  const env = config_1.NODE_ENV || 'development';
@@ -29,3 +29,4 @@ export { UserFeedbackSchema } from '../schema/userFeedback';
29
29
  export { UserVideoSchema } from '../schema/userVideo';
30
30
  export { TimezoneSchema } from './timezones';
31
31
  export { OrganizationUserAttrPermissionSchema } from './organizationUserAttrPermission';
32
+ export { userGoalSchema } from './userGoal';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- 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.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");
@@ -63,3 +63,5 @@ var timezones_1 = require("./timezones");
63
63
  Object.defineProperty(exports, "TimezoneSchema", { enumerable: true, get: function () { return timezones_1.TimezoneSchema; } });
64
64
  var organizationUserAttrPermission_1 = require("./organizationUserAttrPermission");
65
65
  Object.defineProperty(exports, "OrganizationUserAttrPermissionSchema", { enumerable: true, get: function () { return organizationUserAttrPermission_1.OrganizationUserAttrPermissionSchema; } });
66
+ var userGoal_1 = require("./userGoal");
67
+ Object.defineProperty(exports, "userGoalSchema", { enumerable: true, get: function () { return userGoal_1.userGoalSchema; } });
@@ -0,0 +1,2 @@
1
+ import { Schema } from 'mongoose';
2
+ export declare const userGoalSchema: Schema<import("mongoose").Document<any, any, any>, import("mongoose").Model<import("mongoose").Document<any, any, any>, any, any>, undefined, {}>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.userGoalSchema = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const userGoal = new mongoose_1.Schema({
6
+ employeeId: {
7
+ type: String,
8
+ required: true,
9
+ },
10
+ date: {
11
+ type: String,
12
+ required: true,
13
+ },
14
+ goalType: {
15
+ type: String,
16
+ required: true,
17
+ },
18
+ goal: {
19
+ type: String,
20
+ required: true,
21
+ },
22
+ status: {
23
+ type: String,
24
+ required: true,
25
+ },
26
+ weekNumber: {
27
+ type: Number,
28
+ required: true,
29
+ },
30
+ });
31
+ userGoal.index({ employeeId: 1, date: -1 }, {
32
+ unique: false,
33
+ });
34
+ exports.userGoalSchema = userGoal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "joye-backend-utility",
3
- "version": "5.0.44",
3
+ "version": "5.0.46",
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",