tango-api-schema 2.6.25 → 2.6.26
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/index.js +2 -0
- package/package.json +1 -1
- package/schema/paymentReminder.model.js +47 -0
package/index.js
CHANGED
|
@@ -36,6 +36,7 @@ import paymentAccountModel from "./schema/paymentAccount.model.js";
|
|
|
36
36
|
import externalParameterModel from "./schema/externalParameter.model.js";
|
|
37
37
|
import transactionModel from "./schema/transaction.model.js";
|
|
38
38
|
import estimateModel from "./schema/estimate.model.js";
|
|
39
|
+
import paymentReminderModel from "./schema/paymentReminder.model.js";
|
|
39
40
|
import bankTransactionModel from "./schema/bankTransaction.model.js";
|
|
40
41
|
import dataMismatchDraftModel from "./schema/dataMismatchDraft.model.js";
|
|
41
42
|
import traxAuditDataModel from "./schema/traxAuditData.model.js";
|
|
@@ -171,6 +172,7 @@ export default {
|
|
|
171
172
|
externalParameterModel,
|
|
172
173
|
transactionModel,
|
|
173
174
|
estimateModel,
|
|
175
|
+
paymentReminderModel,
|
|
174
176
|
bankTransactionModel,
|
|
175
177
|
dataMismatchDraftModel,
|
|
176
178
|
traxAuditDataModel,
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import mongoose from 'mongoose';
|
|
2
|
+
|
|
3
|
+
// Payment reminder configuration per client (brand). One document per
|
|
4
|
+
// clientId, driving which reminder emails go out and to whom. Stored in its
|
|
5
|
+
// own `paymentreminders` collection.
|
|
6
|
+
const paymentReminderSchema = new mongoose.Schema(
|
|
7
|
+
{
|
|
8
|
+
clientId: {
|
|
9
|
+
type: String,
|
|
10
|
+
index: true,
|
|
11
|
+
},
|
|
12
|
+
// Recipients for all reminder emails on this brand.
|
|
13
|
+
reminderEmails: {
|
|
14
|
+
type: [ String ],
|
|
15
|
+
default: [],
|
|
16
|
+
},
|
|
17
|
+
// Predefined reminder templates the team can toggle. preDue carries a
|
|
18
|
+
// configurable lead time; the rest fire on fixed rules.
|
|
19
|
+
templates: {
|
|
20
|
+
preDue: {
|
|
21
|
+
enabled: { type: Boolean, default: true },
|
|
22
|
+
daysBefore: { type: Number, default: 3, min: 1, max: 365 },
|
|
23
|
+
},
|
|
24
|
+
onDue: {
|
|
25
|
+
enabled: { type: Boolean, default: true },
|
|
26
|
+
},
|
|
27
|
+
onHold: {
|
|
28
|
+
enabled: { type: Boolean, default: true },
|
|
29
|
+
},
|
|
30
|
+
suspend: {
|
|
31
|
+
enabled: { type: Boolean, default: true },
|
|
32
|
+
},
|
|
33
|
+
deactivated: {
|
|
34
|
+
enabled: { type: Boolean, default: false },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
updatedBy: {
|
|
38
|
+
type: String,
|
|
39
|
+
},
|
|
40
|
+
}, {
|
|
41
|
+
strict: true,
|
|
42
|
+
versionKey: false,
|
|
43
|
+
timestamps: true,
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
export default mongoose.model( 'paymentreminder', paymentReminderSchema );
|