@aldb2b/common 1.0.525 → 1.0.527

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 (93) hide show
  1. package/build/entities/models/{events/event.entity.d.ts → companies/companies.provider.d.ts} +8 -11
  2. package/build/entities/models/companies/companies.provider.js +57 -0
  3. package/build/entities/models/companies/companies.provider.js.map +1 -0
  4. package/build/entities/models/companies/entities/company.entity.d.ts +16 -0
  5. package/build/entities/models/companies/entities/company.entity.js +7 -0
  6. package/build/entities/models/companies/entities/company.entity.js.map +1 -0
  7. package/build/entities/models/companies/entities/contact.entity.d.ts +13 -0
  8. package/build/entities/models/companies/entities/contact.entity.js +7 -0
  9. package/build/entities/models/companies/entities/contact.entity.js.map +1 -0
  10. package/build/entities/models/companies/index.d.ts +3 -3
  11. package/build/entities/models/companies/index.js +3 -3
  12. package/build/entities/models/companies/index.js.map +1 -1
  13. package/build/entities/models/events/entities/event.entity.d.ts +7 -0
  14. package/build/entities/models/events/entities/event.entity.js +7 -0
  15. package/build/entities/models/events/entities/event.entity.js.map +1 -0
  16. package/build/entities/models/{companies/contact-test.entity.d.ts → events/events.provider.d.ts} +8 -10
  17. package/build/entities/models/events/events.provider.js +20 -0
  18. package/build/entities/models/events/events.provider.js.map +1 -0
  19. package/build/entities/models/events/index.d.ts +2 -1
  20. package/build/entities/models/events/index.js +2 -1
  21. package/build/entities/models/events/index.js.map +1 -1
  22. package/build/entities/models/model.providers.d.ts +4 -5
  23. package/build/entities/models/model.providers.js +5 -34
  24. package/build/entities/models/model.providers.js.map +1 -1
  25. package/build/entities/models/users/entities/rolePermissions/index.js.map +1 -0
  26. package/build/entities/models/users/{rolePermissions → entities/rolePermissions}/permission.entity.d.ts +1 -1
  27. package/build/entities/models/users/entities/rolePermissions/permission.entity.js.map +1 -0
  28. package/build/entities/models/users/entities/rolePermissions/role-permission.entity.d.ts +65 -0
  29. package/build/entities/models/users/entities/rolePermissions/role-permission.entity.js +100 -0
  30. package/build/entities/models/users/entities/rolePermissions/role-permission.entity.js.map +1 -0
  31. package/build/entities/models/users/{users → entities/users}/chat-info.entity.d.ts +1 -1
  32. package/build/entities/models/users/entities/users/chat-info.entity.js.map +1 -0
  33. package/build/entities/models/users/entities/users/event-info-operations.enum.js.map +1 -0
  34. package/build/entities/models/users/{users → entities/users}/event-info.entity.d.ts +3 -4
  35. package/build/entities/models/users/{users → entities/users}/event-info.entity.js +3 -3
  36. package/build/entities/models/users/entities/users/event-info.entity.js.map +1 -0
  37. package/build/entities/models/users/entities/users/index.js.map +1 -0
  38. package/build/entities/models/users/{users → entities/users}/location.entity.d.ts +1 -1
  39. package/build/entities/models/users/entities/users/location.entity.js.map +1 -0
  40. package/build/entities/models/users/entities/users/user-role.enum.js.map +1 -0
  41. package/build/entities/models/users/entities/users/user-status.enum.js.map +1 -0
  42. package/build/entities/models/users/entities/users/user-type.enum.js.map +1 -0
  43. package/build/entities/models/users/{users → entities/users}/user.entity.d.ts +6 -8
  44. package/build/entities/models/users/entities/users/user.entity.js +169 -0
  45. package/build/entities/models/users/entities/users/user.entity.js.map +1 -0
  46. package/build/entities/models/users/index.d.ts +3 -2
  47. package/build/entities/models/users/index.js +3 -2
  48. package/build/entities/models/users/index.js.map +1 -1
  49. package/build/entities/models/users/users.provider.d.ts +58 -0
  50. package/build/entities/models/users/users.provider.js +24 -0
  51. package/build/entities/models/users/users.provider.js.map +1 -0
  52. package/build/tsconfig.tsbuildinfo +1 -1
  53. package/package.json +1 -1
  54. package/build/entities/models/companies/company.entity.d.ts +0 -70
  55. package/build/entities/models/companies/company.entity.js +0 -21
  56. package/build/entities/models/companies/company.entity.js.map +0 -1
  57. package/build/entities/models/companies/contact-test.entity.js +0 -11
  58. package/build/entities/models/companies/contact-test.entity.js.map +0 -1
  59. package/build/entities/models/companies/contact.entity.d.ts +0 -67
  60. package/build/entities/models/companies/contact.entity.js +0 -18
  61. package/build/entities/models/companies/contact.entity.js.map +0 -1
  62. package/build/entities/models/events/event.entity.js +0 -12
  63. package/build/entities/models/events/event.entity.js.map +0 -1
  64. package/build/entities/models/users/rolePermissions/index.js.map +0 -1
  65. package/build/entities/models/users/rolePermissions/permission.entity.js.map +0 -1
  66. package/build/entities/models/users/rolePermissions/role-permission.entity.d.ts +0 -70
  67. package/build/entities/models/users/rolePermissions/role-permission.entity.js +0 -98
  68. package/build/entities/models/users/rolePermissions/role-permission.entity.js.map +0 -1
  69. package/build/entities/models/users/users/chat-info.entity.js.map +0 -1
  70. package/build/entities/models/users/users/event-info-operations.enum.js.map +0 -1
  71. package/build/entities/models/users/users/event-info.entity.js.map +0 -1
  72. package/build/entities/models/users/users/index.js.map +0 -1
  73. package/build/entities/models/users/users/location.entity.js.map +0 -1
  74. package/build/entities/models/users/users/user-role.enum.js.map +0 -1
  75. package/build/entities/models/users/users/user-status.enum.js.map +0 -1
  76. package/build/entities/models/users/users/user-type.enum.js.map +0 -1
  77. package/build/entities/models/users/users/user.entity.js +0 -163
  78. package/build/entities/models/users/users/user.entity.js.map +0 -1
  79. /package/build/entities/models/users/{rolePermissions → entities/rolePermissions}/index.d.ts +0 -0
  80. /package/build/entities/models/users/{rolePermissions → entities/rolePermissions}/index.js +0 -0
  81. /package/build/entities/models/users/{rolePermissions → entities/rolePermissions}/permission.entity.js +0 -0
  82. /package/build/entities/models/users/{users → entities/users}/chat-info.entity.js +0 -0
  83. /package/build/entities/models/users/{users → entities/users}/event-info-operations.enum.d.ts +0 -0
  84. /package/build/entities/models/users/{users → entities/users}/event-info-operations.enum.js +0 -0
  85. /package/build/entities/models/users/{users → entities/users}/index.d.ts +0 -0
  86. /package/build/entities/models/users/{users → entities/users}/index.js +0 -0
  87. /package/build/entities/models/users/{users → entities/users}/location.entity.js +0 -0
  88. /package/build/entities/models/users/{users → entities/users}/user-role.enum.d.ts +0 -0
  89. /package/build/entities/models/users/{users → entities/users}/user-role.enum.js +0 -0
  90. /package/build/entities/models/users/{users → entities/users}/user-status.enum.d.ts +0 -0
  91. /package/build/entities/models/users/{users → entities/users}/user-status.enum.js +0 -0
  92. /package/build/entities/models/users/{users → entities/users}/user-type.enum.d.ts +0 -0
  93. /package/build/entities/models/users/{users → entities/users}/user-type.enum.js +0 -0
