pristine-member-nest-api-database 1.0.34 → 1.0.36

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.
@@ -132,27 +132,79 @@ const memberSchema = new mongoose_1.Schema({
132
132
  isTerminated: { type: Boolean, default: false },
133
133
  terminatedDate: { type: Date, default: null },
134
134
  reasonForTermination: { type: String, default: "" },
135
- barcodeAssociation: [
136
- {
137
- barcodeBranchMemberCode: { type: String, default: "" },
138
- barcodeCategory: {
139
- type: mongoose_1.Schema.Types.ObjectId,
140
- ref: "Barcode.Categories",
135
+ barcodeAssociation: {
136
+ type: [
137
+ {
138
+ isMembershipRequested: {
139
+ type: Boolean,
140
+ default: true,
141
+ },
142
+ membershipType: {
143
+ type: mongoose_1.default.Types.ObjectId,
144
+ ref: "Membership.Types",
145
+ required: true,
146
+ },
147
+ membershipStatus: {
148
+ type: mongoose_1.default.Types.ObjectId,
149
+ ref: "Membership.Statuses",
150
+ required: true,
151
+ },
152
+ remarks: {
153
+ type: String,
154
+ required: true,
155
+ },
156
+ requestedDate: {
157
+ type: Date,
158
+ default: Date.now,
159
+ },
160
+ isMembershipSynced: {
161
+ type: Boolean,
162
+ default: false,
163
+ },
164
+ isIssued: {
165
+ type: Boolean,
166
+ },
167
+ electedDate: {
168
+ type: Date,
169
+ },
170
+ barcodeBranchMemberCode: {
171
+ type: String,
172
+ },
173
+ barCode: {
174
+ type: Number,
175
+ },
176
+ validFrom: {
177
+ type: Date,
178
+ },
179
+ validTo: {
180
+ type: Date,
181
+ },
182
+ countryCode: {
183
+ type: Number,
184
+ },
185
+ changeDate: {
186
+ type: Date,
187
+ },
188
+ isTerminationRequested: {
189
+ type: Boolean,
190
+ default: false,
191
+ },
192
+ isTerminationSynced: {
193
+ type: Boolean,
194
+ default: false,
195
+ },
196
+ terminationRequestedDate: {
197
+ type: Date,
198
+ },
199
+ terminationDate: {
200
+ type: Date,
201
+ },
202
+ terminationReason: {
203
+ type: String,
204
+ },
141
205
  },
142
- issueDate: { type: Date, default: null },
143
- isIssued: { type: Boolean, default: true },
144
- country: {
145
- type: mongoose_1.Schema.Types.ObjectId,
146
- ref: "Countries",
147
- },
148
- barCode: { type: String, default: "" },
149
- changeDate: { type: Date, default: null },
150
- validFrom: { type: Date, default: null },
151
- validTo: { type: Date, default: null },
152
- registeredDate: { type: Date, default: null },
153
- remarks: { type: String, default: "" },
154
- },
155
- ],
206
+ ],
207
+ },
156
208
  dynamicDetails: { type: JSON, default: null },
157
209
  isTerminationRequested: { type: Boolean, default: false },
158
210
  terminationRequestedDate: { type: Date, default: null },
@@ -47,17 +47,24 @@ type MemberContactInfo = {
47
47
  };
48
48
 
49
49
  type barcodeBranch = {
50
+ isMembershipRequested: boolean; //means membership request is waiting for approval
51
+ membershipType: mongoose.Types.ObjectId;
52
+ membershipStatus: mongoose.Types.ObjectId;
53
+ remarks: String;
54
+ requestedDate: Date;
55
+ isMembershipSynced: boolean; //used to check whether SAP sync done or not
56
+ isIssued: boolean; //means subscription is issued or not
57
+ electedDate: Date;
50
58
  barcodeBranchMemberCode: string;
51
- barcodeCategoryCode: string;
52
- issueDate: Date;
53
- isIssued: boolean;
54
- countryCodeCode: string;
55
- barCode: string;
56
- changeDate: Date;
59
+ barCode: number;
57
60
  validFrom: Date;
58
61
  validTo: Date;
59
- registeredDate: Date;
60
- remarks: string;
62
+ countryCode: number;
63
+ changeDate: Date;
64
+ isTerminationRequested: boolean;
65
+ isTerminationSynced: boolean; //used to check whether SAP sync done or not
66
+ terminationDate: Date;
67
+ terminationReason: string;
61
68
  };
62
69
 
63
70
  type MemberAssociation = {
@@ -223,27 +230,79 @@ const memberSchema = new Schema<MemberDocument>({
223
230
  isTerminated: { type: Boolean, default: false },
224
231
  terminatedDate: { type: Date, default: null },
225
232
  reasonForTermination: { type: String, default: "" },
226
- barcodeAssociation: [
227
- {
228
- barcodeBranchMemberCode: { type: String, default: "" },
229
- barcodeCategory: {
230
- type: Schema.Types.ObjectId,
231
- ref: "Barcode.Categories",
233
+ barcodeAssociation: {
234
+ type: [
235
+ {
236
+ isMembershipRequested: {
237
+ type: Boolean,
238
+ default: true,
239
+ },
240
+ membershipType: {
241
+ type: mongoose.Types.ObjectId,
242
+ ref: "Membership.Types",
243
+ required: true,
244
+ },
245
+ membershipStatus: {
246
+ type: mongoose.Types.ObjectId,
247
+ ref: "Membership.Statuses",
248
+ required: true,
249
+ },
250
+ remarks: {
251
+ type: String,
252
+ required: true,
253
+ },
254
+ requestedDate: {
255
+ type: Date,
256
+ default: Date.now,
257
+ },
258
+ isMembershipSynced: {
259
+ type: Boolean,
260
+ default: false,
261
+ },
262
+ isIssued: {
263
+ type: Boolean,
264
+ },
265
+ electedDate: {
266
+ type: Date,
267
+ },
268
+ barcodeBranchMemberCode: {
269
+ type: String,
270
+ },
271
+ barCode: {
272
+ type: Number,
273
+ },
274
+ validFrom: {
275
+ type: Date,
276
+ },
277
+ validTo: {
278
+ type: Date,
279
+ },
280
+ countryCode: {
281
+ type: Number,
282
+ },
283
+ changeDate: {
284
+ type: Date,
285
+ },
286
+ isTerminationRequested: {
287
+ type: Boolean,
288
+ default: false,
289
+ },
290
+ isTerminationSynced: {
291
+ type: Boolean,
292
+ default: false,
293
+ },
294
+ terminationRequestedDate: {
295
+ type: Date,
296
+ },
297
+ terminationDate: {
298
+ type: Date,
299
+ },
300
+ terminationReason: {
301
+ type: String,
302
+ },
232
303
  },
233
- issueDate: { type: Date, default: null },
234
- isIssued: { type: Boolean, default: true },
235
- country: {
236
- type: Schema.Types.ObjectId,
237
- ref: "Countries",
238
- },
239
- barCode: { type: String, default: "" },
240
- changeDate: { type: Date, default: null },
241
- validFrom: { type: Date, default: null },
242
- validTo: { type: Date, default: null },
243
- registeredDate: { type: Date, default: null },
244
- remarks: { type: String, default: "" },
245
- },
246
- ],
304
+ ],
305
+ },
247
306
  dynamicDetails: { type: JSON, default: null },
248
307
  isTerminationRequested: { type: Boolean, default: false },
249
308
  terminationRequestedDate: { type: Date, default: null },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pristine-member-nest-api-database",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "Member nest API database",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {