@aldb2b/common 1.0.597 → 1.0.599
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/build/entities/models/companies/entities/contact.entity.d.ts +1 -0
- package/build/entities/models/companies/entities/contact.entity.js.map +1 -1
- package/build/entities/models/events/entities/db-record-status.enum.d.ts +8 -0
- package/build/entities/models/events/entities/db-record-status.enum.js +13 -0
- package/build/entities/models/events/entities/db-record-status.enum.js.map +1 -0
- package/build/entities/models/events/entities/event/event.entity.d.ts +89 -0
- package/build/entities/models/events/entities/event/event.entity.js +170 -0
- package/build/entities/models/events/entities/event/event.entity.js.map +1 -0
- package/build/entities/models/events/entities/eventType/event-type.entity.d.ts +65 -0
- package/build/entities/models/events/entities/eventType/event-type.entity.js +57 -0
- package/build/entities/models/events/entities/eventType/event-type.entity.js.map +1 -0
- package/build/entities/models/events/entities/priority.enum.d.ts +6 -0
- package/build/entities/models/events/entities/priority.enum.js +11 -0
- package/build/entities/models/events/entities/priority.enum.js.map +1 -0
- package/build/entities/models/events/entities/{event.entity.d.ts → timestamp.d.ts} +7 -7
- package/build/entities/models/events/entities/timestamp.js +12 -0
- package/build/entities/models/events/entities/timestamp.js.map +1 -0
- package/build/entities/models/events/events.provider.d.ts +9 -3
- package/build/entities/models/events/events.provider.js +7 -1
- package/build/entities/models/events/events.provider.js.map +1 -1
- package/build/entities/models/events/index.d.ts +5 -1
- package/build/entities/models/events/index.js +5 -1
- package/build/entities/models/events/index.js.map +1 -1
- package/build/entities/models/model.providers.d.ts +7 -1
- package/build/entities/models/users/entities/users/user.entity.js +5 -2
- package/build/entities/models/users/entities/users/user.entity.js.map +1 -1
- package/build/enums/database-model.enum.d.ts +1 -0
- package/build/enums/database-model.enum.js +1 -0
- package/build/enums/database-model.enum.js.map +1 -1
- package/build/events/subjects.d.ts +0 -1
- package/build/events/subjects.js +0 -1
- package/build/events/subjects.js.map +1 -1
- package/build/index.d.ts +0 -2
- package/build/index.js +0 -2
- package/build/index.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/build/entities/models/events/entities/event.entity.js +0 -22
- package/build/entities/models/events/entities/event.entity.js.map +0 -1
- package/build/events/create-user-event.interface.d.ts +0 -12
- package/build/events/create-user-event.interface.js +0 -3
- package/build/events/create-user-event.interface.js.map +0 -1
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
import { Company } from './company.entity';
|
|
52
52
|
import { CustomModel } from '../../../../db/CustomModel';
|
|
53
53
|
import { Connection, Document } from 'mongoose';
|
|
54
|
+
import { Event } from '../../events';
|
|
54
55
|
export declare class Contact extends Document {
|
|
55
56
|
_id: string;
|
|
56
57
|
eventId: Event;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contact.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/companies/entities/contact.entity.ts"],"names":[],"mappings":";;;AAEA,uCAAuD;AACvD,mEAA6D;AAC7D,8FAA0F;AAC1F,kFAA8E;AAC9E,iFAA4E;
|
|
1
|
+
{"version":3,"file":"contact.entity.js","sourceRoot":"","sources":["../../../../../src/entities/models/companies/entities/contact.entity.ts"],"names":[],"mappings":";;;AAEA,uCAAuD;AACvD,mEAA6D;AAC7D,8FAA0F;AAC1F,kFAA8E;AAC9E,iFAA4E;AAG5E,MAAM,QAAQ,GAAG,iBAAM,CAAC,KAAK,CAAC,QAAQ,CAAA;AAEtC,MAAa,OAAQ,SAAQ,mBAAQ;CASpC;AATD,0BASC;AAGM,MAAM,cAAc,GAAG,CAC5B,UAAsB,EACtB,eAA2B,EAC3B,EAAE;IACF,MAAM,aAAa,GAAG,IAAI,iBAAM,CAC9B;QACE,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAA,2BAAW,EAAoB,OAAO,EAAE,eAAe,CAAC;YAC7D,QAAQ,EAAE,IAAI;SACf;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE,IAAA,2BAAW,EAAwB,SAAS,EAAE,UAAU,CAAC;YAC9D,QAAQ,EAAE,IAAI;SACf;QACD,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC1C,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACvB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;KACxC,EACD,EAAE,gBAAgB,EAAE,GAAG,EAAE,CAC1B,CAAA;IAED,MAAM,uBAAuB,GAAG;QAC9B,KAAK;QACL,SAAS;QACT,SAAS;QACT,WAAW;QACX,UAAU;QACV,OAAO;QACP,QAAQ;QACR,OAAO;KACR,CAAA;IAED,aAAa,CAAC,OAAO,CAAC,wBAAwB,GAAG,sBAAsB,CAAC,EAAE,CACxE,IAAA,mDAAwB,EAAC,uBAAuB,EAAE,sBAAsB,CAAC,CAAA;IAE3E,aAAa,CAAC,OAAO,CAAC,kBAAkB,GAAG,wBAAwB,CAAC,EAAE,CACpE,IAAA,uCAAkB,EAAC,uBAAuB,EAAE,wBAAwB,CAAC,CAAA;IAEvE,OAAO,IAAA,8BAAa,EAClB,SAAS,EACT,UAAU,EACV,aAAa,CACd,CAAA;AACH,CAAC,CAAA;AA/CY,QAAA,cAAc,kBA+C1B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DbRecordStatus = void 0;
|
|
4
|
+
var DbRecordStatus;
|
|
5
|
+
(function (DbRecordStatus) {
|
|
6
|
+
DbRecordStatus["ONGOING"] = "ongoing";
|
|
7
|
+
DbRecordStatus["CLOSED"] = "closed";
|
|
8
|
+
DbRecordStatus["SCHEDULED"] = "scheduled";
|
|
9
|
+
DbRecordStatus["ACTIVE"] = "active";
|
|
10
|
+
DbRecordStatus["INACTIVE"] = "inactive";
|
|
11
|
+
DbRecordStatus["DELETED"] = "deleted";
|
|
12
|
+
})(DbRecordStatus || (exports.DbRecordStatus = DbRecordStatus = {}));
|
|
13
|
+
//# sourceMappingURL=db-record-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-record-status.enum.js","sourceRoot":"","sources":["../../../../../src/entities/models/events/entities/db-record-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,cAOX;AAPD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,mCAAiB,CAAA;IACjB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;IACjB,uCAAqB,CAAA;IACrB,qCAAmB,CAAA;AACrB,CAAC,EAPW,cAAc,8BAAd,cAAc,QAOzB"}
|
|
@@ -0,0 +1,89 @@
|
|
|
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 { CustomModel } from '../../../../../db/CustomModel';
|
|
52
|
+
import { Connection, Document } from 'mongoose';
|
|
53
|
+
import { Timestamp } from '../timestamp';
|
|
54
|
+
import { User } from '../../../../../entities/models/users';
|
|
55
|
+
import { Company } from '../../../../../entities/models/companies';
|
|
56
|
+
import { EventType } from '../eventType/event-type.entity';
|
|
57
|
+
import { PriorityEnum } from '../priority.enum';
|
|
58
|
+
export declare class Event extends Document {
|
|
59
|
+
_id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
subdomain: string;
|
|
62
|
+
countryId: any;
|
|
63
|
+
cityId: any;
|
|
64
|
+
eventTypeId: EventType;
|
|
65
|
+
companyId?: Company;
|
|
66
|
+
userId: User;
|
|
67
|
+
timestamps?: Timestamp[];
|
|
68
|
+
attendees?: number[];
|
|
69
|
+
exhibitors?: number[];
|
|
70
|
+
sponsors?: number[];
|
|
71
|
+
sponsors_applicable?: false;
|
|
72
|
+
description: string;
|
|
73
|
+
isPublicEvent: boolean;
|
|
74
|
+
isMeetingHubEvent: boolean;
|
|
75
|
+
maxUsers: number;
|
|
76
|
+
priority: PriorityEnum;
|
|
77
|
+
ordering: number;
|
|
78
|
+
fromEmail?: string;
|
|
79
|
+
AndroidSNS?: string;
|
|
80
|
+
IOS_SNS?: string;
|
|
81
|
+
timezone?: string;
|
|
82
|
+
status?: string;
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
updatedAt: Date;
|
|
85
|
+
}
|
|
86
|
+
export type EventModel = CustomModel<Event>;
|
|
87
|
+
export declare const eventFactory: (connection: Connection, companyConnection: Connection, userConnection: Connection) => import("mongoose").Model<Event, {}, {}, {}, Document<unknown, {}, Event> & Event & Required<{
|
|
88
|
+
_id: string;
|
|
89
|
+
}>, any>;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.eventFactory = exports.Event = void 0;
|
|
4
|
+
const validateProjectionResult_1 = require("../../../../../validators/validateProjectionResult");
|
|
5
|
+
const validateProjection_1 = require("../../../../../validators/validateProjection");
|
|
6
|
+
const mongoose_1 = require("mongoose");
|
|
7
|
+
const generate_model_1 = require("../../../../../entities/services/generate-model");
|
|
8
|
+
const validateNewItem_1 = require("../../../../../validators/validateNewItem");
|
|
9
|
+
const validateUpdateItem_1 = require("../../../../../validators/validateUpdateItem");
|
|
10
|
+
const timestamp_1 = require("../timestamp");
|
|
11
|
+
const db_record_status_enum_1 = require("../db-record-status.enum");
|
|
12
|
+
const services_1 = require("../../../../../entities/services");
|
|
13
|
+
const priority_enum_1 = require("../priority.enum");
|
|
14
|
+
const ObjectId = mongoose_1.Schema.Types.ObjectId;
|
|
15
|
+
class Event extends mongoose_1.Document {
|
|
16
|
+
}
|
|
17
|
+
exports.Event = Event;
|
|
18
|
+
const eventFactory = (connection, companyConnection, userConnection) => {
|
|
19
|
+
const eventSchema = new mongoose_1.Schema({
|
|
20
|
+
name: { type: String, required: true, trim: true },
|
|
21
|
+
subdomain: { type: String, required: true, trim: true },
|
|
22
|
+
countryId: {
|
|
23
|
+
type: ObjectId,
|
|
24
|
+
ref: (0, services_1.getModelRef)('Country', companyConnection),
|
|
25
|
+
required: true,
|
|
26
|
+
trim: true,
|
|
27
|
+
},
|
|
28
|
+
cityId: {
|
|
29
|
+
type: ObjectId,
|
|
30
|
+
ref: (0, services_1.getModelRef)('City', companyConnection),
|
|
31
|
+
required: true,
|
|
32
|
+
trim: true,
|
|
33
|
+
},
|
|
34
|
+
eventTypeId: {
|
|
35
|
+
type: ObjectId,
|
|
36
|
+
ref: (0, services_1.getModelRef)('Company', connection),
|
|
37
|
+
required: true,
|
|
38
|
+
trim: true,
|
|
39
|
+
},
|
|
40
|
+
companyId: {
|
|
41
|
+
type: ObjectId,
|
|
42
|
+
ref: (0, services_1.getModelRef)('Company', companyConnection),
|
|
43
|
+
},
|
|
44
|
+
userId: {
|
|
45
|
+
type: ObjectId,
|
|
46
|
+
ref: (0, services_1.getModelRef)('User', userConnection),
|
|
47
|
+
required: true,
|
|
48
|
+
},
|
|
49
|
+
timestamps: [{ type: timestamp_1.TimestampSchema, default: [] }],
|
|
50
|
+
attendees: [{ type: Number, default: [] }],
|
|
51
|
+
exhibitors: [{ type: Number, default: [] }],
|
|
52
|
+
sponsors: [{ type: Number, default: [] }],
|
|
53
|
+
sponsors_applicable: { type: Boolean, default: false },
|
|
54
|
+
description: { type: String, trim: true },
|
|
55
|
+
isPublicEvent: { type: Boolean, default: false },
|
|
56
|
+
isMeetingHubEvent: { type: Boolean, default: false },
|
|
57
|
+
maxUsers: { type: Number },
|
|
58
|
+
priority: {
|
|
59
|
+
type: String,
|
|
60
|
+
enum: Object.values(priority_enum_1.PriorityEnum),
|
|
61
|
+
default: priority_enum_1.PriorityEnum.NORMAL,
|
|
62
|
+
},
|
|
63
|
+
ordering: { type: Number, default: 1 },
|
|
64
|
+
fromEmail: { type: String },
|
|
65
|
+
AndroidSNS: { type: String },
|
|
66
|
+
IOS_SNS: { type: String },
|
|
67
|
+
timezone: { type: String },
|
|
68
|
+
status: {
|
|
69
|
+
type: String,
|
|
70
|
+
default: db_record_status_enum_1.DbRecordStatus.ACTIVE,
|
|
71
|
+
},
|
|
72
|
+
createdAt: { type: Date, required: true, default: Date.now },
|
|
73
|
+
updatedAt: { type: Date, required: true, default: Date.now },
|
|
74
|
+
}, { discriminatorKey: '1' });
|
|
75
|
+
const allProjectionFieldArray = [
|
|
76
|
+
'_id',
|
|
77
|
+
'name',
|
|
78
|
+
'subdomain',
|
|
79
|
+
'countryId',
|
|
80
|
+
'cityId',
|
|
81
|
+
'eventTypeId',
|
|
82
|
+
'companyId',
|
|
83
|
+
'userId',
|
|
84
|
+
'timestamps',
|
|
85
|
+
'attendees',
|
|
86
|
+
'exhibitors',
|
|
87
|
+
'sponsors',
|
|
88
|
+
'sponsors_applicable',
|
|
89
|
+
'description',
|
|
90
|
+
'isPublicEvent',
|
|
91
|
+
'isMeetingHubEvent',
|
|
92
|
+
'maxUsers',
|
|
93
|
+
'priority',
|
|
94
|
+
'ordering',
|
|
95
|
+
'fromEmail',
|
|
96
|
+
'IOS_SNS',
|
|
97
|
+
'AndroidSNS',
|
|
98
|
+
'timezone',
|
|
99
|
+
'status',
|
|
100
|
+
'createdAt',
|
|
101
|
+
'updatedAt',
|
|
102
|
+
];
|
|
103
|
+
const allValidateNewItemFieldArray = [
|
|
104
|
+
'_id',
|
|
105
|
+
'name',
|
|
106
|
+
'subdomain',
|
|
107
|
+
'countryId',
|
|
108
|
+
'cityId',
|
|
109
|
+
'eventTypeId',
|
|
110
|
+
'companyId',
|
|
111
|
+
'userId',
|
|
112
|
+
'timestamps',
|
|
113
|
+
'attendees',
|
|
114
|
+
'exhibitors',
|
|
115
|
+
'sponsors',
|
|
116
|
+
'sponsors_applicable',
|
|
117
|
+
'description',
|
|
118
|
+
'isPublicEvent',
|
|
119
|
+
'isMeetingHubEvent',
|
|
120
|
+
'maxUsers',
|
|
121
|
+
'priority',
|
|
122
|
+
'ordering',
|
|
123
|
+
'fromEmail',
|
|
124
|
+
'IOS_SNS',
|
|
125
|
+
'AndroidSNS',
|
|
126
|
+
'timezone',
|
|
127
|
+
'status',
|
|
128
|
+
'createdAt',
|
|
129
|
+
'updatedAt',
|
|
130
|
+
];
|
|
131
|
+
const allValidateUpdateItemFieldArray = [
|
|
132
|
+
'_id',
|
|
133
|
+
'name',
|
|
134
|
+
'subdomain',
|
|
135
|
+
'countryId',
|
|
136
|
+
'cityId',
|
|
137
|
+
'eventTypeId',
|
|
138
|
+
'companyId',
|
|
139
|
+
'userId',
|
|
140
|
+
'timestamps',
|
|
141
|
+
'attendees',
|
|
142
|
+
'exhibitors',
|
|
143
|
+
'sponsors',
|
|
144
|
+
'sponsors_applicable',
|
|
145
|
+
'description',
|
|
146
|
+
'isPublicEvent',
|
|
147
|
+
'isMeetingHubEvent',
|
|
148
|
+
'maxUsers',
|
|
149
|
+
'priority',
|
|
150
|
+
'ordering',
|
|
151
|
+
'fromEmail',
|
|
152
|
+
'IOS_SNS',
|
|
153
|
+
'AndroidSNS',
|
|
154
|
+
'timezone',
|
|
155
|
+
'status',
|
|
156
|
+
'createdAt',
|
|
157
|
+
'updatedAt',
|
|
158
|
+
];
|
|
159
|
+
eventSchema.statics.validateProjectionResult = necessaryProjectionObj => (0, validateProjectionResult_1.validateProjectionResult)(allProjectionFieldArray, necessaryProjectionObj);
|
|
160
|
+
eventSchema.statics.validateProjection = necessaryProjectionArray => (0, validateProjection_1.validateProjection)(allProjectionFieldArray, necessaryProjectionArray);
|
|
161
|
+
eventSchema.statics.validateNewItem = newItemObj => (0, validateNewItem_1.validateNewItem)(allValidateNewItemFieldArray, newItemObj);
|
|
162
|
+
eventSchema.statics.validateUpdateItem = updateItemObj => (0, validateUpdateItem_1.validateUpdateItem)(allValidateUpdateItemFieldArray, updateItemObj);
|
|
163
|
+
eventSchema.pre('findOneAndUpdate', async function (next) {
|
|
164
|
+
this._update.updatedAt = new Date();
|
|
165
|
+
next();
|
|
166
|
+
});
|
|
167
|
+
return (0, generate_model_1.generateModel)('Event', connection, eventSchema);
|
|
168
|
+
};
|
|
169
|
+
exports.eventFactory = eventFactory;
|
|
170
|
+
//# sourceMappingURL=event.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/events/entities/event/event.entity.ts"],"names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ACV,WAAW;QACX,SAAS;QACT,YAAY;QACZ,UAAU;QACV,QAAQ;QACR,WAAW;QACX,WAAW;KACZ,CAAA;IAED,WAAW,CAAC,OAAO,CAAC,wBAAwB,GAAG,sBAAsB,CAAC,EAAE,CACtE,IAAA,mDAAwB,EAAC,uBAAuB,EAAE,sBAAsB,CAAC,CAAA;IAE3E,WAAW,CAAC,OAAO,CAAC,kBAAkB,GAAG,wBAAwB,CAAC,EAAE,CAClE,IAAA,uCAAkB,EAAC,uBAAuB,EAAE,wBAAwB,CAAC,CAAA;IAEvE,WAAW,CAAC,OAAO,CAAC,eAAe,GAAG,UAAU,CAAC,EAAE,CACjD,IAAA,iCAAe,EAAC,4BAA4B,EAAE,UAAU,CAAC,CAAA;IAE3D,WAAW,CAAC,OAAO,CAAC,kBAAkB,GAAG,aAAa,CAAC,EAAE,CACvD,IAAA,uCAAkB,EAAC,+BAA+B,EAAE,aAAa,CAAC,CAAA;IAEpE,WAAW,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,WAAiB,IAAI;QAG5D,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAA;QACnC,IAAI,EAAE,CAAA;IACR,CAAC,CAAC,CAAA;IAEF,OAAO,IAAA,8BAAa,EAAoB,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAA;AAC3E,CAAC,CAAA;AA5KY,QAAA,YAAY,gBA4KxB"}
|
|
@@ -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 { CustomModel } from '../../../../../db/CustomModel';
|
|
52
|
+
import { DbRecordStatus } from '../db-record-status.enum';
|
|
53
|
+
import { Connection } from 'mongoose';
|
|
54
|
+
export type EventTypeDocument = EventType & Document;
|
|
55
|
+
export declare class EventType {
|
|
56
|
+
_id?: string;
|
|
57
|
+
type: string;
|
|
58
|
+
status: DbRecordStatus;
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
updatedAt: Date;
|
|
61
|
+
}
|
|
62
|
+
export type EventTypeModel = CustomModel<EventType>;
|
|
63
|
+
export declare const eventTypeFactory: (connection: Connection) => import("mongoose").Model<EventType, {}, {}, {}, import("mongoose").Document<unknown, {}, EventType> & EventType & Required<{
|
|
64
|
+
_id: string;
|
|
65
|
+
}>, any>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.eventTypeFactory = exports.EventType = void 0;
|
|
4
|
+
const db_record_status_enum_1 = require("../db-record-status.enum");
|
|
5
|
+
const mongoose_1 = require("mongoose");
|
|
6
|
+
const services_1 = require("../../../../../entities/services");
|
|
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
|
+
class EventType {
|
|
12
|
+
}
|
|
13
|
+
exports.EventType = EventType;
|
|
14
|
+
const eventTypeFactory = (connection) => {
|
|
15
|
+
const eventTypeSchema = new mongoose_1.Schema({
|
|
16
|
+
type: { type: String, required: true, trim: true },
|
|
17
|
+
status: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: db_record_status_enum_1.DbRecordStatus.INACTIVE,
|
|
20
|
+
enum: Object.values(db_record_status_enum_1.DbRecordStatus),
|
|
21
|
+
},
|
|
22
|
+
createdAt: { type: Date, required: true, default: Date.now },
|
|
23
|
+
updatedAt: { type: Date, required: true, default: Date.now },
|
|
24
|
+
}, { discriminatorKey: '1' });
|
|
25
|
+
const allProjectionFieldArray = [
|
|
26
|
+
'_id',
|
|
27
|
+
'type',
|
|
28
|
+
'status',
|
|
29
|
+
'createdAt',
|
|
30
|
+
'updatedAt',
|
|
31
|
+
];
|
|
32
|
+
const allValidateNewItemFieldArray = [
|
|
33
|
+
'_id',
|
|
34
|
+
'type',
|
|
35
|
+
'status',
|
|
36
|
+
'createdAt',
|
|
37
|
+
'updatedAt',
|
|
38
|
+
];
|
|
39
|
+
const allValidateUpdateItemFieldArray = [
|
|
40
|
+
'_id',
|
|
41
|
+
'type',
|
|
42
|
+
'status',
|
|
43
|
+
'createdAt',
|
|
44
|
+
'updatedAt',
|
|
45
|
+
];
|
|
46
|
+
eventTypeSchema.statics.validateProjectionResult = necessaryProjectionObj => (0, validateProjectionResult_1.validateProjectionResult)(allProjectionFieldArray, necessaryProjectionObj);
|
|
47
|
+
eventTypeSchema.statics.validateProjection = necessaryProjectionArray => (0, validateProjection_1.validateProjection)(allProjectionFieldArray, necessaryProjectionArray);
|
|
48
|
+
eventTypeSchema.statics.validateNewItem = newItemObj => (0, validateNewItem_1.validateNewItem)(allValidateNewItemFieldArray, newItemObj);
|
|
49
|
+
eventTypeSchema.statics.validateUpdateItem = updateItemObj => (0, validateUpdateItem_1.validateUpdateItem)(allValidateUpdateItemFieldArray, updateItemObj);
|
|
50
|
+
eventTypeSchema.pre('findOneAndUpdate', async function (next) {
|
|
51
|
+
this._update.updatedAt = new Date();
|
|
52
|
+
next();
|
|
53
|
+
});
|
|
54
|
+
return (0, services_1.generateModel)('EventType', connection, eventTypeSchema);
|
|
55
|
+
};
|
|
56
|
+
exports.eventTypeFactory = eventTypeFactory;
|
|
57
|
+
//# sourceMappingURL=event-type.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-type.entity.js","sourceRoot":"","sources":["../../../../../../src/entities/models/events/entities/eventType/event-type.entity.ts"],"names":[],"mappings":";;;AACA,oEAAyD;AACzD,uCAA6C;AAC7C,+DAAgE;AAChE,iGAA6F;AAC7F,qFAAiF;AACjF,+EAA2E;AAC3E,qFAAiF;AAGjF,MAAa,SAAS;CAMrB;AAND,8BAMC;AAIM,MAAM,gBAAgB,GAAG,CAAC,UAAsB,EAAE,EAAE;IACzD,MAAM,eAAe,GAAG,IAAI,iBAAM,CAChC;QACE,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAClD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM;YACZ,OAAO,EAAE,sCAAc,CAAC,QAAQ;YAChC,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,sCAAc,CAAC;SACpC;QACD,SAAS,EAAE,EAAE,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BAAa,EAClB,WAAW,EACX,UAAU,EACV,eAAe,CAChB,CAAA;AACH,CAAC,CAAA;AA/DY,QAAA,gBAAgB,oBA+D5B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PriorityEnum = void 0;
|
|
4
|
+
var PriorityEnum;
|
|
5
|
+
(function (PriorityEnum) {
|
|
6
|
+
PriorityEnum["VIP"] = "VIP";
|
|
7
|
+
PriorityEnum["HIGH"] = "High";
|
|
8
|
+
PriorityEnum["NORMAL"] = "Normal";
|
|
9
|
+
PriorityEnum["LOW"] = "Low";
|
|
10
|
+
})(PriorityEnum || (exports.PriorityEnum = PriorityEnum = {}));
|
|
11
|
+
//# sourceMappingURL=priority.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"priority.enum.js","sourceRoot":"","sources":["../../../../../src/entities/models/events/entities/priority.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,2BAAW,CAAA;IACX,6BAAa,CAAA;IACb,iCAAiB,CAAA;IACjB,2BAAW,CAAA;AACb,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB"}
|
|
@@ -48,14 +48,14 @@
|
|
|
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 mongoose, { Document } from 'mongoose';
|
|
51
52
|
import { CustomModel } from '../../../../db/CustomModel';
|
|
52
|
-
|
|
53
|
-
export declare class Event extends Document {
|
|
53
|
+
export declare class Timestamp extends Document {
|
|
54
54
|
_id: string;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
startDate: Date;
|
|
56
|
+
endDate: Date;
|
|
57
57
|
}
|
|
58
|
-
export type
|
|
59
|
-
export declare const
|
|
58
|
+
export type TimestampModel = CustomModel<Timestamp>;
|
|
59
|
+
export declare const TimestampSchema: mongoose.Schema<Timestamp, TimestampModel, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, Timestamp, mongoose.Document<unknown, {}, mongoose.FlatRecord<Timestamp>> & mongoose.FlatRecord<Timestamp> & Required<{
|
|
60
60
|
_id: string;
|
|
61
|
-
}
|
|
61
|
+
}>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimestampSchema = exports.Timestamp = void 0;
|
|
4
|
+
const mongoose_1 = require("mongoose");
|
|
5
|
+
class Timestamp extends mongoose_1.Document {
|
|
6
|
+
}
|
|
7
|
+
exports.Timestamp = Timestamp;
|
|
8
|
+
exports.TimestampSchema = new mongoose_1.default.Schema({
|
|
9
|
+
startDate: { type: Date },
|
|
10
|
+
endDate: { type: Date },
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=timestamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../../src/entities/models/events/entities/timestamp.ts"],"names":[],"mappings":";;;AAAA,uCAA6C;AAG7C,MAAa,SAAU,SAAQ,mBAAQ;CAItC;AAJD,8BAIC;AAEY,QAAA,eAAe,GAAG,IAAI,kBAAQ,CAAC,MAAM,CAA4B;IAC5E,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACzB,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CACxB,CAAC,CAAA"}
|
|
@@ -51,10 +51,16 @@
|
|
|
51
51
|
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
52
52
|
import { DatabaseModel } from '../../../enums/database-model.enum';
|
|
53
53
|
import { DatabaseConnection } from '../../../enums/database-connection.enum';
|
|
54
|
-
export declare const eventProviders: {
|
|
54
|
+
export declare const eventProviders: ({
|
|
55
55
|
provide: DatabaseModel;
|
|
56
|
-
useFactory: (connection: import("mongoose").Connection) => import("mongoose").Model<import("./entities/event.entity").Event, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./entities/event.entity").Event> & import("./entities/event.entity").Event & Required<{
|
|
56
|
+
useFactory: (connection: import("mongoose").Connection, companyConnection: import("mongoose").Connection, userConnection: import("mongoose").Connection) => import("mongoose").Model<import("./entities/event/event.entity").Event, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./entities/event/event.entity").Event> & import("./entities/event/event.entity").Event & Required<{
|
|
57
57
|
_id: string;
|
|
58
58
|
}>, any>;
|
|
59
59
|
inject: DatabaseConnection[];
|
|
60
|
-
}
|
|
60
|
+
} | {
|
|
61
|
+
provide: DatabaseModel;
|
|
62
|
+
useFactory: (connection: import("mongoose").Connection) => import("mongoose").Model<import("./entities/eventType/event-type.entity").EventType, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./entities/eventType/event-type.entity").EventType> & import("./entities/eventType/event-type.entity").EventType & Required<{
|
|
63
|
+
_id: string;
|
|
64
|
+
}>, any>;
|
|
65
|
+
inject: DatabaseConnection[];
|
|
66
|
+
})[];
|
|
@@ -3,12 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.eventProviders = void 0;
|
|
4
4
|
const database_model_enum_1 = require("../../../enums/database-model.enum");
|
|
5
5
|
const database_connection_enum_1 = require("../../../enums/database-connection.enum");
|
|
6
|
-
const event_entity_1 = require("./entities/event.entity");
|
|
6
|
+
const event_entity_1 = require("./entities/event/event.entity");
|
|
7
|
+
const event_type_entity_1 = require("./entities/eventType/event-type.entity");
|
|
7
8
|
exports.eventProviders = [
|
|
8
9
|
{
|
|
9
10
|
provide: database_model_enum_1.DatabaseModel.EVENT_MODEL,
|
|
10
11
|
useFactory: event_entity_1.eventFactory,
|
|
11
12
|
inject: [database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION],
|
|
12
13
|
},
|
|
14
|
+
{
|
|
15
|
+
provide: database_model_enum_1.DatabaseModel.EVENT_TYPE_MODEL,
|
|
16
|
+
useFactory: event_type_entity_1.eventTypeFactory,
|
|
17
|
+
inject: [database_connection_enum_1.DatabaseConnection.EVENT_CONNECTION],
|
|
18
|
+
},
|
|
13
19
|
];
|
|
14
20
|
//# sourceMappingURL=events.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/events/events.provider.ts"],"names":[],"mappings":";;;AAAA,4EAAkE;AAClE,sFAA4E;AAC5E,
|
|
1
|
+
{"version":3,"file":"events.provider.js","sourceRoot":"","sources":["../../../../src/entities/models/events/events.provider.ts"],"names":[],"mappings":";;;AAAA,4EAAkE;AAClE,sFAA4E;AAC5E,gEAA4D;AAC5D,8EAAyE;AAE5D,QAAA,cAAc,GAAG;IAC5B;QACE,OAAO,EAAE,mCAAa,CAAC,WAAW;QAClC,UAAU,EAAE,2BAAY;QACxB,MAAM,EAAE,CAAC,6CAAkB,CAAC,gBAAgB,CAAC;KAC9C;IACD;QACE,OAAO,EAAE,mCAAa,CAAC,gBAAgB;QACvC,UAAU,EAAE,oCAAgB;QAC5B,MAAM,EAAE,CAAC,6CAAkB,CAAC,gBAAgB,CAAC;KAC9C;CACF,CAAA"}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
export * from './entities/event.entity';
|
|
1
|
+
export * from './entities/event/event.entity';
|
|
2
|
+
export * from './entities/eventType/event-type.entity';
|
|
2
3
|
export * from './events.provider';
|
|
4
|
+
export * from './entities/db-record-status.enum';
|
|
5
|
+
export * from './entities/priority.enum';
|
|
6
|
+
export * from './entities/timestamp';
|
|
@@ -14,6 +14,10 @@ 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("./entities/event.entity"), exports);
|
|
17
|
+
__exportStar(require("./entities/event/event.entity"), exports);
|
|
18
|
+
__exportStar(require("./entities/eventType/event-type.entity"), exports);
|
|
18
19
|
__exportStar(require("./events.provider"), exports);
|
|
20
|
+
__exportStar(require("./entities/db-record-status.enum"), exports);
|
|
21
|
+
__exportStar(require("./entities/priority.enum"), exports);
|
|
22
|
+
__exportStar(require("./entities/timestamp"), exports);
|
|
19
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/models/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA6C;AAC7C,yEAAsD;AACtD,oDAAiC;AACjC,mEAAgD;AAChD,2DAAwC;AACxC,uDAAoC"}
|
|
@@ -51,7 +51,13 @@
|
|
|
51
51
|
/// <reference types="@aldb2b/common/node_modules/mongoose/types/inferschematype" />
|
|
52
52
|
export declare const modelProviders: ({
|
|
53
53
|
provide: import("../..").DatabaseModel;
|
|
54
|
-
useFactory: (connection: import("mongoose").Connection) => import("mongoose").Model<import("./events").Event, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./events").Event> & import("./events").Event & Required<{
|
|
54
|
+
useFactory: (connection: import("mongoose").Connection, companyConnection: import("mongoose").Connection, userConnection: import("mongoose").Connection) => import("mongoose").Model<import("./events").Event, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./events").Event> & import("./events").Event & Required<{
|
|
55
|
+
_id: string;
|
|
56
|
+
}>, any>;
|
|
57
|
+
inject: import("../..").DatabaseConnection[];
|
|
58
|
+
} | {
|
|
59
|
+
provide: import("../..").DatabaseModel;
|
|
60
|
+
useFactory: (connection: import("mongoose").Connection) => import("mongoose").Model<import("./events").EventType, {}, {}, {}, import("mongoose").Document<unknown, {}, import("./events").EventType> & import("./events").EventType & Required<{
|
|
55
61
|
_id: string;
|
|
56
62
|
}>, any>;
|
|
57
63
|
inject: import("../..").DatabaseConnection[];
|
|
@@ -37,7 +37,7 @@ const userFactory = (connection, companyConnection, eventConnection) => {
|
|
|
37
37
|
chatInfo: { type: chat_info_entity_1.ChatInfoSchema },
|
|
38
38
|
role: {
|
|
39
39
|
type: ObjectId,
|
|
40
|
-
ref: '
|
|
40
|
+
ref: (0, get_model_ref_1.getModelRef)('RolePermission', connection),
|
|
41
41
|
required: true,
|
|
42
42
|
},
|
|
43
43
|
eventInfos: [{ type: event_info_entity_1.EventInfoSchema }],
|
|
@@ -62,7 +62,10 @@ const userFactory = (connection, companyConnection, eventConnection) => {
|
|
|
62
62
|
lastLoggedIn: { type: Date },
|
|
63
63
|
lastActive: { type: Date },
|
|
64
64
|
deletedAt: { type: Date },
|
|
65
|
-
deletedBy: {
|
|
65
|
+
deletedBy: {
|
|
66
|
+
type: ObjectId,
|
|
67
|
+
ref: (0, get_model_ref_1.getModelRef)('User', connection),
|
|
68
|
+
},
|
|
66
69
|
lastLoggedInContactId: {
|
|
67
70
|
type: ObjectId,
|
|
68
71
|
ref: (0, get_model_ref_1.getModelRef)('Contact', companyConnection),
|