@attraccess/database-entities 0.0.16 → 1.2.0
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/package.json +4 -5
- package/src/index.d.ts +2 -0
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/lib/entities/attractap.entity.d.ts +15 -0
- package/src/lib/entities/attractap.entity.js +87 -0
- package/src/lib/entities/attractap.entity.js.map +1 -0
- package/src/lib/entities/billing-transaction-item.entity.d.ts +11 -0
- package/src/lib/entities/billing-transaction-item.entity.js +65 -0
- package/src/lib/entities/billing-transaction-item.entity.js.map +1 -0
- package/src/lib/entities/billing-transaction.entity.d.ts +25 -0
- package/src/lib/entities/billing-transaction.entity.js +121 -0
- package/src/lib/entities/billing-transaction.entity.js.map +1 -0
- package/src/lib/entities/email-template.entity.d.ts +15 -0
- package/src/lib/entities/email-template.entity.js +61 -0
- package/src/lib/entities/email-template.entity.js.map +1 -0
- package/src/lib/entities/mqttServer.entity.d.ts +3 -2
- package/src/lib/entities/mqttServer.entity.js +24 -5
- package/src/lib/entities/mqttServer.entity.js.map +1 -1
- package/src/lib/entities/nfcCard.entity.d.ts +12 -0
- package/src/lib/entities/nfcCard.entity.js +77 -0
- package/src/lib/entities/nfcCard.entity.js.map +1 -0
- package/src/lib/entities/resource-billing-configuration.entity.d.ts +10 -0
- package/src/lib/entities/resource-billing-configuration.entity.js +52 -0
- package/src/lib/entities/resource-billing-configuration.entity.js.map +1 -0
- package/src/lib/entities/resource.entity.d.ts +23 -10
- package/src/lib/entities/resource.entity.js +96 -34
- package/src/lib/entities/resource.entity.js.map +1 -1
- package/src/lib/entities/resource.maintenance.d.ts +11 -0
- package/src/lib/entities/resource.maintenance.js +78 -0
- package/src/lib/entities/resource.maintenance.js.map +1 -0
- package/src/lib/entities/resource.type.d.ts +4 -0
- package/src/lib/entities/resource.type.js +9 -0
- package/src/lib/entities/resource.type.js.map +1 -0
- package/src/lib/entities/resourceFlowEdge.d.ts +12 -0
- package/src/lib/entities/resourceFlowEdge.js +86 -0
- package/src/lib/entities/resourceFlowEdge.js.map +1 -0
- package/src/lib/entities/resourceFlowLog.d.ts +18 -0
- package/src/lib/entities/resourceFlowLog.js +94 -0
- package/src/lib/entities/resourceFlowLog.js.map +1 -0
- package/src/lib/entities/resourceFlowNode.d.ts +161 -0
- package/src/lib/entities/resourceFlowNode.js +257 -0
- package/src/lib/entities/resourceFlowNode.js.map +1 -0
- package/src/lib/entities/resourceGroup.entity.d.ts +2 -2
- package/src/lib/entities/resourceGroup.entity.js +3 -3
- package/src/lib/entities/resourceGroup.entity.js.map +1 -1
- package/src/lib/entities/{resourceIntroductionUser.entity.d.ts → resourceIntroducer.entity.d.ts} +5 -4
- package/src/lib/entities/{resourceIntroductionUser.entity.js → resourceIntroducer.entity.js} +27 -17
- package/src/lib/entities/resourceIntroducer.entity.js.map +1 -0
- package/src/lib/entities/resourceIntroduction.entity.d.ts +2 -1
- package/src/lib/entities/resourceIntroduction.entity.js +14 -4
- package/src/lib/entities/resourceIntroduction.entity.js.map +1 -1
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.d.ts +1 -1
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.js +3 -3
- package/src/lib/entities/resourceIntroductionHistoryItem.entity.js.map +1 -1
- package/src/lib/entities/resourceUsage.entity.d.ts +4 -0
- package/src/lib/entities/resourceUsage.entity.js +24 -2
- package/src/lib/entities/resourceUsage.entity.js.map +1 -1
- package/src/lib/entities/resourceUsage.type.d.ts +6 -0
- package/src/lib/entities/resourceUsage.type.js +11 -0
- package/src/lib/entities/resourceUsage.type.js.map +1 -0
- package/src/lib/entities/revokedToken.entity.d.ts +0 -5
- package/src/lib/entities/revokedToken.entity.js +1 -29
- package/src/lib/entities/revokedToken.entity.js.map +1 -1
- package/src/lib/entities/session.entity.d.ts +12 -0
- package/src/lib/entities/session.entity.js +91 -0
- package/src/lib/entities/session.entity.js.map +1 -0
- package/src/lib/entities/setting.entity.d.ts +8 -0
- package/src/lib/entities/setting.entity.js +56 -0
- package/src/lib/entities/setting.entity.js.map +1 -0
- package/src/lib/entities/ssoProvider.oidc.d.ts +3 -0
- package/src/lib/entities/ssoProvider.oidc.js +27 -0
- package/src/lib/entities/ssoProvider.oidc.js.map +1 -1
- package/src/lib/entities/user.entity.d.ts +17 -4
- package/src/lib/entities/user.entity.js +79 -8
- package/src/lib/entities/user.entity.js.map +1 -1
- package/src/lib/entities-index.d.ts +30 -9
- package/src/lib/entities-index.js +61 -12
- package/src/lib/entities-index.js.map +1 -1
- package/src/lib/types/documentationType.enum.d.ts +7 -0
- package/src/lib/types/documentationType.enum.js +12 -0
- package/src/lib/types/documentationType.enum.js.map +1 -0
- package/src/lib/entities/mqttResourceConfig.entity.d.ts +0 -15
- package/src/lib/entities/mqttResourceConfig.entity.js +0 -95
- package/src/lib/entities/mqttResourceConfig.entity.js.map +0 -1
- package/src/lib/entities/resourceIntroductionUser.entity.js.map +0 -1
- package/src/lib/entities/webhookConfig.entity.d.ts +0 -20
- package/src/lib/entities/webhookConfig.entity.js +0 -148
- package/src/lib/entities/webhookConfig.entity.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@attraccess/database-entities",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -19,11 +19,10 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"tslib": "^2.3.0",
|
|
22
|
-
"typeorm": "0.3.
|
|
22
|
+
"typeorm": "0.3.26",
|
|
23
23
|
"@nestjs/swagger": "^11.2.0",
|
|
24
24
|
"class-transformer": "^0.5.1",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"class-validator": "^0.14.2"
|
|
25
|
+
"class-validator": "^0.14.2",
|
|
26
|
+
"zod": "^4.1.5"
|
|
28
27
|
}
|
|
29
28
|
}
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTemplateType = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
5
|
tslib_1.__exportStar(require("./lib/entities-index"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./lib/types/authenticationType.enum"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./lib/types/documentationType.enum"), exports);
|
|
8
|
+
var email_template_entity_1 = require("./lib/entities/email-template.entity");
|
|
9
|
+
Object.defineProperty(exports, "EmailTemplateType", { enumerable: true, get: function () { return email_template_entity_1.EmailTemplateType; } });
|
|
6
10
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/database-entities/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/database-entities/src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAAqC;AACrC,8EAAoD;AACpD,6EAAmD;AACnD,8EAAyE;AAAhE,0HAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Resource } from './resource.entity';
|
|
2
|
+
export declare class AttractapFirmwareVersion {
|
|
3
|
+
name: string | null;
|
|
4
|
+
variant: string | null;
|
|
5
|
+
version: string | null;
|
|
6
|
+
}
|
|
7
|
+
export declare class Attractap {
|
|
8
|
+
id: number;
|
|
9
|
+
name: string;
|
|
10
|
+
apiTokenHash: string;
|
|
11
|
+
resources: Resource[];
|
|
12
|
+
lastConnection: Date;
|
|
13
|
+
firstConnection: Date;
|
|
14
|
+
firmware: AttractapFirmwareVersion;
|
|
15
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Attractap = exports.AttractapFirmwareVersion = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
const class_transformer_1 = require("class-transformer");
|
|
8
|
+
const resource_entity_1 = require("./resource.entity");
|
|
9
|
+
class AttractapFirmwareVersion {
|
|
10
|
+
}
|
|
11
|
+
exports.AttractapFirmwareVersion = AttractapFirmwareVersion;
|
|
12
|
+
tslib_1.__decorate([
|
|
13
|
+
(0, typeorm_1.Column)({
|
|
14
|
+
type: 'text',
|
|
15
|
+
nullable: true,
|
|
16
|
+
}),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], AttractapFirmwareVersion.prototype, "name", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.Column)({
|
|
21
|
+
type: 'text',
|
|
22
|
+
nullable: true,
|
|
23
|
+
}),
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
25
|
+
], AttractapFirmwareVersion.prototype, "variant", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({
|
|
28
|
+
type: 'text',
|
|
29
|
+
nullable: true,
|
|
30
|
+
}),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
32
|
+
], AttractapFirmwareVersion.prototype, "version", void 0);
|
|
33
|
+
let Attractap = class Attractap {
|
|
34
|
+
};
|
|
35
|
+
exports.Attractap = Attractap;
|
|
36
|
+
tslib_1.__decorate([
|
|
37
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
38
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the reader' }),
|
|
39
|
+
tslib_1.__metadata("design:type", Number)
|
|
40
|
+
], Attractap.prototype, "id", void 0);
|
|
41
|
+
tslib_1.__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({
|
|
43
|
+
type: 'text',
|
|
44
|
+
nullable: false,
|
|
45
|
+
}),
|
|
46
|
+
(0, swagger_1.ApiProperty)({ description: 'The name of the reader' }),
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
48
|
+
], Attractap.prototype, "name", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
type: 'text',
|
|
52
|
+
nullable: false,
|
|
53
|
+
}),
|
|
54
|
+
(0, class_transformer_1.Exclude)(),
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
56
|
+
], Attractap.prototype, "apiTokenHash", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, typeorm_1.ManyToMany)(() => resource_entity_1.Resource, (resource) => resource.attractapReaders),
|
|
59
|
+
(0, typeorm_1.JoinTable)(),
|
|
60
|
+
(0, swagger_1.ApiProperty)({ description: 'The resources that the reader has access to', type: () => resource_entity_1.Resource, isArray: true }),
|
|
61
|
+
tslib_1.__metadata("design:type", Array)
|
|
62
|
+
], Attractap.prototype, "resources", void 0);
|
|
63
|
+
tslib_1.__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({
|
|
65
|
+
type: 'datetime',
|
|
66
|
+
default: () => 'CURRENT_TIMESTAMP',
|
|
67
|
+
}),
|
|
68
|
+
(0, swagger_1.ApiProperty)({ description: 'The last time the reader connected to the server' }),
|
|
69
|
+
tslib_1.__metadata("design:type", Date)
|
|
70
|
+
], Attractap.prototype, "lastConnection", void 0);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({
|
|
73
|
+
type: 'datetime',
|
|
74
|
+
default: () => 'CURRENT_TIMESTAMP',
|
|
75
|
+
}),
|
|
76
|
+
(0, swagger_1.ApiProperty)({ description: 'The first time the reader connected to the server' }),
|
|
77
|
+
tslib_1.__metadata("design:type", Date)
|
|
78
|
+
], Attractap.prototype, "firstConnection", void 0);
|
|
79
|
+
tslib_1.__decorate([
|
|
80
|
+
(0, typeorm_1.Column)(() => AttractapFirmwareVersion, { prefix: 'firmware' }),
|
|
81
|
+
(0, swagger_1.ApiProperty)({ description: 'The firmware of the reader', type: () => AttractapFirmwareVersion }),
|
|
82
|
+
tslib_1.__metadata("design:type", AttractapFirmwareVersion)
|
|
83
|
+
], Attractap.prototype, "firmware", void 0);
|
|
84
|
+
exports.Attractap = Attractap = tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.Entity)()
|
|
86
|
+
], Attractap);
|
|
87
|
+
//# sourceMappingURL=attractap.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attractap.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/attractap.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwF;AACxF,6CAA8C;AAC9C,yDAA4C;AAC5C,uDAA6C;AAE7C,MAAa,wBAAwB;CAkBpC;AAlBD,4DAkBC;AAbC;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;sDACmB;AAMrB;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;yDACsB;AAMxB;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;yDACsB;AAInB,IAAM,SAAS,GAAf,MAAM,SAAS;CAyCrB,CAAA;AAzCY,8BAAS;AAGpB;IAFC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;;qCACzC;AAOZ;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,wBAAwB,EAAE,CAA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billingTransactionId: number;
|
|
5
|
+
billingTransaction: BillingTransaction;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
externalReference: string | null;
|
|
9
|
+
unitPrice: number;
|
|
10
|
+
quantity: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTransactionItem = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const billing_transaction_entity_1 = require("./billing-transaction.entity");
|
|
7
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
8
|
+
let BillingTransactionItem = class BillingTransactionItem {
|
|
9
|
+
};
|
|
10
|
+
exports.BillingTransactionItem = BillingTransactionItem;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
13
|
+
(0, swagger_1.ApiProperty)({ description: 'The unique identifier of the billing transaction item', example: 1 }),
|
|
14
|
+
tslib_1.__metadata("design:type", Number)
|
|
15
|
+
], BillingTransactionItem.prototype, "id", void 0);
|
|
16
|
+
tslib_1.__decorate([
|
|
17
|
+
(0, typeorm_1.Column)(),
|
|
18
|
+
(0, swagger_1.ApiProperty)({ description: 'The ID of the billing transaction', example: 1 }),
|
|
19
|
+
tslib_1.__metadata("design:type", Number)
|
|
20
|
+
], BillingTransactionItem.prototype, "billingTransactionId", void 0);
|
|
21
|
+
tslib_1.__decorate([
|
|
22
|
+
(0, typeorm_1.ManyToOne)(() => billing_transaction_entity_1.BillingTransaction, (billingTransaction) => billingTransaction.items, {
|
|
23
|
+
onDelete: 'CASCADE',
|
|
24
|
+
}),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'billingTransactionId' }),
|
|
26
|
+
(0, swagger_1.ApiProperty)({ description: 'The billing transaction', type: () => billing_transaction_entity_1.BillingTransaction }),
|
|
27
|
+
tslib_1.__metadata("design:type", billing_transaction_entity_1.BillingTransaction)
|
|
28
|
+
], BillingTransactionItem.prototype, "billingTransaction", void 0);
|
|
29
|
+
tslib_1.__decorate([
|
|
30
|
+
(0, typeorm_1.Column)(),
|
|
31
|
+
(0, swagger_1.ApiProperty)({ description: 'The name of the billing transaction item', example: 'Credit top-up' }),
|
|
32
|
+
tslib_1.__metadata("design:type", String)
|
|
33
|
+
], BillingTransactionItem.prototype, "name", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
+
(0, swagger_1.ApiProperty)({
|
|
37
|
+
description: 'The description of the billing transaction item',
|
|
38
|
+
example: 'Credit top-up for user 1',
|
|
39
|
+
nullable: true,
|
|
40
|
+
}),
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
42
|
+
], BillingTransactionItem.prototype, "description", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
+
(0, swagger_1.ApiProperty)({
|
|
46
|
+
description: 'The external reference of the billing transaction item',
|
|
47
|
+
example: '1234567890',
|
|
48
|
+
nullable: true,
|
|
49
|
+
}),
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
51
|
+
], BillingTransactionItem.prototype, "externalReference", void 0);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
54
|
+
(0, swagger_1.ApiProperty)({ description: 'The unit price of the billing transaction item', example: '100' }),
|
|
55
|
+
tslib_1.__metadata("design:type", Number)
|
|
56
|
+
], BillingTransactionItem.prototype, "unitPrice", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
59
|
+
(0, swagger_1.ApiProperty)({ description: 'The quantity of the billing transaction item', example: '100' }),
|
|
60
|
+
tslib_1.__metadata("design:type", Number)
|
|
61
|
+
], BillingTransactionItem.prototype, "quantity", void 0);
|
|
62
|
+
exports.BillingTransactionItem = BillingTransactionItem = tslib_1.__decorate([
|
|
63
|
+
(0, typeorm_1.Entity)()
|
|
64
|
+
], BillingTransactionItem);
|
|
65
|
+
//# sourceMappingURL=billing-transaction-item.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-transaction-item.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/billing-transaction-item.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAwF;AACxF,6EAAkE;AAClE,6CAA8C;AAGvC,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CA2ClC,CAAA;AA3CY,wDAAsB;AAGjC;IAFC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,uDAAuD,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;kDACtF;AAIZ;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mCAAmC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;oEAChD;AAO9B;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+CAAkB,EAAE,CAAC,kBAAkB,EAAE,EAAE,CAAC,kBAAkB,CAAC,KAAK,EAAE;QACrF,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;IAC5C,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,yBAAyB,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,+CAAkB,EAAE,CAAC;sCACnE,+CAAkB;kEAAC;AAIxC;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,0CAA0C,EAAE,OAAO,EAAE,eAAe,EAAE,CAAC;;oDACrF;AAQd;IANC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,iDAAiD;QAC9D,OAAO,EAAE,0BAA0B;QACnC,QAAQ,EAAE,IAAI;KACf,CAAC;;2DAC0B;AAQ5B;IANC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wDAAwD;QACrE,OAAO,EAAE,YAAY;QACrB,QAAQ,EAAE,IAAI;KACf,CAAC;;iEACgC;AAIlC;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gDAAgD,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yDAC5E;AAInB;IAFC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;wDAC3E;iCA1CP,sBAAsB;IADlC,IAAA,gBAAM,GAAE;GACI,sBAAsB,CA2ClC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { User } from './user.entity';
|
|
2
|
+
import { ResourceUsage } from './resourceUsage.entity';
|
|
3
|
+
import { BillingTransactionItem as BillingTransactionItems } from './billing-transaction-item.entity';
|
|
4
|
+
export declare enum BillingTransactionStatus {
|
|
5
|
+
Pending = "pending",
|
|
6
|
+
Completed = "completed",
|
|
7
|
+
Failed = "failed"
|
|
8
|
+
}
|
|
9
|
+
export declare class BillingTransaction {
|
|
10
|
+
id: number;
|
|
11
|
+
userId: number;
|
|
12
|
+
user: User;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
amount: number;
|
|
16
|
+
initiatorId: number | null;
|
|
17
|
+
initiator: User | null;
|
|
18
|
+
resourceUsageId: number | null;
|
|
19
|
+
resourceUsage: ResourceUsage | null;
|
|
20
|
+
refundOfId: number | null;
|
|
21
|
+
refundOf: BillingTransaction | null;
|
|
22
|
+
externalReference: string | null;
|
|
23
|
+
status: BillingTransactionStatus;
|
|
24
|
+
items: BillingTransactionItems[];
|
|
25
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingTransaction = exports.BillingTransactionStatus = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
const user_entity_1 = require("./user.entity");
|
|
8
|
+
const resourceUsage_entity_1 = require("./resourceUsage.entity");
|
|
9
|
+
const billing_transaction_item_entity_1 = require("./billing-transaction-item.entity");
|
|
10
|
+
var BillingTransactionStatus;
|
|
11
|
+
(function (BillingTransactionStatus) {
|
|
12
|
+
BillingTransactionStatus["Pending"] = "pending";
|
|
13
|
+
BillingTransactionStatus["Completed"] = "completed";
|
|
14
|
+
BillingTransactionStatus["Failed"] = "failed";
|
|
15
|
+
})(BillingTransactionStatus || (exports.BillingTransactionStatus = BillingTransactionStatus = {}));
|
|
16
|
+
let BillingTransaction = class BillingTransaction {
|
|
17
|
+
};
|
|
18
|
+
exports.BillingTransaction = BillingTransaction;
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
21
|
+
(0, swagger_1.ApiProperty)({
|
|
22
|
+
description: 'The unique identifier of the billing transaction',
|
|
23
|
+
example: 1,
|
|
24
|
+
}),
|
|
25
|
+
tslib_1.__metadata("design:type", Number)
|
|
26
|
+
], BillingTransaction.prototype, "id", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
description: 'The ID of the user',
|
|
31
|
+
example: 1,
|
|
32
|
+
}),
|
|
33
|
+
tslib_1.__metadata("design:type", Number)
|
|
34
|
+
], BillingTransaction.prototype, "userId", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.billingTransactions, {
|
|
37
|
+
onDelete: 'CASCADE',
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'userId' }),
|
|
40
|
+
(0, swagger_1.ApiProperty)({ description: 'The user who the billing transaction belongs to', type: () => user_entity_1.User }),
|
|
41
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
42
|
+
], BillingTransaction.prototype, "user", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
45
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the billing transaction was created' }),
|
|
46
|
+
tslib_1.__metadata("design:type", Date)
|
|
47
|
+
], BillingTransaction.prototype, "createdAt", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
50
|
+
(0, swagger_1.ApiProperty)({ description: 'The date and time the billing transaction was last updated' }),
|
|
51
|
+
tslib_1.__metadata("design:type", Date)
|
|
52
|
+
], BillingTransaction.prototype, "updatedAt", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, typeorm_1.Column)({ type: 'integer' }),
|
|
55
|
+
(0, swagger_1.ApiProperty)({ description: 'The credit amount of the billing transaction (negative for refunds/top-ups)' }),
|
|
56
|
+
tslib_1.__metadata("design:type", Number)
|
|
57
|
+
], BillingTransaction.prototype, "amount", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
60
|
+
(0, swagger_1.ApiProperty)({ description: 'The user ID of the user who caused the billing transaction' }),
|
|
61
|
+
tslib_1.__metadata("design:type", Number)
|
|
62
|
+
], BillingTransaction.prototype, "initiatorId", void 0);
|
|
63
|
+
tslib_1.__decorate([
|
|
64
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.initiatedBillingTransactions, {
|
|
65
|
+
onDelete: 'CASCADE',
|
|
66
|
+
}),
|
|
67
|
+
(0, typeorm_1.JoinColumn)({ name: 'initiatorId' }),
|
|
68
|
+
(0, swagger_1.ApiProperty)({ description: 'The user who initiated the billing transaction', type: () => user_entity_1.User }),
|
|
69
|
+
tslib_1.__metadata("design:type", user_entity_1.User)
|
|
70
|
+
], BillingTransaction.prototype, "initiator", void 0);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
73
|
+
(0, swagger_1.ApiProperty)({ description: 'The resource usage ID of the resource usage that caused the billing transaction' }),
|
|
74
|
+
tslib_1.__metadata("design:type", Number)
|
|
75
|
+
], BillingTransaction.prototype, "resourceUsageId", void 0);
|
|
76
|
+
tslib_1.__decorate([
|
|
77
|
+
(0, typeorm_1.OneToOne)(() => resourceUsage_entity_1.ResourceUsage, (resourceUsage) => resourceUsage.billingTransaction, {
|
|
78
|
+
onDelete: 'CASCADE',
|
|
79
|
+
}),
|
|
80
|
+
(0, typeorm_1.JoinColumn)({ name: 'resourceUsageId' }),
|
|
81
|
+
(0, swagger_1.ApiProperty)({ description: 'The resource usage that caused the billing transaction', type: () => resourceUsage_entity_1.ResourceUsage }),
|
|
82
|
+
tslib_1.__metadata("design:type", resourceUsage_entity_1.ResourceUsage)
|
|
83
|
+
], BillingTransaction.prototype, "resourceUsage", void 0);
|
|
84
|
+
tslib_1.__decorate([
|
|
85
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
86
|
+
(0, swagger_1.ApiProperty)({ description: 'The billing transaction ID of the billing transaction that is being refunded' }),
|
|
87
|
+
tslib_1.__metadata("design:type", Number)
|
|
88
|
+
], BillingTransaction.prototype, "refundOfId", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, typeorm_1.ManyToOne)(() => BillingTransaction, (billingTransaction) => billingTransaction.refundOf, {
|
|
91
|
+
onDelete: 'CASCADE',
|
|
92
|
+
}),
|
|
93
|
+
(0, typeorm_1.JoinColumn)({ name: 'refundOfId' }),
|
|
94
|
+
(0, swagger_1.ApiProperty)({ description: 'The billing transaction that is being refunded', type: () => BillingTransaction }),
|
|
95
|
+
tslib_1.__metadata("design:type", BillingTransaction)
|
|
96
|
+
], BillingTransaction.prototype, "refundOf", void 0);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
99
|
+
(0, swagger_1.ApiProperty)({ description: 'The external reference e.g. sumup transaction ID' }),
|
|
100
|
+
tslib_1.__metadata("design:type", String)
|
|
101
|
+
], BillingTransaction.prototype, "externalReference", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: 'simple-enum', enum: BillingTransactionStatus }),
|
|
104
|
+
(0, swagger_1.ApiProperty)({ description: 'The status of the billing transaction', enum: BillingTransactionStatus }),
|
|
105
|
+
tslib_1.__metadata("design:type", String)
|
|
106
|
+
], BillingTransaction.prototype, "status", void 0);
|
|
107
|
+
tslib_1.__decorate([
|
|
108
|
+
(0, typeorm_1.OneToMany)(() => billing_transaction_item_entity_1.BillingTransactionItem, (customItem) => customItem.billingTransaction, {
|
|
109
|
+
onDelete: 'CASCADE',
|
|
110
|
+
}),
|
|
111
|
+
(0, swagger_1.ApiProperty)({
|
|
112
|
+
description: 'The custom items of the billing transaction',
|
|
113
|
+
type: () => billing_transaction_item_entity_1.BillingTransactionItem,
|
|
114
|
+
isArray: true,
|
|
115
|
+
}),
|
|
116
|
+
tslib_1.__metadata("design:type", Array)
|
|
117
|
+
], BillingTransaction.prototype, "items", void 0);
|
|
118
|
+
exports.BillingTransaction = BillingTransaction = tslib_1.__decorate([
|
|
119
|
+
(0, typeorm_1.Entity)()
|
|
120
|
+
], BillingTransaction);
|
|
121
|
+
//# sourceMappingURL=billing-transaction.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-transaction.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/billing-transaction.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAUiB;AACjB,6CAA8C;AAC9C,+CAAqC;AACrC,iEAAuD;AACvD,uFAAsG;AAEtG,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mDAAuB,CAAA;IACvB,6CAAiB,CAAA;AACnB,CAAC,EAJW,wBAAwB,wCAAxB,wBAAwB,QAInC;AAGM,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAoF9B,CAAA;AApFY,gDAAkB;AAM7B;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kDAAkD;QAC/D,OAAO,EAAE,CAAC;KACX,CAAC;;8CACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,CAAC;KACX,CAAC;;kDACc;AAOhB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,mBAAmB,EAAE;QACzD,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC9B,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC;sCAC3F,kBAAI;gDAAC;AAIZ;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,qBAAW,EAAC,EAAE,WAAW,EA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AC,wDAAuB;QACnC,OAAO,EAAE,IAAI;KACd,CAAC;;iDACgC;6BAnFvB,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAoF9B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare enum EmailTemplateType {
|
|
2
|
+
VERIFY_EMAIL = "verify-email",
|
|
3
|
+
RESET_PASSWORD = "reset-password",
|
|
4
|
+
USERNAME_CHANGED = "username-changed",
|
|
5
|
+
PASSWORD_CHANGED = "password-changed",
|
|
6
|
+
RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY = "resource-usage-billing-transaction-summary"
|
|
7
|
+
}
|
|
8
|
+
export declare class EmailTemplate {
|
|
9
|
+
type: EmailTemplateType;
|
|
10
|
+
subject: string;
|
|
11
|
+
body: string;
|
|
12
|
+
variables: string[];
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailTemplate = exports.EmailTemplateType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
+
// Add enum for email template types
|
|
8
|
+
var EmailTemplateType;
|
|
9
|
+
(function (EmailTemplateType) {
|
|
10
|
+
EmailTemplateType["VERIFY_EMAIL"] = "verify-email";
|
|
11
|
+
EmailTemplateType["RESET_PASSWORD"] = "reset-password";
|
|
12
|
+
EmailTemplateType["USERNAME_CHANGED"] = "username-changed";
|
|
13
|
+
EmailTemplateType["PASSWORD_CHANGED"] = "password-changed";
|
|
14
|
+
EmailTemplateType["RESOURCE_USAGE_BILLING_TRANSACTION_SUMMARY"] = "resource-usage-billing-transaction-summary";
|
|
15
|
+
})(EmailTemplateType || (exports.EmailTemplateType = EmailTemplateType = {}));
|
|
16
|
+
let EmailTemplate = class EmailTemplate {
|
|
17
|
+
};
|
|
18
|
+
exports.EmailTemplate = EmailTemplate;
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)({
|
|
21
|
+
description: 'Template type/key used by the system',
|
|
22
|
+
example: 'verify-email',
|
|
23
|
+
enum: EmailTemplateType,
|
|
24
|
+
enumName: 'EmailTemplateType',
|
|
25
|
+
}),
|
|
26
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
27
|
+
type: 'varchar',
|
|
28
|
+
length: 255,
|
|
29
|
+
enum: EmailTemplateType,
|
|
30
|
+
}),
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
32
|
+
], EmailTemplate.prototype, "type", void 0);
|
|
33
|
+
tslib_1.__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({ description: 'Email subject line', example: 'Verify Your Email Address' }),
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
36
|
+
tslib_1.__metadata("design:type", String)
|
|
37
|
+
], EmailTemplate.prototype, "subject", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, swagger_1.ApiProperty)({ description: 'MJML content of the email body' }),
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'text' }),
|
|
41
|
+
tslib_1.__metadata("design:type", String)
|
|
42
|
+
], EmailTemplate.prototype, "body", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)({ description: 'Variables used in the email body', example: ['{{name}}', '{{url}}'] }),
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'simple-array' }),
|
|
46
|
+
tslib_1.__metadata("design:type", Array)
|
|
47
|
+
], EmailTemplate.prototype, "variables", void 0);
|
|
48
|
+
tslib_1.__decorate([
|
|
49
|
+
(0, swagger_1.ApiProperty)({ description: 'Timestamp of when the template was created' }),
|
|
50
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
51
|
+
tslib_1.__metadata("design:type", Date)
|
|
52
|
+
], EmailTemplate.prototype, "createdAt", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, swagger_1.ApiProperty)({ description: 'Timestamp of when the template was last updated' }),
|
|
55
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
56
|
+
tslib_1.__metadata("design:type", Date)
|
|
57
|
+
], EmailTemplate.prototype, "updatedAt", void 0);
|
|
58
|
+
exports.EmailTemplate = EmailTemplate = tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Entity)('email_templates')
|
|
60
|
+
], EmailTemplate);
|
|
61
|
+
//# sourceMappingURL=email-template.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-template.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/email-template.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAA4F;AAC5F,6CAA8C;AAE9C,oCAAoC;AACpC,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,0DAAqC,CAAA;IACrC,0DAAqC,CAAA;IACrC,8GAAyF,CAAA;AAC3F,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAiCzB,CAAA;AAjCY,sCAAa;AAYxB;IAXC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,sCAAsC;QACnD,OAAO,EAAE,cAAc;QACvB,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,mBAAmB;KAC9B,CAAC;IACD,IAAA,uBAAa,EAAC;QACb,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,GAAG;QACX,IAAI,EAAE,iBAAiB;KACxB,CAAC;;2CACuB;AAIzB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,OAAO,EAAE,2BAA2B,EAAE,CAAC;IACxF,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;8CACxB;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAC9D,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACX;AAId;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,kCAAkC,EAAE,OAAO,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,EAAE,CAAC;IAClG,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;;gDACZ;AAIrB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,4CAA4C,EAAE,CAAC;IAC1E,IAAA,0BAAgB,GAAE;sCACP,IAAI;gDAAC;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;IAC/E,IAAA,0BAAgB,GAAE;sCACP,IAAI;gDAAC;wBAhCN,aAAa;IADzB,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,aAAa,CAiCzB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { MqttResourceConfig } from './mqttResourceConfig.entity';
|
|
2
1
|
export declare class MqttServer {
|
|
3
2
|
id: number;
|
|
4
3
|
name: string;
|
|
@@ -8,7 +7,9 @@ export declare class MqttServer {
|
|
|
8
7
|
password: string | null;
|
|
9
8
|
clientId: string | null;
|
|
10
9
|
useTls: boolean;
|
|
10
|
+
defaultPublishQos: number;
|
|
11
|
+
defaultPublishRetain: boolean;
|
|
12
|
+
defaultSubscribeQos: number;
|
|
11
13
|
createdAt: Date;
|
|
12
14
|
updatedAt: Date;
|
|
13
|
-
resourceConfigs: MqttResourceConfig[];
|
|
14
15
|
}
|
|
@@ -4,7 +4,6 @@ exports.MqttServer = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const typeorm_1 = require("typeorm");
|
|
6
6
|
const swagger_1 = require("@nestjs/swagger");
|
|
7
|
-
const mqttResourceConfig_entity_1 = require("./mqttResourceConfig.entity");
|
|
8
7
|
let MqttServer = class MqttServer {
|
|
9
8
|
};
|
|
10
9
|
exports.MqttServer = MqttServer;
|
|
@@ -75,6 +74,30 @@ tslib_1.__decorate([
|
|
|
75
74
|
}),
|
|
76
75
|
tslib_1.__metadata("design:type", Boolean)
|
|
77
76
|
], MqttServer.prototype, "useTls", void 0);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ type: 'integer', default: 0 }),
|
|
79
|
+
(0, swagger_1.ApiProperty)({
|
|
80
|
+
description: 'Default QoS level for publish operations (0, 1, or 2)',
|
|
81
|
+
example: 0,
|
|
82
|
+
}),
|
|
83
|
+
tslib_1.__metadata("design:type", Number)
|
|
84
|
+
], MqttServer.prototype, "defaultPublishQos", void 0);
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
87
|
+
(0, swagger_1.ApiProperty)({
|
|
88
|
+
description: 'Default retain flag for publish operations',
|
|
89
|
+
example: false,
|
|
90
|
+
}),
|
|
91
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
92
|
+
], MqttServer.prototype, "defaultPublishRetain", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, typeorm_1.Column)({ type: 'integer', default: 0 }),
|
|
95
|
+
(0, swagger_1.ApiProperty)({
|
|
96
|
+
description: 'Default QoS level for subscribe operations (0, 1, or 2)',
|
|
97
|
+
example: 0,
|
|
98
|
+
}),
|
|
99
|
+
tslib_1.__metadata("design:type", Number)
|
|
100
|
+
], MqttServer.prototype, "defaultSubscribeQos", void 0);
|
|
78
101
|
tslib_1.__decorate([
|
|
79
102
|
(0, typeorm_1.CreateDateColumn)(),
|
|
80
103
|
(0, swagger_1.ApiProperty)({
|
|
@@ -89,10 +112,6 @@ tslib_1.__decorate([
|
|
|
89
112
|
}),
|
|
90
113
|
tslib_1.__metadata("design:type", Date)
|
|
91
114
|
], MqttServer.prototype, "updatedAt", void 0);
|
|
92
|
-
tslib_1.__decorate([
|
|
93
|
-
(0, typeorm_1.OneToMany)(() => mqttResourceConfig_entity_1.MqttResourceConfig, (config) => config.server),
|
|
94
|
-
tslib_1.__metadata("design:type", Array)
|
|
95
|
-
], MqttServer.prototype, "resourceConfigs", void 0);
|
|
96
115
|
exports.MqttServer = MqttServer = tslib_1.__decorate([
|
|
97
116
|
(0, typeorm_1.Entity)()
|
|
98
117
|
], MqttServer);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mqttServer.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/mqttServer.entity.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"mqttServer.entity.js","sourceRoot":"","sources":["../../../../../../libs/database-entities/src/lib/entities/mqttServer.entity.ts"],"names":[],"mappings":";;;;AAAA,qCAAqG;AACrG,6CAA8C;AAGvC,IAAM,UAAU,GAAhB,MAAM,UAAU;CA4FtB,CAAA;AA5FY,gCAAU;AAMrB;IALC,IAAA,gCAAsB,GAAE;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,0CAA0C;QACvD,OAAO,EAAE,CAAC;KACX,CAAC;;sCACU;AAOZ;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,mCAAmC;QAChD,OAAO,EAAE,sBAAsB;KAChC,CAAC;;wCACY;AAOd;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IACxB,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yBAAyB;QACtC,OAAO,EAAE,kBAAkB;KAC5B,CAAC;;wCACY;AAOd;IALC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC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