@dynamatix/gb-schemas 2.20.5 → 2.20.7
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
|
-
{"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"security.model.d.ts","sourceRoot":"","sources":["../../properties/security.model.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAmLhC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAA6C,CAAC;AACjE,eAAe,aAAa,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// security.model.ts
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
|
+
import { applyAuditMiddleware } from "@dynamatix/cat-shared/middlewares";
|
|
3
4
|
import { Pound, formatPound } from "../value-objects/pound";
|
|
4
5
|
import { applyWorkflowPlugin } from "../shared/workflow.plugin";
|
|
5
6
|
const dataStreetSchema = new mongoose.Schema({
|
|
@@ -148,6 +149,10 @@ securitySchema.virtual('lendingType').get(function () {
|
|
|
148
149
|
? null
|
|
149
150
|
: this.applicationId?.lendingTypeLid?.name || null;
|
|
150
151
|
});
|
|
152
|
+
// Audit changes to EPC / DataStreet fields (energyEfficiencyRating, epcStatus,
|
|
153
|
+
// epcOverrideReason) via the shared audit middleware. Which fields are tracked
|
|
154
|
+
// is driven by the `Security` AuditConfig document, not by code.
|
|
155
|
+
applyAuditMiddleware(securitySchema, "Security");
|
|
151
156
|
// Apply workflow plugin to the schema
|
|
152
157
|
applyWorkflowPlugin(securitySchema, 'security');
|
|
153
158
|
// Indexes for query optimization
|