@@ -48,14 +48,11 @@
48
48
  /// <reference types="mongoose/types/inferschematype" />
49
49
  /// <reference types="mongoose/types/inferrawdoctype" />
50
50
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
- import * as mongoose from 'mongoose';
52
- import { CustomModel } from '../../../db/CustomModel';
53
- export declare class Event {
54
- _id: string;
55
- name: string;
56
- subdomain: string;
57
- }
58
- export type EventModel = CustomModel<Event>;
59
- export declare const EventSchema: mongoose.Schema<Event, EventModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, Event, mongoose.Document<unknown, {}, mongoose.FlatRecord<Event>> & mongoose.FlatRecord<Event> & Required<{
60
- _id: string;
61
- }>>;
51
+ import { Connection } from 'mongoose';
52
+ import { DatabaseModel } from '../../../enums/database-model.enum';
53
+ import { DatabaseConnection } from '../../../../src/enums/database-connection.enum';
54
+ export declare const companiesProviders: {
55
+ provide: DatabaseModel;
56
+ useFactory: (connection: Connection, eventConnection: Connection) => void;
57
+ inject: DatabaseConnection[];
58
+ }[];
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.companiesProviders = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const database_model_enum_1 = require("../../../enums/database-model.enum");
6
+ const database_connection_enum_1 = require("../../../../src/enums/database-connection.enum");
7
+ const ObjectId = mongoose_1.Schema.Types.ObjectId;
8
+ exports.companiesProviders = [
9
+ {
10
+ provide: database_model_enum_1.DatabaseModel.COMPANY_MODEL,
11
+ useFactory: (connection, eventConnection) => {
12
+ const companySchema = new mongoose_1.Schema({
13
+ eventId: {
14
+ type: ObjectId,
15
+ ref: eventConnection.model('Event'),
16
+ },
17
+ contacts: [{ type: ObjectId, ref: 'Contact' }],
18
+ name: { type: String, required: true },
19
+ website: { type: String, required: true },
20
+ industry: { type: String, trim: true },
21
+ ABCompanyUrl: { type: String, trim: true },
22
+ tel: { type: String, trim: true },
23
+ email: { type: String, trim: true },
24
+ mobile: { type: String, trim: true },
25
+ logo: { type: String, trim: true },
26
+ });
27
+ connection.model('Company', companySchema);
28
+ },
29
+ inject: [
30
+ database_connection_enum_1.DatabaseConnection.COMPANY_CONNECTION,
31
+ database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION,
32
+ ],
33
+ },
34
+ {
35
+ provide: database_model_enum_1.DatabaseModel.CONTACT_MODEL,
36
+ useFactory: (connection, eventConnection) => {
37
+ const contactSchema = new mongoose_1.Schema({
38
+ eventId: {
39
+ type: ObjectId,
40
+ ref: eventConnection.model('Event'),
41
+ },
42
+ company: { type: ObjectId, ref: 'Company' },
43
+ firstname: { type: String, required: true },
44
+ lastname: { type: String, required: true },
45
+ title: { type: String },
46
+ avatar: { type: String },
47
+ email: { type: String, required: true },
48
+ });
49
+ connection.model('Contact', contactSchema);
50
+ },
51
+ inject: [
52
+ database_connection_enum_1.DatabaseConnection.COMPANY_CONNECTION,
53
+ database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION,
54
+ ],
55
+ },
56
+ ];
57
+ //# sourceMappingURL=companies.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companies.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/companies/companies.provider.ts"],"names":[],"mappings":";;;AAAA,uCAA6C;AAE7C,4EAAkE;AAClE,6FAAmF;AAEnF,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AAEzB,QAAA,kBAAkB,GAAG;IAChC;QACE,OAAO,EAAE,mCAAa,CAAC,aAAa;QACpC,UAAU,EAAE,CAAC,UAAsB,EAAE,eAA2B,EAAE,EAAE;YAClE,MAAM,aAAa,GAAG,IAAI,iBAAM,CAAwB;gBACtD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,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BAC3C,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC1C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACvB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;aACxC,CAAC,CAAA;YACF,UAAU,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa,CAAC,CAAA;QAC5C,CAAC;QACD,MAAM,EAAE;YACN,6CAAkB,CAAC,kBAAkB;YACrC,6CAAkB,CAAC,gBAAgB;SACpC;KACF;CACF,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { Contact } from './contact.entity';
2
+ import { CustomModel } from '../../../../db/CustomModel';
3
+ export declare class Company {
4
+ _id: string;
5
+ eventId: Event;
6
+ contacts: Contact[];
7
+ name: string;
8
+ website: string;
9
+ industry?: string;
10
+ ABCompanyUrl?: string;
11
+ tel?: string;
12
+ email?: string;
13
+ mobile?: string;
14
+ logo?: string;
15
+ }
16
+ export type CompanyModel = CustomModel<Company>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Company = void 0;
4
+ class Company {
5
+ }
6
+ exports.Company = Company;
7
+ //# sourceMappingURL=company.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/companies/entities/company.entity.ts"],"names":[],"mappings":";;;AAGA,MAAa,OAAO;CAYnB;AAZD,0BAYC"}
@@ -0,0 +1,13 @@
1
+ import { Company } from './company.entity';
2
+ import { CustomModel } from '../../../../db/CustomModel';
3
+ export declare class Contact {
4
+ _id: string;
5
+ eventId: Event;
6
+ company: Company;
7
+ firstname: string;
8
+ lastname: string;
9
+ title: string;
10
+ avatar: string;
11
+ email: string;
12
+ }
13
+ export type ContactModel = CustomModel<Contact>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Contact = void 0;
4
+ class Contact {
5
+ }
6
+ exports.Contact = Contact;
7
+ //# sourceMappingURL=contact.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/companies/entities/contact.entity.ts"],"names":[],"mappings":";;;AAGA,MAAa,OAAO;CASnB;AATD,0BASC"}
@@ -1,3 +1,3 @@
1
- export * from './company.entity';
2
- export * from './contact.entity';
3
- export * from './contact-test.entity';
1
+ export * from './entities/company.entity';
2
+ export * from './entities/contact.entity';
3
+ export * from './companies.provider';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./company.entity"), exports);
18
- __exportStar(require("./contact.entity"), exports);
19
- __exportStar(require("./contact-test.entity"), exports);
17
+ __exportStar(require("./entities/company.entity"), exports);
18
+ __exportStar(require("./entities/contact.entity"), exports);
19
+ __exportStar(require("./companies.provider"), exports);
20
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/companies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAgC;AAChC,mDAAgC;AAChC,wDAAqC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/companies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,4DAAyC;AACzC,uDAAoC"}
@@ -0,0 +1,7 @@
1
+ import { CustomModel } from '../../../../db/CustomModel';
2
+ export declare class Event {
3
+ _id: string;
4
+ name: string;
5
+ subdomain: string;
6
+ }
7
+ export type EventModel = CustomModel<Event>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Event = void 0;
4
+ class Event {
5
+ }
6
+ exports.Event = Event;
7
+ //# sourceMappingURL=event.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/events/entities/event.entity.ts"],"names":[],"mappings":";;;AAEA,MAAa,KAAK;CAIjB;AAJD,sBAIC"}
@@ -48,13 +48,11 @@
48
48
  /// <reference types="mongoose/types/inferschematype" />
