@dynamatix/gb-schemas 0.0.7 → 0.0.9

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.
@@ -1 +1 @@
1
- import {default as ApplicantModel} from './applicant.model.js';
1
+ export {default as ApplicantModel} from './applicant.model.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "All the schemas for gatehouse bank back-end.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@
20
20
  "dependencies": {
21
21
  "mongoose": "^8.9.5"
22
22
  },
23
- "exports":{
23
+ "exports": {
24
24
  "./applications": "./applications/index.js",
25
25
  "./applicants": "./applicants/index.js",
26
26
  "./shared": "./shared/index.js",
@@ -0,0 +1,26 @@
1
+ import mongoose from "mongoose";
2
+
3
+ const alertSchema = new mongoose.Schema({
4
+ alertTypeLid: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: "Lookup"
7
+ },
8
+ applicationId: {
9
+ type: mongoose.Schema.Types.ObjectId,
10
+ ref: "Application",
11
+ required: true
12
+ },
13
+ alertMessage: { type: String },
14
+ documentId: {
15
+ type: mongoose.Schema.Types.ObjectId,
16
+ ref: "Document",
17
+ },
18
+ statusLid: {
19
+ type: mongoose.Schema.Types.ObjectId,
20
+ ref: "Lookup"
21
+ }
22
+ }, { timestamps: true });
23
+
24
+ const AlertModel = mongoose.model("Alert", alertSchema);
25
+
26
+ export default AlertModel;
@@ -0,0 +1,28 @@
1
+ import mongoose from "mongoose";
2
+
3
+ const checklistSchema = new mongoose.Schema({
4
+ checkTypeLid: {
5
+ type: mongoose.Schema.Types.ObjectId,
6
+ ref: "Lookup",
7
+ required: true
8
+ },
9
+ checkSource:{ // [Applicant, Property, Application]
10
+ type: String,
11
+ required: true
12
+ },
13
+ applicationId: {
14
+ type: mongoose.Schema.Types.ObjectId,
15
+ ref: "Application",
16
+ required: true
17
+ },
18
+ checkDescription: { type: String },
19
+ checkStatusLid: {
20
+ type: String,
21
+ ref: "Lookup",
22
+ required: true
23
+ }
24
+ });
25
+
26
+ const CheckListModel = mongoose.model("CheckList", checklistSchema);
27
+
28
+ export default CheckListModel;