@valentine-efagene/qshelter-common 1.0.3 → 1.1.3
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/dist/encryption/encryption.module.d.ts +2 -0
- package/dist/encryption/encryption.module.js +24 -0
- package/dist/encryption/encryption.module.js.map +1 -0
- package/dist/encryption/encryption.service.d.ts +17 -0
- package/dist/encryption/encryption.service.js +95 -0
- package/dist/encryption/encryption.service.js.map +1 -0
- package/dist/entities/amenity.entity.js +1 -0
- package/dist/entities/amenity.entity.js.map +1 -1
- package/dist/entities/common.entity.js +6 -5
- package/dist/entities/common.entity.js.map +1 -1
- package/dist/entities/contract-document.entity.d.ts +39 -0
- package/dist/entities/contract-document.entity.js +115 -0
- package/dist/entities/contract-document.entity.js.map +1 -0
- package/dist/entities/contract.entity.d.ts +62 -0
- package/dist/entities/contract.entity.js +191 -0
- package/dist/entities/contract.entity.js.map +1 -0
- package/dist/entities/device_endpoint.entity.d.ts +10 -0
- package/dist/entities/device_endpoint.entity.js +50 -0
- package/dist/entities/device_endpoint.entity.js.map +1 -0
- package/dist/entities/email_preference.entity.d.ts +6 -0
- package/dist/entities/email_preference.entity.js +45 -0
- package/dist/entities/email_preference.entity.js.map +1 -0
- package/dist/entities/index.d.ts +10 -0
- package/dist/entities/index.js +10 -0
- package/dist/entities/index.js.map +1 -1
- package/dist/entities/mortgage-document.entity.js +6 -6
- package/dist/entities/mortgage-document.entity.js.map +1 -1
- package/dist/entities/mortgage-downpayment-installment.entity.d.ts +2 -2
- package/dist/entities/mortgage-downpayment-installment.entity.js +15 -15
- package/dist/entities/mortgage-downpayment-installment.entity.js.map +1 -1
- package/dist/entities/mortgage-downpayment-payment.entity.js +8 -8
- package/dist/entities/mortgage-downpayment-payment.entity.js.map +1 -1
- package/dist/entities/mortgage-downpayment.entity.js +6 -6
- package/dist/entities/mortgage-downpayment.entity.js.map +1 -1
- package/dist/entities/mortgage-step.entity.js +6 -6
- package/dist/entities/mortgage-step.entity.js.map +1 -1
- package/dist/entities/mortgage-transition-event.entity.d.ts +26 -0
- package/dist/entities/mortgage-transition-event.entity.js +111 -0
- package/dist/entities/mortgage-transition-event.entity.js.map +1 -0
- package/dist/entities/mortgage-transition.entity.d.ts +25 -0
- package/dist/entities/mortgage-transition.entity.js +91 -0
- package/dist/entities/mortgage-transition.entity.js.map +1 -0
- package/dist/entities/mortgage-type.entity.js +6 -6
- package/dist/entities/mortgage-type.entity.js.map +1 -1
- package/dist/entities/password_reset_tokens.entity.js +2 -0
- package/dist/entities/password_reset_tokens.entity.js.map +1 -1
- package/dist/entities/payment-installment.entity.d.ts +39 -0
- package/dist/entities/payment-installment.entity.js +134 -0
- package/dist/entities/payment-installment.entity.js.map +1 -0
- package/dist/entities/payment-plan.entity.d.ts +62 -0
- package/dist/entities/payment-plan.entity.js +174 -0
- package/dist/entities/payment-plan.entity.js.map +1 -0
- package/dist/entities/payment-schedule.entity.d.ts +44 -0
- package/dist/entities/payment-schedule.entity.js +134 -0
- package/dist/entities/payment-schedule.entity.js.map +1 -0
- package/dist/entities/payment.entity.d.ts +55 -0
- package/dist/entities/payment.entity.js +157 -0
- package/dist/entities/payment.entity.js.map +1 -0
- package/dist/entities/permission.entity.js +1 -1
- package/dist/entities/permission.entity.js.map +1 -1
- package/dist/entities/property-document.entity.js +1 -1
- package/dist/entities/property-document.entity.js.map +1 -1
- package/dist/entities/property-media.entity.js +1 -0
- package/dist/entities/property-media.entity.js.map +1 -1
- package/dist/entities/property.entity.d.ts +5 -1
- package/dist/entities/property.entity.js +27 -10
- package/dist/entities/property.entity.js.map +1 -1
- package/dist/entities/refresh_token.entity.js +2 -2
- package/dist/entities/refresh_token.entity.js.map +1 -1
- package/dist/entities/role.entity.js +1 -1
- package/dist/entities/role.entity.js.map +1 -1
- package/dist/entities/settings.entity.js +9 -7
- package/dist/entities/settings.entity.js.map +1 -1
- package/dist/entities/social.entity.js +3 -1
- package/dist/entities/social.entity.js.map +1 -1
- package/dist/entities/tenant.entity.js +14 -14
- package/dist/entities/tenant.entity.js.map +1 -1
- package/dist/entities/transaction.entity.js +9 -6
- package/dist/entities/transaction.entity.js.map +1 -1
- package/dist/entities/user.entity.d.ts +2 -0
- package/dist/entities/user.entity.js +13 -7
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/entities/user_suspensions.entity.js +2 -0
- package/dist/entities/user_suspensions.entity.js.map +1 -1
- package/dist/entities/wallet.entity.js +2 -2
- package/dist/entities/wallet.entity.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/qr-code/qr-code.dto.d.ts +3 -0
- package/dist/qr-code/qr-code.dto.js +21 -0
- package/dist/qr-code/qr-code.dto.js.map +1 -0
- package/dist/qr-code/qr-code.module.d.ts +2 -0
- package/dist/qr-code/qr-code.module.js +24 -0
- package/dist/qr-code/qr-code.module.js.map +1 -0
- package/dist/qr-code/qr-code.service.d.ts +11 -0
- package/dist/qr-code/qr-code.service.js +99 -0
- package/dist/qr-code/qr-code.service.js.map +1 -0
- package/dist/qr-code/qr-code.type.d.ts +5 -0
- package/dist/qr-code/qr-code.type.js +3 -0
- package/dist/qr-code/qr-code.type.js.map +1 -0
- package/dist/services/notifications/src/common/common.entity.d.ts +6 -0
- package/dist/services/notifications/src/common/common.entity.js +37 -0
- package/dist/services/notifications/src/common/common.entity.js.map +1 -0
- package/dist/shared/common/OpenApiHelper.d.ts +9 -0
- package/dist/shared/common/OpenApiHelper.js +118 -0
- package/dist/shared/common/OpenApiHelper.js.map +1 -0
- package/dist/shared/common/decorator/index.d.ts +2 -0
- package/dist/shared/common/decorator/index.js +19 -0
- package/dist/shared/common/decorator/index.js.map +1 -0
- package/dist/shared/common/decorator/permission.decorator.d.ts +2 -0
- package/dist/shared/common/decorator/permission.decorator.js +6 -0
- package/dist/shared/common/decorator/permission.decorator.js.map +1 -0
- package/dist/shared/common/decorator/tenant.decorator.d.ts +2 -0
- package/dist/shared/common/decorator/tenant.decorator.js +13 -0
- package/dist/shared/common/decorator/tenant.decorator.js.map +1 -0
- package/dist/shared/common/entities/BaseEntity.d.ts +11 -0
- package/dist/shared/common/entities/BaseEntity.js +54 -0
- package/dist/shared/common/entities/BaseEntity.js.map +1 -0
- package/dist/shared/common/entities/TenantAwareEntity.d.ts +10 -0
- package/dist/shared/common/entities/TenantAwareEntity.js +52 -0
- package/dist/shared/common/entities/TenantAwareEntity.js.map +1 -0
- package/dist/shared/common/entities/TenantAwareRepository.d.ts +13 -0
- package/dist/shared/common/entities/TenantAwareRepository.js +65 -0
- package/dist/shared/common/entities/TenantAwareRepository.js.map +1 -0
- package/dist/shared/common/entities/amenity.entity.d.ts +4 -0
- package/dist/shared/common/entities/amenity.entity.js +28 -0
- package/dist/shared/common/entities/amenity.entity.js.map +1 -0
- package/dist/shared/common/entities/common.entity.d.ts +17 -0
- package/dist/shared/common/entities/common.entity.js +64 -0
- package/dist/shared/common/entities/common.entity.js.map +1 -0
- package/dist/shared/common/entities/common.pure.entity.d.ts +11 -0
- package/dist/shared/common/entities/common.pure.entity.js +52 -0
- package/dist/shared/common/entities/common.pure.entity.js.map +1 -0
- package/dist/shared/common/entities/contract-document.entity.d.ts +39 -0
- package/dist/shared/common/entities/contract-document.entity.js +115 -0
- package/dist/shared/common/entities/contract-document.entity.js.map +1 -0
- package/dist/shared/common/entities/contract.entity.d.ts +62 -0
- package/dist/shared/common/entities/contract.entity.js +191 -0
- package/dist/shared/common/entities/contract.entity.js.map +1 -0
- package/dist/shared/common/entities/device_endpoint.entity.d.ts +10 -0
- package/dist/shared/common/entities/device_endpoint.entity.js +50 -0
- package/dist/shared/common/entities/device_endpoint.entity.js.map +1 -0
- package/dist/shared/common/entities/email_preference.entity.d.ts +6 -0
- package/dist/shared/common/entities/email_preference.entity.js +42 -0
- package/dist/shared/common/entities/email_preference.entity.js.map +1 -0
- package/dist/shared/common/entities/index.d.ts +35 -0
- package/dist/shared/common/entities/index.js +52 -0
- package/dist/shared/common/entities/index.js.map +1 -0
- package/dist/shared/common/entities/mortgage-document.entity.d.ts +14 -0
- package/dist/shared/common/entities/mortgage-document.entity.js +58 -0
- package/dist/shared/common/entities/mortgage-document.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-downpayment-installment.entity.d.ts +19 -0
- package/dist/shared/common/entities/mortgage-downpayment-installment.entity.js +63 -0
- package/dist/shared/common/entities/mortgage-downpayment-installment.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-downpayment-payment.entity.d.ts +28 -0
- package/dist/shared/common/entities/mortgage-downpayment-payment.entity.js +84 -0
- package/dist/shared/common/entities/mortgage-downpayment-payment.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-downpayment.entity.d.ts +22 -0
- package/dist/shared/common/entities/mortgage-downpayment.entity.js +66 -0
- package/dist/shared/common/entities/mortgage-downpayment.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-step.entity.d.ts +12 -0
- package/dist/shared/common/entities/mortgage-step.entity.js +52 -0
- package/dist/shared/common/entities/mortgage-step.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-transition-event.entity.d.ts +26 -0
- package/dist/shared/common/entities/mortgage-transition-event.entity.js +111 -0
- package/dist/shared/common/entities/mortgage-transition-event.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-transition.entity.d.ts +25 -0
- package/dist/shared/common/entities/mortgage-transition.entity.js +91 -0
- package/dist/shared/common/entities/mortgage-transition.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage-type.entity.d.ts +10 -0
- package/dist/shared/common/entities/mortgage-type.entity.js +46 -0
- package/dist/shared/common/entities/mortgage-type.entity.js.map +1 -0
- package/dist/shared/common/entities/mortgage.entity.d.ts +37 -0
- package/dist/shared/common/entities/mortgage.entity.js +124 -0
- package/dist/shared/common/entities/mortgage.entity.js.map +1 -0
- package/dist/shared/common/entities/password_reset_tokens.entity.d.ts +7 -0
- package/dist/shared/common/entities/password_reset_tokens.entity.js +45 -0
- package/dist/shared/common/entities/password_reset_tokens.entity.js.map +1 -0
- package/dist/shared/common/entities/payment-installment.entity.d.ts +39 -0
- package/dist/shared/common/entities/payment-installment.entity.js +134 -0
- package/dist/shared/common/entities/payment-installment.entity.js.map +1 -0
- package/dist/shared/common/entities/payment-plan.entity.d.ts +62 -0
- package/dist/shared/common/entities/payment-plan.entity.js +174 -0
- package/dist/shared/common/entities/payment-plan.entity.js.map +1 -0
- package/dist/shared/common/entities/payment-schedule.entity.d.ts +44 -0
- package/dist/shared/common/entities/payment-schedule.entity.js +134 -0
- package/dist/shared/common/entities/payment-schedule.entity.js.map +1 -0
- package/dist/shared/common/entities/payment.entity.d.ts +55 -0
- package/dist/shared/common/entities/payment.entity.js +157 -0
- package/dist/shared/common/entities/payment.entity.js.map +1 -0
- package/dist/shared/common/entities/permission.entity.d.ts +6 -0
- package/dist/shared/common/entities/permission.entity.js +30 -0
- package/dist/shared/common/entities/permission.entity.js.map +1 -0
- package/dist/shared/common/entities/property-document.entity.d.ts +6 -0
- package/dist/shared/common/entities/property-document.entity.js +34 -0
- package/dist/shared/common/entities/property-document.entity.js.map +1 -0
- package/dist/shared/common/entities/property-media.entity.d.ts +6 -0
- package/dist/shared/common/entities/property-media.entity.js +37 -0
- package/dist/shared/common/entities/property-media.entity.js.map +1 -0
- package/dist/shared/common/entities/property.entity.d.ts +39 -0
- package/dist/shared/common/entities/property.entity.js +193 -0
- package/dist/shared/common/entities/property.entity.js.map +1 -0
- package/dist/shared/common/entities/refresh_token.entity.d.ts +7 -0
- package/dist/shared/common/entities/refresh_token.entity.js +35 -0
- package/dist/shared/common/entities/refresh_token.entity.js.map +1 -0
- package/dist/shared/common/entities/role.entity.d.ts +8 -0
- package/dist/shared/common/entities/role.entity.js +39 -0
- package/dist/shared/common/entities/role.entity.js.map +1 -0
- package/dist/shared/common/entities/settings.entity.d.ts +17 -0
- package/dist/shared/common/entities/settings.entity.js +81 -0
- package/dist/shared/common/entities/settings.entity.js.map +1 -0
- package/dist/shared/common/entities/social.entity.d.ts +8 -0
- package/dist/shared/common/entities/social.entity.js +48 -0
- package/dist/shared/common/entities/social.entity.js.map +1 -0
- package/dist/shared/common/entities/tenant.entity.d.ts +29 -0
- package/dist/shared/common/entities/tenant.entity.js +82 -0
- package/dist/shared/common/entities/tenant.entity.js.map +1 -0
- package/dist/shared/common/entities/transaction.entity.d.ts +17 -0
- package/dist/shared/common/entities/transaction.entity.js +87 -0
- package/dist/shared/common/entities/transaction.entity.js.map +1 -0
- package/dist/shared/common/entities/user.entity.d.ts +26 -0
- package/dist/shared/common/entities/user.entity.js +104 -0
- package/dist/shared/common/entities/user.entity.js.map +1 -0
- package/dist/shared/common/entities/user_suspensions.entity.d.ts +7 -0
- package/dist/shared/common/entities/user_suspensions.entity.js +44 -0
- package/dist/shared/common/entities/user_suspensions.entity.js.map +1 -0
- package/dist/shared/common/entities/wallet.entity.d.ts +17 -0
- package/dist/shared/common/entities/wallet.entity.js +79 -0
- package/dist/shared/common/entities/wallet.entity.js.map +1 -0
- package/dist/shared/common/guard/index.d.ts +2 -0
- package/dist/shared/common/guard/index.js +19 -0
- package/dist/shared/common/guard/index.js.map +1 -0
- package/dist/shared/common/guard/permission.guard.d.ts +10 -0
- package/dist/shared/common/guard/permission.guard.js +47 -0
- package/dist/shared/common/guard/permission.guard.js.map +1 -0
- package/dist/shared/common/guard/swagger-auth.guard.d.ts +1 -0
- package/dist/shared/common/guard/swagger-auth.guard.js +9 -0
- package/dist/shared/common/guard/swagger-auth.guard.js.map +1 -0
- package/dist/shared/common/helpers/ArrayHelper.d.ts +2 -0
- package/dist/shared/common/helpers/ArrayHelper.js +6 -0
- package/dist/shared/common/helpers/ArrayHelper.js.map +1 -0
- package/dist/shared/common/helpers/ConstantHelper.d.ts +36 -0
- package/dist/shared/common/helpers/ConstantHelper.js +90 -0
- package/dist/shared/common/helpers/ConstantHelper.js.map +1 -0
- package/dist/shared/common/helpers/CustomNamingStrategy.d.ts +7 -0
- package/dist/shared/common/helpers/CustomNamingStrategy.js +22 -0
- package/dist/shared/common/helpers/CustomNamingStrategy.js.map +1 -0
- package/dist/shared/common/helpers/DateHelper.d.ts +3 -0
- package/dist/shared/common/helpers/DateHelper.js +20 -0
- package/dist/shared/common/helpers/DateHelper.js.map +1 -0
- package/dist/shared/common/helpers/EmailHelper.d.ts +4 -0
- package/dist/shared/common/helpers/EmailHelper.js +65 -0
- package/dist/shared/common/helpers/EmailHelper.js.map +1 -0
- package/dist/shared/common/helpers/FileSystemHelper.d.ts +15 -0
- package/dist/shared/common/helpers/FileSystemHelper.js +112 -0
- package/dist/shared/common/helpers/FileSystemHelper.js.map +1 -0
- package/dist/shared/common/helpers/index.d.ts +5 -0
- package/dist/shared/common/helpers/index.js +22 -0
- package/dist/shared/common/helpers/index.js.map +1 -0
- package/dist/shared/common/index.d.ts +9 -0
- package/dist/shared/common/index.js +26 -0
- package/dist/shared/common/index.js.map +1 -0
- package/dist/shared/common/middleware/AccessLoggerMiddleware.d.ts +6 -0
- package/dist/shared/common/middleware/AccessLoggerMiddleware.js +64 -0
- package/dist/shared/common/middleware/AccessLoggerMiddleware.js.map +1 -0
- package/dist/shared/common/middleware/AuthenticationMiddleware.d.ts +5 -0
- package/dist/shared/common/middleware/AuthenticationMiddleware.js +19 -0
- package/dist/shared/common/middleware/AuthenticationMiddleware.js.map +1 -0
- package/dist/shared/common/middleware/TenantMiddleware.d.ts +14 -0
- package/dist/shared/common/middleware/TenantMiddleware.js +49 -0
- package/dist/shared/common/middleware/TenantMiddleware.js.map +1 -0
- package/dist/shared/common/middleware/index.d.ts +3 -0
- package/dist/shared/common/middleware/index.js +20 -0
- package/dist/shared/common/middleware/index.js.map +1 -0
- package/dist/shared/common/pagination/index.d.ts +2 -0
- package/dist/shared/common/pagination/index.js +19 -0
- package/dist/shared/common/pagination/index.js.map +1 -0
- package/dist/shared/common/pagination/pagination.helper.d.ts +7 -0
- package/dist/shared/common/pagination/pagination.helper.js +40 -0
- package/dist/shared/common/pagination/pagination.helper.js.map +1 -0
- package/dist/shared/common/pagination/pagination.types.d.ts +19 -0
- package/dist/shared/common/pagination/pagination.types.js +3 -0
- package/dist/shared/common/pagination/pagination.types.js.map +1 -0
- package/dist/shared/common/standard-response.d.ts +7 -0
- package/dist/shared/common/standard-response.js +27 -0
- package/dist/shared/common/standard-response.js.map +1 -0
- package/dist/shared/common/types/common.type.d.ts +54 -0
- package/dist/shared/common/types/common.type.js +55 -0
- package/dist/shared/common/types/common.type.js.map +1 -0
- package/dist/shared/common/types/index.d.ts +8 -0
- package/dist/shared/common/types/index.js +25 -0
- package/dist/shared/common/types/index.js.map +1 -0
- package/dist/shared/common/types/mortgage-fsm.type.d.ts +180 -0
- package/dist/shared/common/types/mortgage-fsm.type.js +130 -0
- package/dist/shared/common/types/mortgage-fsm.type.js.map +1 -0
- package/dist/shared/common/types/permission.type.d.ts +42 -0
- package/dist/shared/common/types/permission.type.js +47 -0
- package/dist/shared/common/types/permission.type.js.map +1 -0
- package/dist/shared/common/types/policy.type.d.ts +18 -0
- package/dist/shared/common/types/policy.type.js +3 -0
- package/dist/shared/common/types/policy.type.js.map +1 -0
- package/dist/shared/common/types/property.type.d.ts +9 -0
- package/dist/shared/common/types/property.type.js +15 -0
- package/dist/shared/common/types/property.type.js.map +1 -0
- package/dist/shared/common/types/tenant.type.d.ts +13 -0
- package/dist/shared/common/types/tenant.type.js +19 -0
- package/dist/shared/common/types/tenant.type.js.map +1 -0
- package/dist/shared/common/types/transaction.type.d.ts +8 -0
- package/dist/shared/common/types/transaction.type.js +14 -0
- package/dist/shared/common/types/transaction.type.js.map +1 -0
- package/dist/shared/common/types/user.type.d.ts +10 -0
- package/dist/shared/common/types/user.type.js +16 -0
- package/dist/shared/common/types/user.type.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/common.type.d.ts +16 -3
- package/dist/types/common.type.js +13 -1
- package/dist/types/common.type.js.map +1 -1
- package/package.json +13 -11
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MortgageTransitionEvent = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const mortgage_fsm_type_1 = require("../types/mortgage-fsm.type");
|
|
15
|
+
const mortgage_transition_entity_1 = require("./mortgage-transition.entity");
|
|
16
|
+
let MortgageTransitionEvent = class MortgageTransitionEvent {
|
|
17
|
+
};
|
|
18
|
+
exports.MortgageTransitionEvent = MortgageTransitionEvent;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], MortgageTransitionEvent.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(() => mortgage_transition_entity_1.MortgageTransition, { onDelete: 'CASCADE' }),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'transition_id' }),
|
|
26
|
+
__metadata("design:type", mortgage_transition_entity_1.MortgageTransition)
|
|
27
|
+
], MortgageTransitionEvent.prototype, "transition", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ name: 'transition_id' }),
|
|
30
|
+
(0, typeorm_1.Index)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], MortgageTransitionEvent.prototype, "transitionId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], MortgageTransitionEvent.prototype, "action", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0, name: 'execution_order' }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], MortgageTransitionEvent.prototype, "executionOrder", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: 'pending' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], MortgageTransitionEvent.prototype, "status", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], MortgageTransitionEvent.prototype, "payload", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
51
|
+
__metadata("design:type", Object)
|
|
52
|
+
], MortgageTransitionEvent.prototype, "result", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], MortgageTransitionEvent.prototype, "error", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'error_stack' }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], MortgageTransitionEvent.prototype, "errorStack", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true, unique: true, name: 'idempotency_key' }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], MortgageTransitionEvent.prototype, "idempotencyKey", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0, name: 'retry_count' }),
|
|
67
|
+
__metadata("design:type", Number)
|
|
68
|
+
], MortgageTransitionEvent.prototype, "retryCount", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'int', default: 3, name: 'max_retries' }),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], MortgageTransitionEvent.prototype, "maxRetries", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true, name: 'next_retry_at' }),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], MortgageTransitionEvent.prototype, "nextRetryAt", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true, name: 'duration_ms' }),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], MortgageTransitionEvent.prototype, "durationMs", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], MortgageTransitionEvent.prototype, "createdAt", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true, name: 'started_at' }),
|
|
87
|
+
__metadata("design:type", Date)
|
|
88
|
+
], MortgageTransitionEvent.prototype, "startedAt", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true, name: 'completed_at' }),
|
|
91
|
+
__metadata("design:type", Date)
|
|
92
|
+
], MortgageTransitionEvent.prototype, "completedAt", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ default: false, name: 'rolled_back' }),
|
|
95
|
+
__metadata("design:type", Boolean)
|
|
96
|
+
], MortgageTransitionEvent.prototype, "rolledBack", void 0);
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true, name: 'rolled_back_at' }),
|
|
99
|
+
__metadata("design:type", Date)
|
|
100
|
+
], MortgageTransitionEvent.prototype, "rolledBackAt", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'rollback_error' }),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], MortgageTransitionEvent.prototype, "rollbackError", void 0);
|
|
105
|
+
exports.MortgageTransitionEvent = MortgageTransitionEvent = __decorate([
|
|
106
|
+
(0, typeorm_1.Entity)({ name: 'mortgage_transition_events' }),
|
|
107
|
+
(0, typeorm_1.Index)(['transitionId', 'executionOrder']),
|
|
108
|
+
(0, typeorm_1.Index)(['status', 'createdAt'])
|
|
109
|
+
], MortgageTransitionEvent);
|
|
110
|
+
exports.default = MortgageTransitionEvent;
|
|
111
|
+
//# sourceMappingURL=mortgage-transition-event.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mortgage-transition-event.entity.js","sourceRoot":"","sources":["../../../../entities/mortgage-transition-event.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiH;AACjH,kEAA4D;AAC5D,6EAAkE;AAS3D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;CAqEnC,CAAA;AArEY,0DAAuB;AAEhC;IADC,IAAA,gCAAsB,GAAE;;mDACd;AAIX;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+CAAkB,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC5D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;8BAC1B,+CAAkB;2DAAC;AAI/B;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACjC,IAAA,eAAK,GAAE;;6DACa;AAGrB;IADC,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import { Mortgage } from './mortgage.entity';
|
|
3
|
+
export declare class MortgageTransition {
|
|
4
|
+
id: number;
|
|
5
|
+
mortgage: Mortgage;
|
|
6
|
+
mortgageId: number;
|
|
7
|
+
fromState: MortgageState;
|
|
8
|
+
toState: MortgageState;
|
|
9
|
+
event: MortgageEvent;
|
|
10
|
+
context: any;
|
|
11
|
+
triggeredBy: string;
|
|
12
|
+
triggeredByType: string;
|
|
13
|
+
success: boolean;
|
|
14
|
+
error: string;
|
|
15
|
+
errorStack: string;
|
|
16
|
+
guardsChecked: Array<{
|
|
17
|
+
name: string;
|
|
18
|
+
passed: boolean;
|
|
19
|
+
message?: string;
|
|
20
|
+
}>;
|
|
21
|
+
durationMs: number;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
completedAt: Date;
|
|
24
|
+
}
|
|
25
|
+
export default MortgageTransition;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MortgageTransition = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const mortgage_fsm_type_1 = require("../types/mortgage-fsm.type");
|
|
15
|
+
const mortgage_entity_1 = require("./mortgage.entity");
|
|
16
|
+
let MortgageTransition = class MortgageTransition {
|
|
17
|
+
};
|
|
18
|
+
exports.MortgageTransition = MortgageTransition;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], MortgageTransition.prototype, "id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(() => mortgage_entity_1.Mortgage),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'mortgage_id' }),
|
|
26
|
+
__metadata("design:type", mortgage_entity_1.Mortgage)
|
|
27
|
+
], MortgageTransition.prototype, "mortgage", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ name: 'mortgage_id' }),
|
|
30
|
+
(0, typeorm_1.Index)(),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], MortgageTransition.prototype, "mortgageId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'varchar', name: 'from_state' }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], MortgageTransition.prototype, "fromState", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'varchar', name: 'to_state' }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], MortgageTransition.prototype, "toState", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'varchar' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], MortgageTransition.prototype, "event", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], MortgageTransition.prototype, "context", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'varchar', name: 'triggered_by' }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], MortgageTransition.prototype, "triggeredBy", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true, name: 'triggered_by_type' }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], MortgageTransition.prototype, "triggeredByType", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ default: true }),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], MortgageTransition.prototype, "success", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], MortgageTransition.prototype, "error", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true, name: 'error_stack' }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], MortgageTransition.prototype, "errorStack", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ type: 'json', nullable: true, name: 'guards_checked' }),
|
|
71
|
+
__metadata("design:type", Array)
|
|
72
|
+
], MortgageTransition.prototype, "guardsChecked", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true, name: 'duration_ms' }),
|
|
75
|
+
__metadata("design:type", Number)
|
|
76
|
+
], MortgageTransition.prototype, "durationMs", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
|
|
79
|
+
__metadata("design:type", Date)
|
|
80
|
+
], MortgageTransition.prototype, "createdAt", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true, name: 'completed_at' }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], MortgageTransition.prototype, "completedAt", void 0);
|
|
85
|
+
exports.MortgageTransition = MortgageTransition = __decorate([
|
|
86
|
+
(0, typeorm_1.Entity)({ name: 'mortgage_transitions' }),
|
|
87
|
+
(0, typeorm_1.Index)(['fromState', 'event']),
|
|
88
|
+
(0, typeorm_1.Index)(['mortgageId', 'createdAt'])
|
|
89
|
+
], MortgageTransition);
|
|
90
|
+
exports.default = MortgageTransition;
|
|
91
|
+
//# sourceMappingURL=mortgage-transition.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mortgage-transition.entity.js","sourceRoot":"","sources":["../../../../entities/mortgage-transition.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiH;AACjH,kEAA0E;AAC1E,uDAA6C;AAStC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAoD9B,CAAA;AApDY,gDAAkB;AAE3B;IADC,IAAA,gCAAsB,GAAE;;8CACd;AAIX;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,CAAC;IACzB,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAC1B,0BAAQ;oDAAC;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC/B,IAAA,eAAK,GAAE;;sDACW;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;;qDACvB;AAGzB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;;mDACvB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iDACP;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAA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,10 @@
|
|
|
1
|
+
import { AbstractBaseReviewableEntity } from './common.entity';
|
|
2
|
+
export declare class MortgageType extends AbstractBaseReviewableEntity {
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultSteps?: any[];
|
|
7
|
+
requiredDocuments?: any[];
|
|
8
|
+
config?: any;
|
|
9
|
+
}
|
|
10
|
+
export default MortgageType;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MortgageType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const common_entity_1 = require("./common.entity");
|
|
15
|
+
let MortgageType = class MortgageType extends common_entity_1.AbstractBaseReviewableEntity {
|
|
16
|
+
};
|
|
17
|
+
exports.MortgageType = MortgageType;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.Column)({ name: 'name' }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], MortgageType.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ name: 'slug', nullable: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], MortgageType.prototype, "slug", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ name: 'description', type: 'text', nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], MortgageType.prototype, "description", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ name: 'default_steps', type: 'json', nullable: true }),
|
|
32
|
+
__metadata("design:type", Array)
|
|
33
|
+
], MortgageType.prototype, "defaultSteps", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ name: 'required_documents', type: 'json', nullable: true }),
|
|
36
|
+
__metadata("design:type", Array)
|
|
37
|
+
], MortgageType.prototype, "requiredDocuments", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ name: 'config', type: 'json', nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], MortgageType.prototype, "config", void 0);
|
|
42
|
+
exports.MortgageType = MortgageType = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: 'mortgage_type' })
|
|
44
|
+
], MortgageType);
|
|
45
|
+
exports.default = MortgageType;
|
|
46
|
+
//# sourceMappingURL=mortgage-type.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mortgage-type.entity.js","sourceRoot":"","sources":["../../../../entities/mortgage-type.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,mDAA+D;AASxD,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,4CAA4B;CAkB7D,CAAA;AAlBY,oCAAY;AAErB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0CACZ;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACzC;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAC3C;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uDAC3C;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAC5C;uBAjBJ,YAAY;IADxB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;GACrB,YAAY,CAkBxB;AAED,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AbstractBaseReviewableEntity } from './common.entity';
|
|
2
|
+
import { Property } from './property.entity';
|
|
3
|
+
import { User } from './user.entity';
|
|
4
|
+
import MortgageDocument from './mortgage-document.entity';
|
|
5
|
+
import MortgageStep from './mortgage-step.entity';
|
|
6
|
+
import { MortgageType } from './mortgage-type.entity';
|
|
7
|
+
import { MortgageDownpaymentPlan } from './mortgage-downpayment.entity';
|
|
8
|
+
export declare enum MortgageStatus {
|
|
9
|
+
DRAFT = "DRAFT",
|
|
10
|
+
PENDING = "PENDING",
|
|
11
|
+
ACTIVE = "ACTIVE",
|
|
12
|
+
COMPLETED = "COMPLETED",
|
|
13
|
+
CANCELLED = "CANCELLED"
|
|
14
|
+
}
|
|
15
|
+
export declare class Mortgage extends AbstractBaseReviewableEntity {
|
|
16
|
+
property: Property;
|
|
17
|
+
propertyId: number;
|
|
18
|
+
borrower: User;
|
|
19
|
+
borrowerId: number;
|
|
20
|
+
principal: number;
|
|
21
|
+
downPayment: number;
|
|
22
|
+
termMonths: number;
|
|
23
|
+
interestRate: number;
|
|
24
|
+
monthlyPayment: number;
|
|
25
|
+
status: MortgageStatus;
|
|
26
|
+
state: string;
|
|
27
|
+
stateMetadata: string;
|
|
28
|
+
documents: MortgageDocument[];
|
|
29
|
+
steps: MortgageStep[];
|
|
30
|
+
mortgageType: MortgageType;
|
|
31
|
+
mortgageTypeId: number;
|
|
32
|
+
lastReminderSentAt: Date;
|
|
33
|
+
downpaymentPlan: MortgageDownpaymentPlan;
|
|
34
|
+
downpaymentPlanId: number;
|
|
35
|
+
downPaymentPaid: number;
|
|
36
|
+
}
|
|
37
|
+
export default Mortgage;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.Mortgage = exports.MortgageStatus = void 0;
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const common_entity_1 = require("./common.entity");
|
|
18
|
+
const property_entity_1 = require("./property.entity");
|
|
19
|
+
const user_entity_1 = require("./user.entity");
|
|
20
|
+
const mortgage_document_entity_1 = __importDefault(require("./mortgage-document.entity"));
|
|
21
|
+
const mortgage_step_entity_1 = __importDefault(require("./mortgage-step.entity"));
|
|
22
|
+
const mortgage_type_entity_1 = require("./mortgage-type.entity");
|
|
23
|
+
const mortgage_downpayment_entity_1 = require("./mortgage-downpayment.entity");
|
|
24
|
+
const mortgage_fsm_type_1 = require("../types/mortgage-fsm.type");
|
|
25
|
+
var MortgageStatus;
|
|
26
|
+
(function (MortgageStatus) {
|
|
27
|
+
MortgageStatus["DRAFT"] = "DRAFT";
|
|
28
|
+
MortgageStatus["PENDING"] = "PENDING";
|
|
29
|
+
MortgageStatus["ACTIVE"] = "ACTIVE";
|
|
30
|
+
MortgageStatus["COMPLETED"] = "COMPLETED";
|
|
31
|
+
MortgageStatus["CANCELLED"] = "CANCELLED";
|
|
32
|
+
})(MortgageStatus || (exports.MortgageStatus = MortgageStatus = {}));
|
|
33
|
+
let Mortgage = class Mortgage extends common_entity_1.AbstractBaseReviewableEntity {
|
|
34
|
+
};
|
|
35
|
+
exports.Mortgage = Mortgage;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => property_entity_1.Property, (property) => property.mortgages, { onDelete: 'CASCADE' }),
|
|
38
|
+
(0, typeorm_1.JoinColumn)({ name: 'property_id' }),
|
|
39
|
+
__metadata("design:type", property_entity_1.Property)
|
|
40
|
+
], Mortgage.prototype, "property", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'property_id', nullable: true }),
|
|
43
|
+
__metadata("design:type", Number)
|
|
44
|
+
], Mortgage.prototype, "propertyId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, { nullable: true }),
|
|
47
|
+
(0, typeorm_1.JoinColumn)({ name: 'borrower_id' }),
|
|
48
|
+
__metadata("design:type", user_entity_1.User)
|
|
49
|
+
], Mortgage.prototype, "borrower", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ name: 'borrower_id', nullable: true }),
|
|
52
|
+
__metadata("design:type", Number)
|
|
53
|
+
], Mortgage.prototype, "borrowerId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'double precision', nullable: true }),
|
|
56
|
+
__metadata("design:type", Number)
|
|
57
|
+
], Mortgage.prototype, "principal", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ name: 'down_payment', type: 'double precision', nullable: true }),
|
|
60
|
+
__metadata("design:type", Number)
|
|
61
|
+
], Mortgage.prototype, "downPayment", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ name: 'term_months', type: 'int', nullable: true }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], Mortgage.prototype, "termMonths", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ name: 'interest_rate', type: 'double precision', nullable: true }),
|
|
68
|
+
__metadata("design:type", Number)
|
|
69
|
+
], Mortgage.prototype, "interestRate", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ name: 'monthly_payment', type: 'double precision', nullable: true }),
|
|
72
|
+
__metadata("design:type", Number)
|
|
73
|
+
], Mortgage.prototype, "monthlyPayment", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: MortgageStatus, default: MortgageStatus.DRAFT }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], Mortgage.prototype, "status", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: 'varchar', default: mortgage_fsm_type_1.MortgageState.DRAFT }),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], Mortgage.prototype, "state", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ name: 'state_metadata', type: 'text', nullable: true }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], Mortgage.prototype, "stateMetadata", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, typeorm_1.OneToMany)(() => mortgage_document_entity_1.default, (doc) => doc.mortgage),
|
|
88
|
+
__metadata("design:type", Array)
|
|
89
|
+
], Mortgage.prototype, "documents", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, typeorm_1.OneToMany)(() => mortgage_step_entity_1.default, (step) => step.mortgage, { cascade: true }),
|
|
92
|
+
__metadata("design:type", Array)
|
|
93
|
+
], Mortgage.prototype, "steps", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, typeorm_1.ManyToOne)(() => mortgage_type_entity_1.MortgageType, { nullable: true }),
|
|
96
|
+
(0, typeorm_1.JoinColumn)({ name: 'mortgage_type_id' }),
|
|
97
|
+
__metadata("design:type", mortgage_type_entity_1.MortgageType)
|
|
98
|
+
], Mortgage.prototype, "mortgageType", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
(0, typeorm_1.Column)({ name: 'mortgage_type_id', nullable: true }),
|
|
101
|
+
__metadata("design:type", Number)
|
|
102
|
+
], Mortgage.prototype, "mortgageTypeId", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, typeorm_1.Column)({ name: 'last_reminder_sent_at', type: 'timestamp', nullable: true }),
|
|
105
|
+
__metadata("design:type", Date)
|
|
106
|
+
], Mortgage.prototype, "lastReminderSentAt", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, typeorm_1.OneToOne)(() => mortgage_downpayment_entity_1.MortgageDownpaymentPlan, { nullable: true }),
|
|
109
|
+
(0, typeorm_1.JoinColumn)({ name: 'downpayment_plan_id' }),
|
|
110
|
+
__metadata("design:type", mortgage_downpayment_entity_1.MortgageDownpaymentPlan)
|
|
111
|
+
], Mortgage.prototype, "downpaymentPlan", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, typeorm_1.Column)({ name: 'downpayment_plan_id', nullable: true }),
|
|
114
|
+
__metadata("design:type", Number)
|
|
115
|
+
], Mortgage.prototype, "downpaymentPlanId", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, typeorm_1.Column)({ name: 'down_payment_paid', type: 'double precision', nullable: true }),
|
|
118
|
+
__metadata("design:type", Number)
|
|
119
|
+
], Mortgage.prototype, "downPaymentPaid", void 0);
|
|
120
|
+
exports.Mortgage = Mortgage = __decorate([
|
|
121
|
+
(0, typeorm_1.Entity)({ name: 'mortgage' })
|
|
122
|
+
], Mortgage);
|
|
123
|
+
exports.default = Mortgage;
|
|
124
|
+
//# sourceMappingURL=mortgage.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mortgage.entity.js","sourceRoot":"","sources":["../../../../entities/mortgage.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAqF;AACrF,mDAA+D;AAC/D,uDAA6C;AAC7C,+CAAqC;AACrC,0FAA0D;AAC1D,kFAAkD;AAClD,iEAAsD;AACtD,+EAAwE;AACxE,kEAA2D;AAG3D,IAAY,cAMX;AAND,WAAY,cAAc;IACtB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,yCAAuB,CAAA;AAC3B,CAAC,EANW,cAAc,8BAAd,cAAc,QAMzB;AAGM,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,4CAA4B;CAkEzD,CAAA;AAlEY,4BAAQ;AAGjB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACpF,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;8BAC1B,0BAAQ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EAAE,IAAI,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACxD;mBAjEf,QAAQ;IADpB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;GAChB,QAAQ,CAkEpB;AAED,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PasswordResetToken = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const user_entity_1 = require("./user.entity");
|
|
15
|
+
const BaseEntity_1 = require("./BaseEntity");
|
|
16
|
+
let PasswordResetToken = class PasswordResetToken extends BaseEntity_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
exports.PasswordResetToken = PasswordResetToken;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.OneToOne)(() => user_entity_1.User, {
|
|
21
|
+
onDelete: 'CASCADE',
|
|
22
|
+
onUpdate: 'CASCADE',
|
|
23
|
+
}),
|
|
24
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
25
|
+
__metadata("design:type", user_entity_1.User)
|
|
26
|
+
], PasswordResetToken.prototype, "user", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({
|
|
29
|
+
name: 'token_hash',
|
|
30
|
+
nullable: true
|
|
31
|
+
}),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PasswordResetToken.prototype, "tokenHash", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.DeleteDateColumn)({
|
|
36
|
+
name: 'expires_at',
|
|
37
|
+
nullable: true,
|
|
38
|
+
default: null
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", Date)
|
|
41
|
+
], PasswordResetToken.prototype, "expiresAt", void 0);
|
|
42
|
+
exports.PasswordResetToken = PasswordResetToken = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)({ name: 'password_reset_token' })
|
|
44
|
+
], PasswordResetToken);
|
|
45
|
+
//# sourceMappingURL=password_reset_tokens.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password_reset_tokens.entity.js","sourceRoot":"","sources":["../../../../entities/password_reset_tokens.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiF;AACjF,+CAAqC;AACrC,6CAA0C;AAGnC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,uBAAU;CAqBjD,CAAA;AArBY,gDAAkB;AAO7B;IANC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QAEpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAC1B,kBAAI;gDAAC;AAMX;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,IAAI;KACf,CAAC;;qDACe;AAOjB;IALC,IAAA,0BAAgB,EAAC;QAChB,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACd,CAAC;8BACS,IAAI;qDAAC;6BApBL,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;GAC5B,kBAAkB,CAqB9B"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { AbstractBaseEntity } from './common.pure.entity';
|
|
2
|
+
import { PaymentSchedule } from './payment-schedule.entity';
|
|
3
|
+
import Payment from './payment.entity';
|
|
4
|
+
export declare enum InstallmentStatus {
|
|
5
|
+
PENDING = "PENDING",
|
|
6
|
+
PARTIAL = "PARTIAL",
|
|
7
|
+
PAID = "PAID",
|
|
8
|
+
OVERDUE = "OVERDUE",
|
|
9
|
+
LATE = "LATE",
|
|
10
|
+
WAIVED = "WAIVED",
|
|
11
|
+
DEFERRED = "DEFERRED"
|
|
12
|
+
}
|
|
13
|
+
export declare class PaymentInstallment extends AbstractBaseEntity {
|
|
14
|
+
schedule: PaymentSchedule;
|
|
15
|
+
scheduleId: number;
|
|
16
|
+
sequence: number;
|
|
17
|
+
name: string;
|
|
18
|
+
amountDue: number;
|
|
19
|
+
principalDue: number;
|
|
20
|
+
interestDue: number;
|
|
21
|
+
feesDue: number;
|
|
22
|
+
amountPaid: number;
|
|
23
|
+
principalPaid: number;
|
|
24
|
+
interestPaid: number;
|
|
25
|
+
feesPaid: number;
|
|
26
|
+
amountRemaining: number;
|
|
27
|
+
lateFee: number;
|
|
28
|
+
dueDate: Date;
|
|
29
|
+
gracePeriodEndDate: Date;
|
|
30
|
+
paidAt: Date;
|
|
31
|
+
firstPaymentAt: Date;
|
|
32
|
+
lastPaymentAt: Date;
|
|
33
|
+
status: InstallmentStatus;
|
|
34
|
+
isOverdue: boolean;
|
|
35
|
+
daysOverdue: number;
|
|
36
|
+
payments: Payment[];
|
|
37
|
+
metadata: any;
|
|
38
|
+
}
|
|
39
|
+
export default PaymentInstallment;
|