mypetbook-core 1.1.45 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mypetbook-core",
3
- "version": "1.1.45",
3
+ "version": "1.1.47",
4
4
  "description": "This contain all the entity model for the mypetbook",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -1,4 +1,5 @@
1
1
  const mongoose = require('mongoose');
2
+ const { NotificationUserType } = require('./UserEntity');
2
3
 
3
4
  const PushNotificationSchema = new mongoose.Schema(
4
5
  {
@@ -8,6 +9,11 @@ const PushNotificationSchema = new mongoose.Schema(
8
9
  ref: 'User',
9
10
  },
10
11
 
12
+ userType: {
13
+ type: String,
14
+ enum: Object.values(NotificationUserType),
15
+ },
16
+
11
17
  // ManyToMany -> Array of references
12
18
  users: [
13
19
  {
@@ -1,4 +1,5 @@
1
1
  const mongoose = require('mongoose');
2
+ const { NotificationUserType } = require('./UserEntity');
2
3
 
3
4
  const SmsNotificationSchema = new mongoose.Schema(
4
5
  {
@@ -8,6 +9,11 @@ const SmsNotificationSchema = new mongoose.Schema(
8
9
  ref: 'User',
9
10
  },
10
11
 
12
+ userType: {
13
+ type: String,
14
+ enum: Object.values(NotificationUserType),
15
+ },
16
+
11
17
  // ManyToMany -> Array of references
12
18
  users: [
13
19
  {
package/src/UserEntity.js CHANGED
@@ -2,6 +2,11 @@ const mongoose = require("mongoose");
2
2
 
3
3
  const Schema = mongoose.Schema;
4
4
 
5
+ const NotificationUserType = {
6
+ Parent: 'Parent',
7
+ Doctor: 'Doctor'
8
+ };
9
+
5
10
  const AccountStatus = {
6
11
  ACTIVE: 'ACTIVE',
7
12
  INACTIVE: 'INACTIVE',
@@ -37,5 +42,6 @@ const User = mongoose.model("User", userSchema);
37
42
  module.exports = {
38
43
  User,
39
44
  AccountStatus,
40
- AccountStatusType
45
+ AccountStatusType,
46
+ NotificationUserType
41
47
  };
package/src/index.js CHANGED
@@ -41,7 +41,7 @@ const {
41
41
  const { TreatmentRecording } = require("./TreatmentRecordingEntity");
42
42
  const { TreatmentReport } = require("./TreatmentReportEntity");
43
43
  const { UserAddress } = require("./UserAddressEntity");
44
- const { User, AccountStatusType, AccountStatus } = require("./UserEntity");
44
+ const { User, AccountStatusType, AccountStatus, NotificationUserType } = require("./UserEntity");
45
45
  const {
46
46
  VideoRecording,
47
47
  VideoComment,
@@ -136,4 +136,5 @@ module.exports = {
136
136
  SmsNotification: SmsNotification,
137
137
  SmsNotificationTemplate: SmsNotificationTemplate,
138
138
  SmsTemplateId: SmsTemplateId,
139
+ NotificationUserType: NotificationUserType
139
140
  };