@valentine-efagene/qshelter-common 1.0.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.
Files changed (179) hide show
  1. package/OpenApiHelper.ts +121 -0
  2. package/decorator/permission.decorator.ts +4 -0
  3. package/decorator/tenant.decorator.ts +16 -0
  4. package/dist/entities/BaseEntity.d.ts +11 -0
  5. package/dist/entities/BaseEntity.js +54 -0
  6. package/dist/entities/BaseEntity.js.map +1 -0
  7. package/dist/entities/TenantAwareEntity.d.ts +10 -0
  8. package/dist/entities/TenantAwareEntity.js +52 -0
  9. package/dist/entities/TenantAwareEntity.js.map +1 -0
  10. package/dist/entities/TenantAwareRepository.d.ts +13 -0
  11. package/dist/entities/TenantAwareRepository.js +65 -0
  12. package/dist/entities/TenantAwareRepository.js.map +1 -0
  13. package/dist/entities/amenity.entity.d.ts +4 -0
  14. package/dist/entities/amenity.entity.js +27 -0
  15. package/dist/entities/amenity.entity.js.map +1 -0
  16. package/dist/entities/common.entity.d.ts +17 -0
  17. package/dist/entities/common.entity.js +63 -0
  18. package/dist/entities/common.entity.js.map +1 -0
  19. package/dist/entities/common.pure.entity.d.ts +11 -0
  20. package/dist/entities/common.pure.entity.js +51 -0
  21. package/dist/entities/common.pure.entity.js.map +1 -0
  22. package/dist/entities/index.d.ts +27 -0
  23. package/dist/entities/index.js +44 -0
  24. package/dist/entities/index.js.map +1 -0
  25. package/dist/entities/mortgage-document.entity.d.ts +14 -0
  26. package/dist/entities/mortgage-document.entity.js +58 -0
  27. package/dist/entities/mortgage-document.entity.js.map +1 -0
  28. package/dist/entities/mortgage-downpayment-installment.entity.d.ts +19 -0
  29. package/dist/entities/mortgage-downpayment-installment.entity.js +63 -0
  30. package/dist/entities/mortgage-downpayment-installment.entity.js.map +1 -0
  31. package/dist/entities/mortgage-downpayment-payment.entity.d.ts +28 -0
  32. package/dist/entities/mortgage-downpayment-payment.entity.js +84 -0
  33. package/dist/entities/mortgage-downpayment-payment.entity.js.map +1 -0
  34. package/dist/entities/mortgage-downpayment.entity.d.ts +22 -0
  35. package/dist/entities/mortgage-downpayment.entity.js +66 -0
  36. package/dist/entities/mortgage-downpayment.entity.js.map +1 -0
  37. package/dist/entities/mortgage-step.entity.d.ts +12 -0
  38. package/dist/entities/mortgage-step.entity.js +52 -0
  39. package/dist/entities/mortgage-step.entity.js.map +1 -0
  40. package/dist/entities/mortgage-type.entity.d.ts +10 -0
  41. package/dist/entities/mortgage-type.entity.js +46 -0
  42. package/dist/entities/mortgage-type.entity.js.map +1 -0
  43. package/dist/entities/mortgage.entity.d.ts +37 -0
  44. package/dist/entities/mortgage.entity.js +124 -0
  45. package/dist/entities/mortgage.entity.js.map +1 -0
  46. package/dist/entities/password_reset_tokens.entity.d.ts +7 -0
  47. package/dist/entities/password_reset_tokens.entity.js +43 -0
  48. package/dist/entities/password_reset_tokens.entity.js.map +1 -0
  49. package/dist/entities/permission.entity.d.ts +6 -0
  50. package/dist/entities/permission.entity.js +30 -0
  51. package/dist/entities/permission.entity.js.map +1 -0
  52. package/dist/entities/property-document.entity.d.ts +6 -0
  53. package/dist/entities/property-document.entity.js +34 -0
  54. package/dist/entities/property-document.entity.js.map +1 -0
  55. package/dist/entities/property-media.entity.d.ts +6 -0
  56. package/dist/entities/property-media.entity.js +36 -0
  57. package/dist/entities/property-media.entity.js.map +1 -0
  58. package/dist/entities/property.entity.d.ts +36 -0
  59. package/dist/entities/property.entity.js +182 -0
  60. package/dist/entities/property.entity.js.map +1 -0
  61. package/dist/entities/refresh_token.entity.d.ts +7 -0
  62. package/dist/entities/refresh_token.entity.js +35 -0
  63. package/dist/entities/refresh_token.entity.js.map +1 -0
  64. package/dist/entities/role.entity.d.ts +8 -0
  65. package/dist/entities/role.entity.js +39 -0
  66. package/dist/entities/role.entity.js.map +1 -0
  67. package/dist/entities/settings.entity.d.ts +17 -0
  68. package/dist/entities/settings.entity.js +79 -0
  69. package/dist/entities/settings.entity.js.map +1 -0
  70. package/dist/entities/social.entity.d.ts +8 -0
  71. package/dist/entities/social.entity.js +46 -0
  72. package/dist/entities/social.entity.js.map +1 -0
  73. package/dist/entities/tenant.entity.d.ts +29 -0
  74. package/dist/entities/tenant.entity.js +82 -0
  75. package/dist/entities/tenant.entity.js.map +1 -0
  76. package/dist/entities/transaction.entity.d.ts +17 -0
  77. package/dist/entities/transaction.entity.js +84 -0
  78. package/dist/entities/transaction.entity.js.map +1 -0
  79. package/dist/entities/user.entity.d.ts +26 -0
  80. package/dist/entities/user.entity.js +103 -0
  81. package/dist/entities/user.entity.js.map +1 -0
  82. package/dist/entities/user_suspensions.entity.d.ts +7 -0
  83. package/dist/entities/user_suspensions.entity.js +42 -0
  84. package/dist/entities/user_suspensions.entity.js.map +1 -0
  85. package/dist/entities/wallet.entity.d.ts +17 -0
  86. package/dist/entities/wallet.entity.js +79 -0
  87. package/dist/entities/wallet.entity.js.map +1 -0
  88. package/dist/index.d.ts +3 -0
  89. package/dist/index.js +20 -0
  90. package/dist/index.js.map +1 -0
  91. package/dist/pagination/index.d.ts +2 -0
  92. package/dist/pagination/index.js +19 -0
  93. package/dist/pagination/index.js.map +1 -0
  94. package/dist/pagination/pagination.helper.d.ts +7 -0
  95. package/dist/pagination/pagination.helper.js +40 -0
  96. package/dist/pagination/pagination.helper.js.map +1 -0
  97. package/dist/pagination/pagination.types.d.ts +19 -0
  98. package/dist/pagination/pagination.types.js +3 -0
  99. package/dist/pagination/pagination.types.js.map +1 -0
  100. package/dist/standard-response.d.ts +7 -0
  101. package/dist/standard-response.js +27 -0
  102. package/dist/standard-response.js.map +1 -0
  103. package/dist/tsconfig.tsbuildinfo +1 -0
  104. package/dist/types/common.type.d.ts +26 -0
  105. package/dist/types/common.type.js +26 -0
  106. package/dist/types/common.type.js.map +1 -0
  107. package/dist/types/mortgage-fsm.types.d.ts +180 -0
  108. package/dist/types/mortgage-fsm.types.js +130 -0
  109. package/dist/types/mortgage-fsm.types.js.map +1 -0
  110. package/dist/types/policy.types.d.ts +18 -0
  111. package/dist/types/policy.types.js +3 -0
  112. package/dist/types/policy.types.js.map +1 -0
  113. package/dist/types/property.type.d.ts +9 -0
  114. package/dist/types/property.type.js +15 -0
  115. package/dist/types/property.type.js.map +1 -0
  116. package/dist/types/social.enums.d.ts +15 -0
  117. package/dist/types/social.enums.js +22 -0
  118. package/dist/types/social.enums.js.map +1 -0
  119. package/dist/types/tenant.enums.d.ts +13 -0
  120. package/dist/types/tenant.enums.js +19 -0
  121. package/dist/types/tenant.enums.js.map +1 -0
  122. package/dist/types/transaction.type.d.ts +8 -0
  123. package/dist/types/transaction.type.js +14 -0
  124. package/dist/types/transaction.type.js.map +1 -0
  125. package/dist/types/user.enums.d.ts +10 -0
  126. package/dist/types/user.enums.js +16 -0
  127. package/dist/types/user.enums.js.map +1 -0
  128. package/entities/BaseEntity.ts +34 -0
  129. package/entities/TenantAwareEntity.ts +34 -0
  130. package/entities/TenantAwareRepository.ts +100 -0
  131. package/entities/amenity.entity.ts +10 -0
  132. package/entities/common.entity.ts +46 -0
  133. package/entities/common.pure.entity.ts +36 -0
  134. package/entities/index.ts +27 -0
  135. package/entities/mortgage-document.entity.ts +37 -0
  136. package/entities/mortgage-downpayment-installment.entity.ts +40 -0
  137. package/entities/mortgage-downpayment-payment.entity.ts +61 -0
  138. package/entities/mortgage-downpayment.entity.ts +43 -0
  139. package/entities/mortgage-step.entity.ts +33 -0
  140. package/entities/mortgage-type.entity.ts +31 -0
  141. package/entities/mortgage.entity.ts +89 -0
  142. package/entities/password_reset_tokens.entity.ts +25 -0
  143. package/entities/permission.entity.ts +12 -0
  144. package/entities/property-document.entity.ts +21 -0
  145. package/entities/property-media.entity.ts +23 -0
  146. package/entities/property.entity.ts +147 -0
  147. package/entities/refresh_token.entity.ts +16 -0
  148. package/entities/role.entity.ts +20 -0
  149. package/entities/settings.entity.ts +56 -0
  150. package/entities/social.entity.ts +27 -0
  151. package/entities/tenant.entity.ts +65 -0
  152. package/entities/transaction.entity.ts +56 -0
  153. package/entities/user.entity.ts +89 -0
  154. package/entities/user_suspensions.entity.ts +24 -0
  155. package/entities/wallet.entity.ts +54 -0
  156. package/guard/permission.guard.ts +42 -0
  157. package/guard/swagger-auth.guard.ts +9 -0
  158. package/helpers/ArrayHelper.ts +1 -0
  159. package/helpers/ConstantHelper.ts +101 -0
  160. package/helpers/CustomNamingStrategy.ts +27 -0
  161. package/helpers/DateHelper.ts +21 -0
  162. package/helpers/EmailHelper.ts +38 -0
  163. package/helpers/FileSystemHelper.ts +101 -0
  164. package/index.ts +9 -0
  165. package/middleware/TenantMiddleware.ts +52 -0
  166. package/package.json +46 -0
  167. package/pagination/index.ts +2 -0
  168. package/pagination/pagination.helper.ts +57 -0
  169. package/pagination/pagination.types.ts +21 -0
  170. package/standard-response.ts +16 -0
  171. package/tsconfig.json +33 -0
  172. package/types/common.type.ts +32 -0
  173. package/types/mortgage-fsm.types.ts +279 -0
  174. package/types/policy.types.ts +21 -0
  175. package/types/property.type.ts +10 -0
  176. package/types/social.enums.ts +17 -0
  177. package/types/tenant.enums.ts +14 -0
  178. package/types/transaction.type.ts +9 -0
  179. package/types/user.enums.ts +11 -0