49
49
  /// <reference types="mongoose/types/inferrawdoctype" />
50
50
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
- import * as mongoose from 'mongoose';
52
- import { CustomModel } from '../../../db/CustomModel';
53
- export declare class ContactTest {
54
- _id: string;
55
- title: string;
56
- }
57
- export type ContactTestModel = CustomModel<ContactTest>;
58
- export declare const ContactTestSchema: mongoose.Schema<ContactTest, ContactTestModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ContactTest, mongoose.Document<unknown, {}, mongoose.FlatRecord<ContactTest>> & mongoose.FlatRecord<ContactTest> & Required<{
59
- _id: string;
60
- }>>;
51
+ import { Connection } from 'mongoose';
52
+ import { DatabaseModel } from '../../../enums/database-model.enum';
53
+ import { DatabaseConnection } from '../../../enums/database-connection.enum';
54
+ export declare const eventProviders: {
55
+ provide: DatabaseModel;
56
+ useFactory: (connection: Connection) => void;
57
+ inject: DatabaseConnection[];
58
+ }[];
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.eventProviders = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const database_model_enum_1 = require("../../../enums/database-model.enum");
6
+ const database_connection_enum_1 = require("../../../enums/database-connection.enum");
7
+ exports.eventProviders = [
8
+ {
9
+ provide: database_model_enum_1.DatabaseModel.EVENT_MODEL,
10
+ useFactory: (connection) => {
11
+ const eventSchema = new mongoose_1.Schema({
12
+ name: { type: String, required: true, trim: true },
13
+ subdomain: { type: String, required: true, trim: true },
14
+ });
15
+ connection.model('Event', eventSchema);
16
+ },
17
+ inject: [database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION],
18
+ },
19
+ ];
20
+ //# sourceMappingURL=events.provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/events/events.provider.ts"],"names":[],"mappings":";;;AAAA,uCAA6C;AAC7C,4EAAkE;AAClE,sFAA4E;AAG/D,QAAA,cAAc,GAAG;IAC5B;QACE,OAAO,EAAE,mCAAa,CAAC,WAAW;QAClC,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE;YACrC,MAAM,WAAW,GAAG,IAAI,iBAAM,CAAoB;gBAChD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;gBAClD,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;aACxD,CAAC,CAAA;YACF,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,WAAW,CAAC,CAAA;QACxC,CAAC;QACD,MAAM,EAAE,CAAC,6CAAkB,CAAC,gBAAgB,CAAC;KAC9C;CACF,CAAA"}
@@ -1 +1,2 @@
1
- export * from './event.entity';
1
+ export * from './entities/event.entity';
2
+ export * from './events.provider';
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./event.entity"), exports);
17
+ __exportStar(require("./entities/event.entity"), exports);
18
+ __exportStar(require("./events.provider"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC;AACvC,oDAAiC"}
@@ -21,6 +21,7 @@
21
21
  /// <reference types="mongoose/types/utility" />
22
22
  /// <reference types="mongoose/types/validation" />
23
23
  /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose" />
24
25
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/aggregate" />
25
26
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/callback" />
26
27
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/collection" />
@@ -48,10 +49,8 @@
48
49
  /// <reference types="mongoose/types/inferschematype" />
49
50
  /// <reference types="mongoose/types/inferrawdoctype" />
50
51
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
- import { Connection } from 'mongoose';
52
- import { DatabaseConnection } from '../../enums/database-connection.enum';
53
52
  export declare const modelProviders: {
54
- provide: string;
55
- useFactory: (connection: Connection) => unknown;
56
- inject: DatabaseConnection[];
53
+ provide: import("../..").DatabaseModel;
54
+ useFactory: (connection: import("mongoose").Connection, companyConnection: import("mongoose").Connection, eventConnection: import("mongoose").Connection) => void;
55
+ inject: import("../..").DatabaseConnection[];
57
56
  }[];
@@ -1,41 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.modelProviders = void 0;
4
- const database_connection_enum_1 = require("../../enums/database-connection.enum");
5
- const database_model_enum_1 = require("../../enums/database-model.enum");
6
4
  const companies_1 = require("./companies");
7
- const events_1 = require("./events");
8
- const users_1 = require("./users");
5
+ const events_provider_1 = require("./events/events.provider");
6
+ const users_provider_1 = require("./users/users.provider");
9
7
  exports.modelProviders = [
10
- {
11
- provide: database_model_enum_1.DatabaseModel.COMPANY_MODEL,
12
- useFactory: (connection) => connection.model('Company', companies_1.CompanySchema),
13
- inject: [database_connection_enum_1.DatabaseConnection.COMPANY_CONNECTION],
14
- },
15
- {
16
- provide: database_model_enum_1.DatabaseModel.CONTACT_MODEL,
17
- useFactory: (connection) => connection.model('Contact', companies_1.ContactSchema),
18
- inject: [database_connection_enum_1.DatabaseConnection.COMPANY_CONNECTION],
19
- },
20
- {
21
- provide: 'ContactTestModel',
22
- useFactory: (connection) => connection.model('ContactTest', companies_1.ContactTestSchema),
23
- inject: [database_connection_enum_1.DatabaseConnection.COMPANY_CONNECTION],
24
- },
25
- {
26
- provide: database_model_enum_1.DatabaseModel.USER_MODEL,
27
- useFactory: (connection) => connection.model('User', users_1.UserSchema),
28
- inject: [database_connection_enum_1.DatabaseConnection.USER_CONNECTION],
29
- },
30
- {
31
- provide: database_model_enum_1.DatabaseModel.ROLE_PERMISSION_MODEL,
32
- useFactory: (connection) => connection.model('RolePermission', users_1.RolePermissionSchema),
33
- inject: [database_connection_enum_1.DatabaseConnection.USER_CONNECTION],
34
- },
35
- {
36
- provide: database_model_enum_1.DatabaseModel.EVENT_MODEL,
37
- useFactory: (connection) => connection.model('Event', events_1.EventSchema),
38
- inject: [database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION],
39
- },
8
+ ...companies_1.companiesProviders,
9
+ ...events_provider_1.eventProviders,
10
+ ...users_provider_1.userProviders,
40
11
  ];
41
12
  //# sourceMappingURL=model.providers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.providers.js","sourceRoot":"","sources":["../../../src/entities/models/model.providers.ts"],"names":[],"mappings":";;;AACA,mFAAyE;AACzE,yEAA+D;AAC/D,2CAMoB;AACpB,qCAAsC;AACtC,mCAA0D;AAE7C,QAAA,cAAc,GAAG;IAC5B;QACE,OAAO,EAAE,mCAAa,CAAC,aAAa;QACpC,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CACrC,UAAU,CAAC,KAAK,CAAwB,SAAS,EAAE,yBAAa,CAAC;QACnE,MAAM,EAAE,CAAC,6CAAkB,CAAC,kBAAkB,CAAC;KAChD;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,aAAa;QACpC,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CACrC,UAAU,CAAC,KAAK,CAAC,SAAS,EAAE,yBAAa,CAAC;QAC5C,MAAM,EAAE,CAAC,6CAAkB,CAAC,kBAAkB,CAAC;KAChD;IACD;QACE,OAAO,EAAE,kBAAkB;QAC3B,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CACrC,UAAU,CAAC,KAAK,CAAC,aAAa,EAAE,6BAAiB,CAAC;QACpD,MAAM,EAAE,CAAC,6CAAkB,CAAC,kBAAkB,CAAC;KAChD;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,UAAU;QACjC,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CACrC,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,kBAAU,CAAC;QACtC,MAAM,EAAE,CAAC,6CAAkB,CAAC,eAAe,CAAC;KAC7C;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,qBAAqB;QAC5C,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CACrC,UAAU,CAAC,KAAK,CAAC,gBAAgB,EAAE,4BAAoB,CAAC;QAC1D,MAAM,EAAE,CAAC,6CAAkB,CAAC,eAAe,CAAC;KAC7C;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,WAAW;QAClC,UAAU,EAAE,CAAC,UAAsB,EAAE,EAAE,CACrC,UAAU,CAAC,KAAK,CAAC,OAAO,EAAE,oBAAW,CAAC;QACxC,MAAM,EAAE,CAAC,6CAAkB,CAAC,gBAAgB,CAAC;KAC9C;CAEF,CAAA"}
1
+ {"version":3,"file":"model.providers.js","sourceRoot":"","sources":["../../../src/entities/models/model.providers.ts"],"names":[],"mappings":";;;AAAA,2CAAgD;AAChD,8DAAyD;AACzD,2DAAsD;AAEzC,QAAA,cAAc,GAAG;IAC5B,GAAG,8BAAkB;IACrB,GAAG,gCAAc;IACjB,GAAG,8BAAa;CACjB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/rolePermissions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAwC;AACxC,sDAAmC"}
@@ -49,7 +49,7 @@
49
49
  /// <reference types="mongoose/types/inferrawdoctype" />
50
50
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
51
  import mongoose from 'mongoose';
52
- import { CustomModel } from '../../../../db/CustomModel';
52
+ import { CustomModel } from '../../../../../db/CustomModel';
53
53
  export declare class Permission {
54
54
  _id: string;
55
55
  service: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"permission.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/rolePermissions/permission.entity.ts"],"names":[],"mappings":";;;AAAA,uCAA+B;AAG/B,MAAa,UAAU;CAOtB;AAPD,gCAOC;AAGY,QAAA,gBAAgB,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAGjD;IACA,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzC,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;IACnD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;IAClD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;IACnD,SAAS,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;CAC5D,CAAC,CAAA"}
@@ -0,0 +1,65 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/aggregate" />
25
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/callback" />
26
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/collection" />
27
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/connection" />
28
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/cursor" />
29
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/document" />
30
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/error" />
31
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/expressions" />
32
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/helpers" />
33
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/middlewares" />
34
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/indexes" />
35
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/models" />
36
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/mongooseoptions" />
37
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/pipelinestage" />
38
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/populate" />
39
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/query" />
40
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/schemaoptions" />
41
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/schematypes" />
42
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/session" />
43
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/types" />
44
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/utility" />
45
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/validation" />
46
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/virtuals" />
47
+ /// <reference types="@aldb2b/common/node_modules/mongoose" />
48
+ /// <reference types="mongoose/types/inferschematype" />
49
+ /// <reference types="mongoose/types/inferrawdoctype" />
50
+ /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
+ import { Connection } from 'mongoose';
52
+ import { UserRole } from '../users/user-role.enum';
53
+ import { UserType } from '../users/user-type.enum';
54
+ import { Permission } from './permission.entity';
55
+ import { CustomModel } from '../../../../../db/CustomModel';
56
+ export declare class RolePermission {
57
+ _id: string;
58
+ title?: UserRole;
59
+ type: UserType;
60
+ permissions: Permission[];
61
+ createdAt: Date;
62
+ updatedAt: Date;
63
+ }
64
+ export type RolePermissionModel = CustomModel<RolePermission>;
65
+ export declare const rolePermissionFactory: (connection: Connection) => void;
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rolePermissionFactory = exports.RolePermission = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ const user_role_enum_1 = require("../users/user-role.enum");
6
+ const user_type_enum_1 = require("../users/user-type.enum");
7
+ const validateProjectionResult_1 = require("../../../../../validators/validateProjectionResult");
8
+ const validateProjection_1 = require("../../../../../validators/validateProjection");
9
+ const validateNewItem_1 = require("../../../../../validators/validateNewItem");
10
+ const validateUpdateItem_1 = require("../../../../../validators/validateUpdateItem");
11
+ const permission_entity_1 = require("./permission.entity");
12
+ class RolePermission {
13
+ }
14
+ exports.RolePermission = RolePermission;
15
+ const rolePermissionFactory = (connection) => {
16
+ const rolePermissionSchema = new mongoose_1.default.Schema({
17
+ title: {
18
+ type: String,
19
+ enum: Object.values(user_role_enum_1.UserRole),
20
+ required: true,
21
+ validate: [
22
+ function validateRoleType() {
23
+ let enumValues;
24
+ if (this.type == user_type_enum_1.UserType.ADMIN) {
25
+ enumValues = [
26
+ user_role_enum_1.UserRole.ADMIN,
27
+ user_role_enum_1.UserRole.MANAGER,
28
+ user_role_enum_1.UserRole.OPERATION,
29
+ user_role_enum_1.UserRole.ONGROUND,
30
+ user_role_enum_1.UserRole.EDITOR,
31
+ ];
32
+ }
33
+ else if (this.type == user_type_enum_1.UserType.ORGANIZER) {
34
+ enumValues = [
35
+ user_role_enum_1.UserRole.ADMIN,
36
+ user_role_enum_1.UserRole.MANAGER,
37
+ user_role_enum_1.UserRole.OPERATION,
38
+ user_role_enum_1.UserRole.ONGROUND,
39
+ user_role_enum_1.UserRole.VIEWER,
40
+ ];
41
+ }
42
+ else if (this.type == user_type_enum_1.UserType.USER) {
43
+ enumValues = [user_role_enum_1.UserRole.USER, user_role_enum_1.UserRole.ADMIN];
44
+ }
45
+ if (enumValues.includes(this.title)) {
46
+ return true;
47
+ }
48
+ else {
49
+ return false;
50
+ }
51
+ },
52
+ 'Role title is incorrect',
53
+ ],
54
+ },
55
+ type: {
56
+ type: String,
57
+ enum: Object.values(user_type_enum_1.UserType),
58
+ required: true,
59
+ },
60
+ permissions: [{ type: permission_entity_1.PermissionSchema, required: true }],
61
+ createdAt: { type: Date, required: true, default: Date.now },
62
+ updatedAt: { type: Date, required: true, default: Date.now },
63
+ });
64
+ const allProjectionFieldArray = [
65
+ '_id',
66
+ 'title',
67
+ 'permissions',
68
+ 'type',
69
+ 'createdAt',
70
+ 'updatedAt',
71
+ ];
72
+ const allValidateNewItemFieldArray = [
73
+ '_id',
74
+ 'title',
75
+ 'permissions',
76
+ 'type',
77
+ 'createdAt',
78
+ 'updatedAt',
79
+ ];
80
+ const allValidateUpdateItemFieldArray = [
81
+ '_id',
82
+ 'title',
83
+ 'permissions',
84
+ 'type',
85
+ 'createdAt',
86
+ 'updatedAt',
87
+ ];
88
+ rolePermissionSchema.statics.validateProjectionResult =
89
+ necessaryProjectionObj => (0, validateProjectionResult_1.validateProjectionResult)(allProjectionFieldArray, necessaryProjectionObj);
90
+ rolePermissionSchema.statics.validateProjection = necessaryProjectionArray => (0, validateProjection_1.validateProjection)(allProjectionFieldArray, necessaryProjectionArray);
91
+ rolePermissionSchema.statics.validateNewItem = newItemObj => (0, validateNewItem_1.validateNewItem)(allValidateNewItemFieldArray, newItemObj);
92
+ rolePermissionSchema.statics.validateUpdateItem = updateItemObj => (0, validateUpdateItem_1.validateUpdateItem)(allValidateUpdateItemFieldArray, updateItemObj);
93
+ rolePermissionSchema.pre('findOneAndUpdate', async function (next) {
94
+ this._update.updatedAt = new Date();
95
+ next();
96
+ });
97
+ connection.model('User', rolePermissionSchema);
98
+ };
99
+ exports.rolePermissionFactory = rolePermissionFactory;
100
+ //# sourceMappingURL=role-permission.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"role-permission.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/rolePermissions/role-permission.entity.ts"],"names":[],"mappings":";;;AAAA,uCAA+C;AAC/C,4DAAkD;AAClD,4DAAkD;AAClD,iGAA6F;AAC7F,qFAAiF;AACjF,+EAA2E;AAC3E,qFAAiF;AACjF,2DAAkE;AAGlE,MAAa,cAAc;CAO1B;AAPD,wCAOC;AAGM,MAAM,qBAAqB,GAAG,CAAC,UAAsB,EAAE,EAAE;IAC9D,MAAM,oBAAoB,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAG9C;QACA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nC,IAAI,EAAE,CAAA;IACR,CAAC,CAAC,CAAA;IACF,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAA;AAChD,CAAC,CAAA;AAjGY,QAAA,qBAAqB,yBAiGjC"}
@@ -49,7 +49,7 @@
49
49
  /// <reference types="mongoose/types/inferrawdoctype" />
50
50
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
51
  import * as mongoose from 'mongoose';
52
- import { CustomModel } from '../../../../db/CustomModel';
52
+ import { CustomModel } from '../../../../../db/CustomModel';
53
53
  export declare class ChatInfo {
54
54
  _id: string;
55
55
  password: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-info.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/users/chat-info.entity.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAGpC,MAAa,QAAQ;CAIpB;AAJD,4BAIC;AAEY,QAAA,cAAc,GAAG,IAAI,QAAQ,CAAC,MAAM,CAA0B;IACzE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;CACxB,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-info-operations.enum.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/users/event-info-operations.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;AACnB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
@@ -49,11 +49,10 @@
49
49
  /// <reference types="mongoose/types/inferrawdoctype" />
50
50
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
51
  import * as mongoose from 'mongoose';
52
- import { Contact, Company } from '../../companies';
53
- import { OnboardedThru } from '../../../../types/onboarded-thru.enum';
54
- import { Event } from '../../events';
52
+ import { Contact, Company } from '../../../companies';
53
+ import { OnboardedThru } from '../../../../../types/onboarded-thru.enum';
55
54
  import { RolePermission } from '../rolePermissions/role-permission.entity';
56
- import { CustomModel } from '../../../../db/CustomModel';
55
+ import { CustomModel } from '../../../../../db/CustomModel';
57
56
  export declare class EventInfo {
58
57
  _id: string;
59
58
  eventId: Event;
@@ -2,15 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EventInfoSchema = exports.EventInfo = void 0;
4
4
  const mongoose = require("mongoose");
5
- const onboarded_thru_enum_1 = require("../../../../types/onboarded-thru.enum");
5
+ const onboarded_thru_enum_1 = require("../../../../../types/onboarded-thru.enum");
6
6
  const ObjectId = mongoose.Schema.Types.ObjectId;
7
7
  class EventInfo {
8
8
  }
9
9
  exports.EventInfo = EventInfo;
10
10
  exports.EventInfoSchema = new mongoose.Schema({
11
11
  eventId: { type: ObjectId, ref: 'Event', required: true },
12
- companyId: { type: ObjectId },
13
- contactId: { type: ObjectId },
12
+ companyId: { type: ObjectId, ref: 'Company' },
13
+ contactId: { type: ObjectId, ref: 'Contact' },
14
14
  role: { type: ObjectId, ref: 'RolePermission', required: true },
15
15
  onboardedThru: {
16
16
  type: String,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-info.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/users/event-info.entity.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAEpC,kFAAwE;AAIxE,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AAE/C,MAAa,SAAS;CASrB;AATD,8BASC;AAGY,QAAA,eAAe,GAAG,IAAI,QAAQ,CAAC,MAAM,CAA4B;IAC5E,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE;IAC7C,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE;IAC7C,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC/D,aAAa,EAAE;QACb,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,mCAAa,CAAC;QAClC,QAAQ,EAAE,IAAI;KACf;IACD,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;IAC5D,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;CAC7D,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/users/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC;AAClC,sDAAmC;AACnC,+DAA4C;AAC5C,oDAAiC;AACjC,gDAA6B;AAC7B,mDAAgC;AAChC,qDAAkC;AAClC,mDAAgC"}
@@ -49,7 +49,7 @@
49
49
  /// <reference types="mongoose/types/inferrawdoctype" />
50
50
  /// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
51
51
  import * as mongoose from 'mongoose';
52
- import { CustomModel } from '../../../../db/CustomModel';
52
+ import { CustomModel } from '../../../../../db/CustomModel';
53
53
  export declare class Location {
54
54
  _id: string;
55
55
  type: string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/users/entities/users/location.entity.ts"],"names":[],"mappings":";;;AAAA,qCAAoC;AAGpC,MAAa,QAAQ;CAIpB;AAJD,4BAIC;AAEY,QAAA,cAAc,GAAG,IAAI,QAAQ,CAAC,MAAM,CAA0B;IACzE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE;IACzE,WAAW,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;CAChD,CAAC,CAAA"}