@@ -0,0 +1,39 @@
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.Role = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const permission_entity_1 = require("./permission.entity");
15
+ const user_entity_1 = require("./user.entity");
16
+ const BaseEntity_1 = require("./BaseEntity");
17
+ let Role = class Role extends BaseEntity_1.BaseEntity {
18
+ };
19
+ exports.Role = Role;
20
+ __decorate([
21
+ (0, typeorm_1.Column)({ nullable: true }),
22
+ __metadata("design:type", String)
23
+ ], Role.prototype, "name", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.ManyToMany)(() => permission_entity_1.Permission, (permission) => permission.roles, {
26
+ onDelete: 'CASCADE',
27
+ eager: true
28
+ }),
29
+ (0, typeorm_1.JoinTable)(),
30
+ __metadata("design:type", Array)
31
+ ], Role.prototype, "permissions", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.ManyToMany)(() => user_entity_1.User, (user) => user.roles),
34
+ __metadata("design:type", Array)
35
+ ], Role.prototype, "users", void 0);
36
+ exports.Role = Role = __decorate([
37
+ (0, typeorm_1.Entity)({ name: 'roles' })
38
+ ], Role);
39
+ //# sourceMappingURL=role.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role.entity.js","sourceRoot":"","sources":["../../entities/role.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,2DAAiD;AACjD,+CAAqC;AACrC,6CAA0C;AAGnC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,uBAAU;CAanC,CAAA;AAbY,oBAAI;AAEf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kCACd;AAOb;IALC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,8BAAU,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE;QAC9D,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC;IACD,IAAA,mBAAS,GAAE;;yCACa;AAGzB;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;;mCAChC;eAZF,IAAI;IADhB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;GACb,IAAI,CAahB"}
@@ -0,0 +1,17 @@
1
+ import { PropertyMedia } from './property-media.entity';
2
+ import { User } from './user.entity';
3
+ import { AbstractBaseReviewableEntity } from './common.entity';
4
+ import { Status } from '../types/common.type';
5
+ export declare class Settings extends AbstractBaseReviewableEntity {
6
+ creator: User;
7
+ createdBy: number;
8
+ media: PropertyMedia[];
9
+ title: string;
10
+ location: string;
11
+ startTime: Date;
12
+ endTime: Date;
13
+ isPrivate: boolean;
14
+ qrOfflineCode: string;
15
+ description: string;
16
+ status: Status;
17
+ }
@@ -0,0 +1,79 @@
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.Settings = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const property_media_entity_1 = require("./property-media.entity");
15
+ const user_entity_1 = require("./user.entity");
16
+ const common_entity_1 = require("./common.entity");
17
+ const common_type_1 = require("../types/common.type");
18
+ let Settings = class Settings extends common_entity_1.AbstractBaseReviewableEntity {
19
+ };
20
+ exports.Settings = Settings;
21
+ __decorate([
22
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
23
+ onDelete: 'CASCADE',
24
+ onUpdate: 'CASCADE',
25
+ }),
26
+ (0, typeorm_1.JoinColumn)({ name: 'created_by' }),
27
+ __metadata("design:type", user_entity_1.User)
28
+ ], Settings.prototype, "creator", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ nullable: true }),
31
+ __metadata("design:type", Number)
32
+ ], Settings.prototype, "createdBy", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.OneToMany)(() => property_media_entity_1.PropertyMedia, (PropertyMedia) => PropertyMedia.property),
35
+ __metadata("design:type", Array)
36
+ ], Settings.prototype, "media", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ nullable: true }),
39
+ __metadata("design:type", String)
40
+ ], Settings.prototype, "title", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)(),
43
+ __metadata("design:type", String)
44
+ ], Settings.prototype, "location", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)(),
47
+ __metadata("design:type", Date)
48
+ ], Settings.prototype, "startTime", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)(),
51
+ __metadata("design:type", Date)
52
+ ], Settings.prototype, "endTime", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ default: true }),
55
+ __metadata("design:type", Boolean)
56
+ ], Settings.prototype, "isPrivate", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], Settings.prototype, "qrOfflineCode", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({
63
+ type: 'text',
64
+ nullable: true
65
+ }),
66
+ __metadata("design:type", String)
67
+ ], Settings.prototype, "description", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({
70
+ type: 'enum',
71
+ enum: common_type_1.Status,
72
+ default: common_type_1.Status.PENDING,
73
+ }),
74
+ __metadata("design:type", String)
75
+ ], Settings.prototype, "status", void 0);
76
+ exports.Settings = Settings = __decorate([
77
+ (0, typeorm_1.Entity)({ name: 'settings' })
78
+ ], Settings);
79
+ //# sourceMappingURL=settings.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.entity.js","sourceRoot":"","sources":["../../entities/settings.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2E;AAC3E,mEAAwD;AACxD,+CAAqC;AACrC,mDAA+D;AAC/D,sDAA8C;AAGvC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,4CAA4B;CAgDzD,CAAA;AAhDY,4BAAQ;AAOnB;IANC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QAErB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC1B,kBAAI;yCAAC;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACT;AAMlB;IAJC,IAAA,mBAAS,EACR,GAAG,EAAE,CAAC,qCAAa,EACnB,CAAC,aAAa,EAAE,EAAE,CAAC,aAAa,CAAC,QAAQ,CAC1C;;uCACsB;AAGvB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACb;AAGd;IADC,IAAA,gBAAM,GAAE;;0CACQ;AAGjB;IADC,IAAA,gBAAM,GAAE;8BACE,IAAI;2CAAC;AAGhB;IADC,IAAA,gBAAM,GAAE;8BACA,IAAI;yCAAC;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACP;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACL;AAMtB;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACiB;AAOnB;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,oBAAM;QACZ,OAAO,EAAE,oBAAM,CAAC,OAAO;KACxB,CAAC;;wCACa;mBA/CJ,QAAQ;IADpB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;GAChB,QAAQ,CAgDpB"}
@@ -0,0 +1,8 @@
1
+ import { User } from './user.entity';
2
+ import { AbstractBaseReviewableEntity } from './common.entity';
3
+ export declare class Social extends AbstractBaseReviewableEntity {
4
+ user: User;
5
+ userId: number;
6
+ brand: string;
7
+ link: string;
8
+ }
@@ -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.Social = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const user_entity_1 = require("./user.entity");
15
+ const common_entity_1 = require("./common.entity");
16
+ let Social = class Social extends common_entity_1.AbstractBaseReviewableEntity {
17
+ };
18
+ exports.Social = Social;
19
+ __decorate([
20
+ (0, typeorm_1.ManyToOne)(() => 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
+ ], Social.prototype, "user", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ nullable: true }),
29
+ __metadata("design:type", Number)
30
+ ], Social.prototype, "userId", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)({
33
+ nullable: true,
34
+ }),
35
+ __metadata("design:type", String)
36
+ ], Social.prototype, "brand", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({
39
+ nullable: true,
40
+ }),
41
+ __metadata("design:type", String)
42
+ ], Social.prototype, "link", void 0);
43
+ exports.Social = Social = __decorate([
44
+ (0, typeorm_1.Entity)({ name: 'social' })
45
+ ], Social);
46
+ //# sourceMappingURL=social.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"social.entity.js","sourceRoot":"","sources":["../../entities/social.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,+CAAqC;AACrC,mDAA+D;AAGxD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,4CAA4B;CAqBvD,CAAA;AArBY,wBAAM;AAOjB;IANC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QAErB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAC1B,kBAAI;oCAAC;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACZ;AAKf;IAHC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;qCACY;AAKd;IAHC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;oCACW;iBApBF,MAAM;IADlB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;GACd,MAAM,CAqBlB"}
@@ -0,0 +1,29 @@
1
+ import { BaseEntity } from './BaseEntity';
2
+ import { TenantStatus, TenantPlan } from '../types/tenant.enums';
3
+ export declare class Tenant extends BaseEntity {
4
+ name: string;
5
+ subdomain: string;
6
+ domain: string;
7
+ status: TenantStatus;
8
+ plan: TenantPlan;
9
+ config: {
10
+ maxUsers?: number;
11
+ maxProperties?: number;
12
+ features?: string[];
13
+ customBranding?: {
14
+ logo?: string;
15
+ primaryColor?: string;
16
+ secondaryColor?: string;
17
+ };
18
+ [key: string]: any;
19
+ };
20
+ metadata: any;
21
+ trialEndsAt: Date;
22
+ subscriptionEndsAt: Date;
23
+ contactEmail: string;
24
+ contactPhone: string;
25
+ databaseStrategy: 'shared' | 'isolated';
26
+ databaseHost: string;
27
+ databaseName: string;
28
+ }
29
+ export default Tenant;
@@ -0,0 +1,82 @@
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.Tenant = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseEntity_1 = require("./BaseEntity");
15
+ const tenant_enums_1 = require("../types/tenant.enums");
16
+ let Tenant = class Tenant extends BaseEntity_1.BaseEntity {
17
+ };
18
+ exports.Tenant = Tenant;
19
+ __decorate([
20
+ (0, typeorm_1.Column)({ length: 255 }),
21
+ __metadata("design:type", String)
22
+ ], Tenant.prototype, "name", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ length: 100, unique: true }),
25
+ (0, typeorm_1.Index)(),
26
+ __metadata("design:type", String)
27
+ ], Tenant.prototype, "subdomain", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ length: 255, nullable: true, unique: true }),
30
+ __metadata("design:type", String)
31
+ ], Tenant.prototype, "domain", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'varchar', default: tenant_enums_1.TenantStatus.ACTIVE }),
34
+ __metadata("design:type", String)
35
+ ], Tenant.prototype, "status", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'varchar', default: tenant_enums_1.TenantPlan.FREE }),
38
+ __metadata("design:type", String)
39
+ ], Tenant.prototype, "plan", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'json', nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], Tenant.prototype, "config", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'json', nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], Tenant.prototype, "metadata", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
50
+ __metadata("design:type", Date)
51
+ ], Tenant.prototype, "trialEndsAt", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
54
+ __metadata("design:type", Date)
55
+ ], Tenant.prototype, "subscriptionEndsAt", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ length: 255, nullable: true }),
58
+ __metadata("design:type", String)
59
+ ], Tenant.prototype, "contactEmail", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ length: 50, nullable: true }),
62
+ __metadata("design:type", String)
63
+ ], Tenant.prototype, "contactPhone", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: 'varchar', default: 'shared' }),
66
+ __metadata("design:type", String)
67
+ ], Tenant.prototype, "databaseStrategy", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ length: 255, nullable: true }),
70
+ __metadata("design:type", String)
71
+ ], Tenant.prototype, "databaseHost", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.Column)({ length: 100, nullable: true }),
74
+ __metadata("design:type", String)
75
+ ], Tenant.prototype, "databaseName", void 0);
76
+ exports.Tenant = Tenant = __decorate([
77
+ (0, typeorm_1.Entity)({ name: 'tenants' }),
78
+ (0, typeorm_1.Unique)(['subdomain']),
79
+ (0, typeorm_1.Unique)(['domain'])
80
+ ], Tenant);
81
+ exports.default = Tenant;
82
+ //# sourceMappingURL=tenant.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenant.entity.js","sourceRoot":"","sources":["../../entities/tenant.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwD;AACxD,6CAA0C;AAC1C,wDAAiE;AAK1D,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,uBAAU;CAuDrC,CAAA;AAvDY,wBAAM;AAEf;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;oCACX;AAIb;IAFC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACrC,IAAA,eAAK,GAAE;;yCACU;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCACvC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,2BAAY,CAAC,MAAM,EAAE,CAAC;;sCACrC;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,yBAAU,CAAC,IAAI,EAAE,CAAC;;oCACrC;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAWvC;AAGF;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCAC3B;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACjC,IAAI;2CAAC;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC1B,IAAI;kDAAC;AAIzB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACnB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CAClB;AAIrB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;gDACP;AAGxC;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACnB;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACnB;iBAtDZ,MAAM;IAHlB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IAC3B,IAAA,gBAAM,EAAC,CAAC,WAAW,CAAC,CAAC;IACrB,IAAA,gBAAM,EAAC,CAAC,QAAQ,CAAC,CAAC;GACN,MAAM,CAuDlB;AAED,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Provider, TransactionType } from '../types/transaction.type';
2
+ import { Wallet } from './wallet.entity';
3
+ import { User } from './user.entity';
4
+ export declare class Transaction {
5
+ id: number;
6
+ type: TransactionType;
7
+ wallet: Wallet;
8
+ walletId: number;
9
+ user: User;
10
+ userId: number;
11
+ provider: Provider;
12
+ ref: string;
13
+ metadata: string;
14
+ amount: number;
15
+ createdAt: Date;
16
+ updatedAt: Date;
17
+ }
@@ -0,0 +1,84 @@
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.Transaction = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const transaction_type_1 = require("../types/transaction.type");
15
+ const wallet_entity_1 = require("./wallet.entity");
16
+ const user_entity_1 = require("./user.entity");
17
+ let Transaction = class Transaction {
18
+ };
19
+ exports.Transaction = Transaction;
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)(),
22
+ __metadata("design:type", Number)
23
+ ], Transaction.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)({
26
+ type: 'enum',
27
+ enum: transaction_type_1.TransactionType
28
+ }),
29
+ __metadata("design:type", String)
30
+ ], Transaction.prototype, "type", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.ManyToOne)(() => wallet_entity_1.Wallet, wallet => wallet.transactions, {
33
+ onDelete: 'CASCADE',
34
+ onUpdate: 'CASCADE',
35
+ }),
36
+ (0, typeorm_1.JoinColumn)({ name: 'wallet_id' }),
37
+ __metadata("design:type", wallet_entity_1.Wallet)
38
+ ], Transaction.prototype, "wallet", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)(),
41
+ __metadata("design:type", Number)
42
+ ], Transaction.prototype, "walletId", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.ManyToOne)(() => user_entity_1.User, (user) => user.transactions),
45
+ (0, typeorm_1.JoinColumn)({ name: 'user_id' }),
46
+ __metadata("design:type", user_entity_1.User)
47
+ ], Transaction.prototype, "user", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)(),
50
+ __metadata("design:type", Number)
51
+ ], Transaction.prototype, "userId", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({
54
+ type: 'enum',
55
+ enum: transaction_type_1.Provider
56
+ }),
57
+ __metadata("design:type", String)
58
+ ], Transaction.prototype, "provider", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)(),
61
+ __metadata("design:type", String)
62
+ ], Transaction.prototype, "ref", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({
65
+ type: 'text'
66
+ }),
67
+ __metadata("design:type", String)
68
+ ], Transaction.prototype, "metadata", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 65, scale: 2, nullable: true }),
71
+ __metadata("design:type", Number)
72
+ ], Transaction.prototype, "amount", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.CreateDateColumn)(),
75
+ __metadata("design:type", Date)
76
+ ], Transaction.prototype, "createdAt", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.UpdateDateColumn)(),
79
+ __metadata("design:type", Date)
80
+ ], Transaction.prototype, "updatedAt", void 0);
81
+ exports.Transaction = Transaction = __decorate([
82
+ (0, typeorm_1.Entity)({ name: 'prod_transactions' })
83
+ ], Transaction);
84
+ //# sourceMappingURL=transaction.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction.entity.js","sourceRoot":"","sources":["../../entities/transaction.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4H;AAC5H,gEAAsE;AACtE,mDAAyC;AACzC,+CAAqC;AAG9B,IAAM,WAAW,GAAjB,MAAM,WAAW;CAiDvB,CAAA;AAjDY,kCAAW;AAEtB;IADC,IAAA,gCAAsB,GAAE;;uCACd;AAMX;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,kCAAe;KACtB,CAAC;;yCACmB;AAOrB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,EAAE;QACtD,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACpB,CAAC;IACD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;8BAC1B,sBAAM;2CAAC;AAGf;IADC,IAAA,gBAAM,GAAE;;6CACO;AAIhB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IAClD,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8BAC1B,kBAAI;yCAAC;AAGX;IADC,IAAA,gBAAM,GAAE;;2CACK;AAMd;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,2BAAQ;KACf,CAAC;;6CACgB;AAGlB;IADC,IAAA,gBAAM,GAAE;;wCACE;AAKX;IAHC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;KACb,CAAC;;6CACc;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACtD;AAGf;IADC,IAAA,0BAAgB,GAAE;8BACR,IAAI;8CAAC;AAGhB;IADC,IAAA,0BAAgB,GAAE;8BACR,IAAI;8CAAC;sBAhDL,WAAW;IADvB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,CAAC;GACzB,WAAW,CAiDvB"}
@@ -0,0 +1,26 @@
1
+ import { TenantAwareBaseEntity } from './BaseEntity';
2
+ import { UserStatus } from '../types/user.enums';
3
+ import { Role } from './role.entity';
4
+ import { RefreshToken } from './refresh_token.entity';
5
+ import { Property } from './property.entity';
6
+ import { Transaction } from './transaction.entity';
7
+ import { Wallet } from './wallet.entity';
8
+ export declare class User extends TenantAwareBaseEntity {
9
+ firstName?: string;
10
+ lastName?: string;
11
+ phone?: string;
12
+ bio?: string;
13
+ address?: string;
14
+ email: string;
15
+ password: string;
16
+ avatar?: string;
17
+ gender: string;
18
+ roles?: Role[];
19
+ refreshTokens: RefreshToken[];
20
+ wallets: Wallet[];
21
+ transactions: Transaction[];
22
+ properties: Property[];
23
+ status: UserStatus;
24
+ isEmailVerified?: boolean;
25
+ emailVerificationToken: string | null;
26
+ }
@@ -0,0 +1,103 @@
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.User = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseEntity_1 = require("./BaseEntity");
15
+ const user_enums_1 = require("../types/user.enums");
16
+ const role_entity_1 = require("./role.entity");
17
+ const refresh_token_entity_1 = require("./refresh_token.entity");
18
+ const property_entity_1 = require("./property.entity");
19
+ const transaction_entity_1 = require("./transaction.entity");
20
+ const wallet_entity_1 = require("./wallet.entity");
21
+ let User = class User extends BaseEntity_1.TenantAwareBaseEntity {
22
+ };
23
+ exports.User = User;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ nullable: true }),
26
+ __metadata("design:type", String)
27
+ ], User.prototype, "firstName", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ nullable: true }),
30
+ __metadata("design:type", String)
31
+ ], User.prototype, "lastName", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ nullable: true }),
34
+ __metadata("design:type", String)
35
+ ], User.prototype, "phone", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ nullable: true, type: 'text' }),
38
+ __metadata("design:type", String)
39
+ ], User.prototype, "bio", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ nullable: true }),
42
+ __metadata("design:type", String)
43
+ ], User.prototype, "address", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ nullable: true }),
46
+ __metadata("design:type", String)
47
+ ], User.prototype, "email", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ nullable: true }),
50
+ __metadata("design:type", String)
51
+ ], User.prototype, "password", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
54
+ __metadata("design:type", String)
55
+ ], User.prototype, "avatar", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ nullable: true }),
58
+ __metadata("design:type", String)
59
+ ], User.prototype, "gender", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.ManyToMany)(() => role_entity_1.Role, (role) => role.users, {
62
+ onDelete: 'CASCADE',
63
+ eager: true
64
+ }),
65
+ (0, typeorm_1.JoinTable)(),
66
+ __metadata("design:type", Array)
67
+ ], User.prototype, "roles", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.OneToMany)(() => refresh_token_entity_1.RefreshToken, (refreshToken) => refreshToken.user, { eager: true }),
70
+ __metadata("design:type", Array)
71
+ ], User.prototype, "refreshTokens", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.OneToMany)(() => wallet_entity_1.Wallet, (wallet) => wallet.user, { eager: true }),
74
+ __metadata("design:type", Array)
75
+ ], User.prototype, "wallets", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.OneToMany)(() => transaction_entity_1.Transaction, (transaction) => transaction.user, { eager: true }),
78
+ __metadata("design:type", Array)
79
+ ], User.prototype, "transactions", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.OneToMany)(() => property_entity_1.Property, (property) => property.user),
82
+ __metadata("design:type", Array)
83
+ ], User.prototype, "properties", void 0);
84
+ __decorate([
85
+ (0, typeorm_1.Column)({
86
+ type: 'enum',
87
+ enum: user_enums_1.UserStatus,
88
+ default: user_enums_1.UserStatus.PENDING
89
+ }),
90
+ __metadata("design:type", String)
91
+ ], User.prototype, "status", void 0);
92
+ __decorate([
93
+ (0, typeorm_1.Column)({ default: false }),
94
+ __metadata("design:type", Boolean)
95
+ ], User.prototype, "isEmailVerified", void 0);
96
+ __decorate([
97
+ (0, typeorm_1.Column)({ nullable: true }),
98
+ __metadata("design:type", String)
99
+ ], User.prototype, "emailVerificationToken", void 0);
100
+ exports.User = User = __decorate([
101
+ (0, typeorm_1.Entity)({ name: 'users' })
102
+ ], User);
103
+ //# sourceMappingURL=user.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../entities/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2E;AAC3E,6CAAqD;AACrD,oDAAiD;AACjD,+CAAqC;AACrC,iEAAsD;AACtD,uDAA6C;AAC7C,6DAAmD;AACnD,mDAAyC;AAGlC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,kCAAqB;CA8E9C,CAAA;AA9EY,oBAAI;AAEf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mCACZ;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iCAC5B;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACV;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mCACb;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACV;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCACzB;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCACZ;AAOf;IALC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;QAC5C,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC;IACD,IAAA,mBAAS,GAAE;;mCACE;AAQd;IANC,IAAA,mBAAS,EACR,GAAG,EAAE,CAAC,mCAAY,EAClB,CAAC,YAAY,EAAE,EAAE,CACf,YAAY,CAAC,IAAI,EACnB,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB;;2CAC6B;AAQ9B;IANC,IAAA,mBAAS,EACR,GAAG,EAAE,CAAC,sBAAM,EACZ,CAAC,MAAM,EAAE,EAAE,CACT,MAAM,CAAC,IAAI,EACb,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB;;qCACiB;AAQlB;IANC,IAAA,mBAAS,EACR,GAAG,EAAE,CAAC,gCAAW,EACjB,CAAC,WAAW,EAAE,EAAE,CACd,WAAW,CAAC,IAAI,EAClB,EAAE,KAAK,EAAE,IAAI,EAAE,CAChB;;0CAC2B;AAO5B;IALC,IAAA,mBAAS,EACR,GAAG,EAAE,CAAC,0BAAQ,EACd,CAAC,QAAQ,EAAE,EAAE,CACX,QAAQ,CAAC,IAAI,CAChB;;wCACsB;AAOvB;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,uBAAU;QAChB,OAAO,EAAE,uBAAU,CAAC,OAAO;KAC5B,CAAC;;oCACgB;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;6CACD;AAG1B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oDACU;eA7E1B,IAAI;IADhB,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;GACb,IAAI,CA8EhB"}
@@ -0,0 +1,7 @@
1
+ import { BaseEntity } from './BaseEntity';
2
+ import { User } from './user.entity';
3
+ export declare class UserSuspension extends BaseEntity {
4
+ user: User;
5
+ userId: number;
6
+ reason: string;
7
+ }
@@ -0,0 +1,42 @@
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.UserSuspension = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseEntity_1 = require("./BaseEntity");
15
+ const user_entity_1 = require("./user.entity");
16
+ let UserSuspension = class UserSuspension extends BaseEntity_1.BaseEntity {
17
+ };
18
+ exports.UserSuspension = UserSuspension;
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
+ ], UserSuspension.prototype, "user", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({
29
+ nullable: false
30
+ }),
31
+ __metadata("design:type", Number)
32
+ ], UserSuspension.prototype, "userId", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ nullable: false
36
+ }),
37
+ __metadata("design:type", String)
38
+ ], UserSuspension.prototype, "reason", void 0);
39
+ exports.UserSuspension = UserSuspension = __decorate([
40
+ (0, typeorm_1.Entity)({ name: 'user_suspension' })
41
+ ], UserSuspension);
42
+ //# sourceMappingURL=user_suspensions.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user_suspensions.entity.js","sourceRoot":"","sources":["../../entities/user_suspensions.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;AAC/D,6CAA0C;AAC1C,+CAAqC;AAG9B,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,uBAAU;CAkB7C,CAAA;AAlBY,wCAAc;AAOzB;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;4CAAC;AAKX;IAHC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,KAAK;KAChB,CAAC;;8CACY;AAKd;IAHC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,KAAK;KAChB,CAAC;;8CACY;yBAjBH,cAAc;IAD1B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;GACvB,cAAc,CAkB1B"}
@@ -0,0 +1,17 @@
1
+ import { Transaction } from './transaction.entity';
2
+ import { User } from './user.entity';
3
+ export declare class Wallet {
4
+ id: number;
5
+ user: User;
6
+ userId: number;
7
+ currency: number;
8
+ customerId: string;
9
+ bankName: string;
10
+ accountNumber: string;
11
+ accountName: string;
12
+ balance: number;
13
+ enabled: boolean;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ transactions: Transaction[];
17
+ }