@lukiteam/churos-be-general 0.0.1
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/README.md +1 -0
- package/dist/constants/param-key.d.ts +4 -0
- package/dist/constants/param-key.js +8 -0
- package/dist/constants/param-key.js.map +1 -0
- package/dist/constants/rabbitmq.d.ts +9 -0
- package/dist/constants/rabbitmq.js +14 -0
- package/dist/constants/rabbitmq.js.map +1 -0
- package/dist/constants/redis-key.d.ts +12 -0
- package/dist/constants/redis-key.js +16 -0
- package/dist/constants/redis-key.js.map +1 -0
- package/dist/i18n/admin.paths.d.ts +1 -0
- package/dist/i18n/admin.paths.js +6 -0
- package/dist/i18n/admin.paths.js.map +1 -0
- package/dist/i18n/mobile.paths.d.ts +1 -0
- package/dist/i18n/mobile.paths.js +6 -0
- package/dist/i18n/mobile.paths.js.map +1 -0
- package/dist/i18n/notification.paths.d.ts +1 -0
- package/dist/i18n/notification.paths.js +6 -0
- package/dist/i18n/notification.paths.js.map +1 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +114 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/admin/ar/common.json +60 -0
- package/dist/locales/admin/en/common.json +60 -0
- package/dist/locales/admin/es/common.json +60 -0
- package/dist/locales/admin/fr/common.json +60 -0
- package/dist/locales/admin/pt/common.json +60 -0
- package/dist/locales/admin/ru/common.json +60 -0
- package/dist/locales/admin/tr/common.json +60 -0
- package/dist/locales/mobile/ar/common.json +100 -0
- package/dist/locales/mobile/en/common.json +99 -0
- package/dist/locales/mobile/es/common.json +100 -0
- package/dist/locales/mobile/fr/common.json +100 -0
- package/dist/locales/mobile/pt/common.json +100 -0
- package/dist/locales/mobile/ru/common.json +100 -0
- package/dist/locales/mobile/tr/common.json +100 -0
- package/dist/locales/notification/ar/common.json +52 -0
- package/dist/locales/notification/en/common.json +52 -0
- package/dist/locales/notification/es/common.json +52 -0
- package/dist/locales/notification/fr/common.json +52 -0
- package/dist/locales/notification/pt/common.json +52 -0
- package/dist/locales/notification/ru/common.json +52 -0
- package/dist/locales/notification/tr/common.json +52 -0
- package/dist/models/dto/firebase-object.dto.d.ts +10 -0
- package/dist/models/dto/firebase-object.dto.js +10 -0
- package/dist/models/dto/firebase-object.dto.js.map +1 -0
- package/dist/models/dto/notification-data.dto.d.ts +5 -0
- package/dist/models/dto/notification-data.dto.js +3 -0
- package/dist/models/dto/notification-data.dto.js.map +1 -0
- package/dist/models/dto/notification-object.dto.d.ts +36 -0
- package/dist/models/dto/notification-object.dto.js +41 -0
- package/dist/models/dto/notification-object.dto.js.map +1 -0
- package/dist/models/dto/notification-revoke.dto.d.ts +13 -0
- package/dist/models/dto/notification-revoke.dto.js +7 -0
- package/dist/models/dto/notification-revoke.dto.js.map +1 -0
- package/dist/models/enum/index.d.ts +200 -0
- package/dist/models/enum/index.js +252 -0
- package/dist/models/enum/index.js.map +1 -0
- package/dist/mongo/index.d.ts +86 -0
- package/dist/mongo/index.js +86 -0
- package/dist/mongo/index.js.map +1 -0
- package/dist/mongo/interfaces/repository.interface.d.ts +11 -0
- package/dist/mongo/interfaces/repository.interface.js +3 -0
- package/dist/mongo/interfaces/repository.interface.js.map +1 -0
- package/dist/mongo/repositories/base.repository.d.ts +71 -0
- package/dist/mongo/repositories/base.repository.js +247 -0
- package/dist/mongo/repositories/base.repository.js.map +1 -0
- package/dist/mongo/repositories/repository.factory.d.ts +5 -0
- package/dist/mongo/repositories/repository.factory.js +25 -0
- package/dist/mongo/repositories/repository.factory.js.map +1 -0
- package/dist/mongo/schema/admin/forbidden-word-record.entity.d.ts +35 -0
- package/dist/mongo/schema/admin/forbidden-word-record.entity.js +46 -0
- package/dist/mongo/schema/admin/forbidden-word-record.entity.js.map +1 -0
- package/dist/mongo/schema/admin/member-config.entity.d.ts +42 -0
- package/dist/mongo/schema/admin/member-config.entity.js +77 -0
- package/dist/mongo/schema/admin/member-config.entity.js.map +1 -0
- package/dist/mongo/schema/admin/member-roles.entity.d.ts +33 -0
- package/dist/mongo/schema/admin/member-roles.entity.js +38 -0
- package/dist/mongo/schema/admin/member-roles.entity.js.map +1 -0
- package/dist/mongo/schema/admin/member.entity.d.ts +48 -0
- package/dist/mongo/schema/admin/member.entity.js +105 -0
- package/dist/mongo/schema/admin/member.entity.js.map +1 -0
- package/dist/mongo/schema/admin/rights.entity.d.ts +33 -0
- package/dist/mongo/schema/admin/rights.entity.js +37 -0
- package/dist/mongo/schema/admin/rights.entity.js.map +1 -0
- package/dist/mongo/schema/admin/roles-rights.entity.d.ts +33 -0
- package/dist/mongo/schema/admin/roles-rights.entity.js +38 -0
- package/dist/mongo/schema/admin/roles-rights.entity.js.map +1 -0
- package/dist/mongo/schema/admin/roles.entity.d.ts +32 -0
- package/dist/mongo/schema/admin/roles.entity.js +33 -0
- package/dist/mongo/schema/admin/roles.entity.js.map +1 -0
- package/dist/mongo/schema/mobile/forbidden-word.entity.d.ts +33 -0
- package/dist/mongo/schema/mobile/forbidden-word.entity.js +40 -0
- package/dist/mongo/schema/mobile/forbidden-word.entity.js.map +1 -0
- package/dist/mongo/schema/mobile/member-cache.entity.d.ts +57 -0
- package/dist/mongo/schema/mobile/member-cache.entity.js +137 -0
- package/dist/mongo/schema/mobile/member-cache.entity.js.map +1 -0
- package/dist/mongo/schema/mobile/member-config.entity.d.ts +49 -0
- package/dist/mongo/schema/mobile/member-config.entity.js +105 -0
- package/dist/mongo/schema/mobile/member-config.entity.js.map +1 -0
- package/dist/mongo/schema/mobile/member-view.entity.d.ts +36 -0
- package/dist/mongo/schema/mobile/member-view.entity.js +56 -0
- package/dist/mongo/schema/mobile/member-view.entity.js.map +1 -0
- package/dist/mongo/schema/mobile/spend-log.entity.d.ts +35 -0
- package/dist/mongo/schema/mobile/spend-log.entity.js +45 -0
- package/dist/mongo/schema/mobile/spend-log.entity.js.map +1 -0
- package/dist/mongo/schema/mobile/view-data.entity.d.ts +36 -0
- package/dist/mongo/schema/mobile/view-data.entity.js +50 -0
- package/dist/mongo/schema/mobile/view-data.entity.js.map +1 -0
- package/dist/mongo/schema/notification/contents.entity.d.ts +32 -0
- package/dist/mongo/schema/notification/contents.entity.js +36 -0
- package/dist/mongo/schema/notification/contents.entity.js.map +1 -0
- package/dist/mongo/schema/notification/defined-texts.entity.d.ts +33 -0
- package/dist/mongo/schema/notification/defined-texts.entity.js +37 -0
- package/dist/mongo/schema/notification/defined-texts.entity.js.map +1 -0
- package/dist/mongo/schema/notification/filter.dto.d.ts +6 -0
- package/dist/mongo/schema/notification/filter.dto.js +7 -0
- package/dist/mongo/schema/notification/filter.dto.js.map +1 -0
- package/dist/mongo/schema/notification/member-notification.entity.d.ts +55 -0
- package/dist/mongo/schema/notification/member-notification.entity.js +91 -0
- package/dist/mongo/schema/notification/member-notification.entity.js.map +1 -0
- package/dist/mongo/schema/notification/notification.entity.d.ts +44 -0
- package/dist/mongo/schema/notification/notification.entity.js +73 -0
- package/dist/mongo/schema/notification/notification.entity.js.map +1 -0
- package/dist/mongo/schema/system-log.entity.d.ts +37 -0
- package/dist/mongo/schema/system-log.entity.js +53 -0
- package/dist/mongo/schema/system-log.entity.js.map +1 -0
- package/dist/mongo/unit-of-work/unit-of-work.interface.d.ts +7 -0
- package/dist/mongo/unit-of-work/unit-of-work.interface.js +3 -0
- package/dist/mongo/unit-of-work/unit-of-work.interface.js.map +1 -0
- package/dist/mongo/unit-of-work/unit-of-work.module.d.ts +2 -0
- package/dist/mongo/unit-of-work/unit-of-work.module.js +29 -0
- package/dist/mongo/unit-of-work/unit-of-work.module.js.map +1 -0
- package/dist/mongo/unit-of-work/unit-of-work.service.d.ts +19 -0
- package/dist/mongo/unit-of-work/unit-of-work.service.js +104 -0
- package/dist/mongo/unit-of-work/unit-of-work.service.js.map +1 -0
- package/dist/postgresql/entity/blocked-phone.entity.d.ts +9 -0
- package/dist/postgresql/entity/blocked-phone.entity.js +44 -0
- package/dist/postgresql/entity/blocked-phone.entity.js.map +1 -0
- package/dist/postgresql/entity/feedback-and-complaint.entity.d.ts +14 -0
- package/dist/postgresql/entity/feedback-and-complaint.entity.js +64 -0
- package/dist/postgresql/entity/feedback-and-complaint.entity.js.map +1 -0
- package/dist/postgresql/entity/member-blocked.entity.d.ts +11 -0
- package/dist/postgresql/entity/member-blocked.entity.js +58 -0
- package/dist/postgresql/entity/member-blocked.entity.js.map +1 -0
- package/dist/postgresql/entity/member-config.entity.d.ts +16 -0
- package/dist/postgresql/entity/member-config.entity.js +79 -0
- package/dist/postgresql/entity/member-config.entity.js.map +1 -0
- package/dist/postgresql/entity/member-connections.entity.d.ts +7 -0
- package/dist/postgresql/entity/member-connections.entity.js +39 -0
- package/dist/postgresql/entity/member-connections.entity.js.map +1 -0
- package/dist/postgresql/entity/member-liked.entity.d.ts +9 -0
- package/dist/postgresql/entity/member-liked.entity.js +50 -0
- package/dist/postgresql/entity/member-liked.entity.js.map +1 -0
- package/dist/postgresql/entity/member-subscription.entity.d.ts +12 -0
- package/dist/postgresql/entity/member-subscription.entity.js +64 -0
- package/dist/postgresql/entity/member-subscription.entity.js.map +1 -0
- package/dist/postgresql/entity/member-verification.entity.d.ts +8 -0
- package/dist/postgresql/entity/member-verification.entity.js +42 -0
- package/dist/postgresql/entity/member-verification.entity.js.map +1 -0
- package/dist/postgresql/entity/member.entity.d.ts +36 -0
- package/dist/postgresql/entity/member.entity.js +161 -0
- package/dist/postgresql/entity/member.entity.js.map +1 -0
- package/dist/postgresql/entity/message.entity.d.ts +13 -0
- package/dist/postgresql/entity/message.entity.js +73 -0
- package/dist/postgresql/entity/message.entity.js.map +1 -0
- package/dist/postgresql/entity/mission.entity.d.ts +12 -0
- package/dist/postgresql/entity/mission.entity.js +60 -0
- package/dist/postgresql/entity/mission.entity.js.map +1 -0
- package/dist/postgresql/entity/notification.entity.d.ts +8 -0
- package/dist/postgresql/entity/notification.entity.js +42 -0
- package/dist/postgresql/entity/notification.entity.js.map +1 -0
- package/dist/postgresql/entity/payment.entity.d.ts +14 -0
- package/dist/postgresql/entity/payment.entity.js +96 -0
- package/dist/postgresql/entity/payment.entity.js.map +1 -0
- package/dist/postgresql/entity/product-purchase.entity.d.ts +12 -0
- package/dist/postgresql/entity/product-purchase.entity.js +54 -0
- package/dist/postgresql/entity/product-purchase.entity.js.map +1 -0
- package/dist/postgresql/entity/purchase.entity.d.ts +15 -0
- package/dist/postgresql/entity/purchase.entity.js +73 -0
- package/dist/postgresql/entity/purchase.entity.js.map +1 -0
- package/dist/postgresql/entity/swipe-countries.entity.d.ts +8 -0
- package/dist/postgresql/entity/swipe-countries.entity.js +36 -0
- package/dist/postgresql/entity/swipe-countries.entity.js.map +1 -0
- package/dist/postgresql/entity/system-logs.entity.d.ts +12 -0
- package/dist/postgresql/entity/system-logs.entity.js +74 -0
- package/dist/postgresql/entity/system-logs.entity.js.map +1 -0
- package/dist/postgresql/entity/system-settings.entity.d.ts +8 -0
- package/dist/postgresql/entity/system-settings.entity.js +38 -0
- package/dist/postgresql/entity/system-settings.entity.js.map +1 -0
- package/dist/postgresql/entity/wallet-detail.entity.d.ts +10 -0
- package/dist/postgresql/entity/wallet-detail.entity.js +50 -0
- package/dist/postgresql/entity/wallet-detail.entity.js.map +1 -0
- package/dist/postgresql/entity/wallet.entity.d.ts +11 -0
- package/dist/postgresql/entity/wallet.entity.js +56 -0
- package/dist/postgresql/entity/wallet.entity.js.map +1 -0
- package/dist/postgresql/index.d.ts +19 -0
- package/dist/postgresql/index.js +36 -0
- package/dist/postgresql/index.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +43 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/enum/index.ts"],"names":[],"mappings":";;;AAAA,+DAAgD;AAGhD,MAAM,KAAK,GAAG;IACV,MAAM,EAAE,+BAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACpC,WAAW,EAAE,+BAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM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3B,gBAAgB,EAAE,mBAAmB;IACrC,YAAY,EAAE,eAAe;IAC7B,YAAY,EAAE,eAAe;IAC7B,2BAA2B,EAAE,wBAAwB;IACrD,QAAQ,EAAE,WAAW;IACrB,eAAe,EAAE,kBAAkB;IACnC,SAAS,EAAE,eAAe;IAC1B,gBAAgB,EAAE,yBAAyB;IAC3C,SAAS,EAAE,YAAY;IACvB,mBAAmB,EAAE,sBAAsB;IAC3C,mBAAmB,EAAE,sBAAsB;IAC3C,YAAY,EAAE,sBAAsB;IACpC,qBAAqB,EAAE,uBAAuB;CACjD,CAAA;AAIG,8BAAS"}
|
|
@@ -0,0 +1,86 @@
|
|
|
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="mongoose" />
|
|
25
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
26
|
+
import { MemberConfigs } from "./schema/admin/member-config.entity";
|
|
27
|
+
import { Notifications } from "./schema/notification/notification.entity";
|
|
28
|
+
import { SpendLog } from "./schema/mobile/spend-log.entity";
|
|
29
|
+
import { SystemLog } from "./schema/system-log.entity";
|
|
30
|
+
import { MemberRoles } from "./schema/admin/member-roles.entity";
|
|
31
|
+
import { RolesRights } from "./schema/admin/roles-rights.entity";
|
|
32
|
+
import { Roles } from "./schema/admin/roles.entity";
|
|
33
|
+
import { Contents } from "./schema/notification/contents.entity";
|
|
34
|
+
import { DefinedTexts } from "./schema/notification/defined-texts.entity";
|
|
35
|
+
import { Members } from "./schema/admin/member.entity";
|
|
36
|
+
import { MemberCache } from "./schema/mobile/member-cache.entity";
|
|
37
|
+
import { MemberView } from "./schema/mobile/member-view.entity";
|
|
38
|
+
import { MemberNotification } from "./schema/notification/member-notification.entity";
|
|
39
|
+
import { ForbiddenWord } from "./schema/mobile/forbidden-word.entity";
|
|
40
|
+
import { ForbiddenWordRecord } from "./schema/admin/forbidden-word-record.entity";
|
|
41
|
+
export declare const MONGO_SCHEMAS: ({
|
|
42
|
+
name: string;
|
|
43
|
+
schema: import("mongoose").Schema<SpendLog, import("mongoose").Model<SpendLog, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SpendLog>;
|
|
44
|
+
} | {
|
|
45
|
+
name: string;
|
|
46
|
+
schema: import("mongoose").Schema<SystemLog, import("mongoose").Model<SystemLog, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SystemLog>;
|
|
47
|
+
} | {
|
|
48
|
+
name: string;
|
|
49
|
+
schema: import("mongoose").Schema<MemberConfigs, import("mongoose").Model<MemberConfigs, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberConfigs>;
|
|
50
|
+
} | {
|
|
51
|
+
name: string;
|
|
52
|
+
schema: import("mongoose").Schema<MemberRoles, import("mongoose").Model<MemberRoles, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberRoles>;
|
|
53
|
+
} | {
|
|
54
|
+
name: string;
|
|
55
|
+
schema: import("mongoose").Schema<RolesRights, import("mongoose").Model<RolesRights, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, RolesRights>;
|
|
56
|
+
} | {
|
|
57
|
+
name: string;
|
|
58
|
+
schema: import("mongoose").Schema<Roles, import("mongoose").Model<Roles, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Roles>;
|
|
59
|
+
} | {
|
|
60
|
+
name: string;
|
|
61
|
+
schema: import("mongoose").Schema<Contents, import("mongoose").Model<Contents, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Contents>;
|
|
62
|
+
} | {
|
|
63
|
+
name: string;
|
|
64
|
+
schema: import("mongoose").Schema<DefinedTexts, import("mongoose").Model<DefinedTexts, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DefinedTexts>;
|
|
65
|
+
} | {
|
|
66
|
+
name: string;
|
|
67
|
+
schema: import("mongoose").Schema<Notifications, import("mongoose").Model<Notifications, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Notifications>;
|
|
68
|
+
} | {
|
|
69
|
+
name: string;
|
|
70
|
+
schema: import("mongoose").Schema<Members, import("mongoose").Model<Members, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Members>;
|
|
71
|
+
} | {
|
|
72
|
+
name: string;
|
|
73
|
+
schema: import("mongoose").Schema<MemberCache, import("mongoose").Model<MemberCache, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberCache>;
|
|
74
|
+
} | {
|
|
75
|
+
name: string;
|
|
76
|
+
schema: import("mongoose").Schema<MemberView, import("mongoose").Model<MemberView, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberView>;
|
|
77
|
+
} | {
|
|
78
|
+
name: string;
|
|
79
|
+
schema: import("mongoose").Schema<MemberNotification, import("mongoose").Model<MemberNotification, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, MemberNotification>;
|
|
80
|
+
} | {
|
|
81
|
+
name: string;
|
|
82
|
+
schema: import("mongoose").Schema<ForbiddenWord, import("mongoose").Model<ForbiddenWord, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ForbiddenWord>;
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
schema: import("mongoose").Schema<ForbiddenWordRecord, import("mongoose").Model<ForbiddenWordRecord, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ForbiddenWordRecord>;
|
|
86
|
+
})[];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MONGO_SCHEMAS = void 0;
|
|
4
|
+
const member_config_entity_1 = require("./schema/admin/member-config.entity");
|
|
5
|
+
const notification_entity_1 = require("./schema/notification/notification.entity");
|
|
6
|
+
const spend_log_entity_1 = require("./schema/mobile/spend-log.entity");
|
|
7
|
+
const system_log_entity_1 = require("./schema/system-log.entity");
|
|
8
|
+
const member_roles_entity_1 = require("./schema/admin/member-roles.entity");
|
|
9
|
+
const rights_entity_1 = require("./schema/admin/rights.entity");
|
|
10
|
+
const roles_rights_entity_1 = require("./schema/admin/roles-rights.entity");
|
|
11
|
+
const roles_entity_1 = require("./schema/admin/roles.entity");
|
|
12
|
+
const contents_entity_1 = require("./schema/notification/contents.entity");
|
|
13
|
+
const defined_texts_entity_1 = require("./schema/notification/defined-texts.entity");
|
|
14
|
+
const member_entity_1 = require("./schema/admin/member.entity");
|
|
15
|
+
const member_cache_entity_1 = require("./schema/mobile/member-cache.entity");
|
|
16
|
+
const member_view_entity_1 = require("./schema/mobile/member-view.entity");
|
|
17
|
+
const member_notification_entity_1 = require("./schema/notification/member-notification.entity");
|
|
18
|
+
const forbidden_word_entity_1 = require("./schema/mobile/forbidden-word.entity");
|
|
19
|
+
const forbidden_word_record_entity_1 = require("./schema/admin/forbidden-word-record.entity");
|
|
20
|
+
exports.MONGO_SCHEMAS = [
|
|
21
|
+
{
|
|
22
|
+
name: spend_log_entity_1.SpendLog.name,
|
|
23
|
+
schema: spend_log_entity_1.SpendLogSchema,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: system_log_entity_1.SystemLog.name,
|
|
27
|
+
schema: system_log_entity_1.SystemLogSchema,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: member_config_entity_1.MemberConfigs.name,
|
|
31
|
+
schema: member_config_entity_1.MemberConfigSchema,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: member_roles_entity_1.MemberRoles.name,
|
|
35
|
+
schema: member_roles_entity_1.MemberRolesSchema,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: rights_entity_1.Rights.name,
|
|
39
|
+
schema: rights_entity_1.RightsSchema,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: roles_rights_entity_1.RolesRights.name,
|
|
43
|
+
schema: roles_rights_entity_1.RolesRightsSchema,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: roles_entity_1.Roles.name,
|
|
47
|
+
schema: roles_entity_1.RolesSchema,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: contents_entity_1.Contents.name,
|
|
51
|
+
schema: contents_entity_1.ContentsSchema,
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: defined_texts_entity_1.DefinedTexts.name,
|
|
55
|
+
schema: defined_texts_entity_1.DefinedTextsSchema,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: notification_entity_1.Notifications.name,
|
|
59
|
+
schema: notification_entity_1.NotificationSchema,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: member_entity_1.Members.name,
|
|
63
|
+
schema: member_entity_1.MemberSchema
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: member_cache_entity_1.MemberCache.name,
|
|
67
|
+
schema: member_cache_entity_1.MemberCacheSchema
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: member_view_entity_1.MemberView.name,
|
|
71
|
+
schema: member_view_entity_1.MemberViewSchema
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: member_notification_entity_1.MemberNotification.name,
|
|
75
|
+
schema: member_notification_entity_1.MemberNotificationSchema,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: forbidden_word_entity_1.ForbiddenWord.name,
|
|
79
|
+
schema: forbidden_word_entity_1.ForbiddenWordSchema
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: forbidden_word_record_entity_1.ForbiddenWordRecord.name,
|
|
83
|
+
schema: forbidden_word_record_entity_1.ForbiddenWordRecordSchema
|
|
84
|
+
}
|
|
85
|
+
];
|
|
86
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mongo/index.ts"],"names":[],"mappings":";;;AAAA,8EAAwF;AACxF,mFAA8F;AAC9F,uEAA4E;AAC5E,kEAAwE;AACxE,4EAAoF;AACpF,gEAAoE;AACpE,4EAAoF;AACpF,8DAAiE;AACjE,2EAAiF;AACjF,qFAA8F;AAC9F,gEAAqE;AACrE,6EAAqF;AACrF,2EAAkF;AAClF,iGAAgH;AAChH,iFAA2F;AAC3F,8FAA6G;AAEhG,QAAA,aAAa,GAAG;IAC3B;QACE,IAAI,EAAE,2BAAQ,CAAC,IAAI;QACnB,MAAM,EAAE,iCAAc;KACvB;IACD;QACE,IAAI,EAAE,6BAAS,CAAC,IAAI;QACpB,MAAM,EAAE,mCAAe;KACxB;IACD;QACE,IAAI,EAAE,oCAAa,CAAC,IAAI;QACxB,MAAM,EAAE,yCAAkB;KAC3B;IACD;QACE,IAAI,EAAE,iCAAW,CAAC,IAAI;QACtB,MAAM,EAAE,uCAAiB;KAC1B;IACD;QACE,IAAI,EAAE,sBAAM,CAAC,IAAI;QACjB,MAAM,EAAE,4BAAY;KACrB;IACD;QACE,IAAI,EAAE,iCAAW,CAAC,IAAI;QACtB,MAAM,EAAE,uCAAiB;KAC1B;IACD;QACE,IAAI,EAAE,oBAAK,CAAC,IAAI;QAChB,MAAM,EAAE,0BAAW;KACpB;IACD;QACE,IAAI,EAAE,0BAAQ,CAAC,IAAI;QACnB,MAAM,EAAE,gCAAc;KACvB;IACD;QACE,IAAI,EAAE,mCAAY,CAAC,IAAI;QACvB,MAAM,EAAE,yCAAkB;KAC3B;IACD;QACE,IAAI,EAAE,mCAAa,CAAC,IAAI;QACxB,MAAM,EAAE,wCAAkB;KAC3B;IACD;QACE,IAAI,EAAE,uBAAO,CAAC,IAAI;QAClB,MAAM,EAAE,4BAAY;KACrB;IACD;QACE,IAAI,EAAE,iCAAW,CAAC,IAAI;QACtB,MAAM,EAAE,uCAAiB;KAC1B;IACD;QACE,IAAI,EAAE,+BAAU,CAAC,IAAI;QACrB,MAAM,EAAE,qCAAgB;KACzB;IACD;QACE,IAAI,EAAE,+CAAkB,CAAC,IAAI;QAC7B,MAAM,EAAE,qDAAwB;KACjC;IACD;QACE,IAAI,EAAE,qCAAa,CAAC,IAAI;QACxB,MAAM,EAAE,2CAAmB;KAC5B;IACD;QACE,IAAI,EAAE,kDAAmB,CAAC,IAAI;QAC9B,MAAM,EAAE,wDAAyB;KAClC;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
export interface IRepository<T extends Document> {
|
|
3
|
+
create(entity: any): Promise<T>;
|
|
4
|
+
findById(id: string): Promise<T | null>;
|
|
5
|
+
findOne(filter: any): Promise<T | null>;
|
|
6
|
+
findMany(filter: any): Promise<T[]>;
|
|
7
|
+
update(id: string, updateData: any): Promise<T | null>;
|
|
8
|
+
delete(id: string): Promise<boolean>;
|
|
9
|
+
countDocuments(filter: any): Promise<number>;
|
|
10
|
+
aggregate(pipeline: any[]): Promise<any[]>;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.interface.js","sourceRoot":"","sources":["../../../src/mongo/interfaces/repository.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,71 @@
|
|
|
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="mongoose/types/inferschematype" />
|
|
25
|
+
import { Document, Model } from 'mongoose';
|
|
26
|
+
import { IRepository } from '../interfaces/repository.interface';
|
|
27
|
+
import { Logger } from '@nestjs/common';
|
|
28
|
+
export declare abstract class BaseRepository<T extends Document> implements IRepository<T> {
|
|
29
|
+
protected readonly model: Model<T>;
|
|
30
|
+
protected readonly logger: Logger;
|
|
31
|
+
constructor(model: Model<T>);
|
|
32
|
+
create(entity: any): Promise<T>;
|
|
33
|
+
findById(id: string): Promise<T | null>;
|
|
34
|
+
findOne(filter: any): Promise<T | null>;
|
|
35
|
+
findMany(filter: any): Promise<T[]>;
|
|
36
|
+
update(id: string, updateData: any): Promise<T | null>;
|
|
37
|
+
delete(id: string): Promise<boolean>;
|
|
38
|
+
countDocuments(filter: any): Promise<number>;
|
|
39
|
+
aggregate(pipeline: any[]): Promise<any[]>;
|
|
40
|
+
findWithPopulate(filter: any, populateFields: string[]): Promise<T[]>;
|
|
41
|
+
updateMany(filter: any, updateData: any): Promise<any>;
|
|
42
|
+
updateOne(filter: any, updateData: any): Promise<any>;
|
|
43
|
+
getModel(): Model<T>;
|
|
44
|
+
getCollection(): import("mongoose").Collection<import("bson").Document>;
|
|
45
|
+
findAndCountAll(options?: any): Promise<{
|
|
46
|
+
count: number;
|
|
47
|
+
rows: import("mongoose").HydratedDocument<T, {}, {}>[];
|
|
48
|
+
}>;
|
|
49
|
+
findAll(whereClause: any, options?: {
|
|
50
|
+
offset?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
sort?: any;
|
|
53
|
+
}): import("mongoose").Query<import("mongoose").HydratedDocument<T, {}, {}>[], import("mongoose").HydratedDocument<T, {}, {}>, {}, T>;
|
|
54
|
+
aggregateMany(pipeline: any[]): Promise<T[]>;
|
|
55
|
+
findManyQuery(whereClause: any, options?: {
|
|
56
|
+
offset?: number;
|
|
57
|
+
limit?: number;
|
|
58
|
+
sort?: any;
|
|
59
|
+
}): Promise<import("mongoose").HydratedDocument<T, {}, {}>[]>;
|
|
60
|
+
bulkWrite(operations: any[]): Promise<import("mongodb").BulkWriteResult>;
|
|
61
|
+
updateByIdAndReturn(id: string, updateData: any): Promise<T | null>;
|
|
62
|
+
find(whereClause: any, skip?: number, limit?: number): import("mongoose").Query<import("mongoose").HydratedDocument<T, {}, {}>[], import("mongoose").HydratedDocument<T, {}, {}>, {}, T>;
|
|
63
|
+
findWithArrays(filter: {
|
|
64
|
+
where?: any;
|
|
65
|
+
skip?: number;
|
|
66
|
+
take?: number;
|
|
67
|
+
sort?: any;
|
|
68
|
+
}): Promise<T[]>;
|
|
69
|
+
upsertOne(filter: any, updateData: any): Promise<any>;
|
|
70
|
+
deleteMany(filter: any): Promise<number>;
|
|
71
|
+
}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BaseRepository = void 0;
|
|
4
|
+
const common_1 = require("@nestjs/common");
|
|
5
|
+
class BaseRepository {
|
|
6
|
+
constructor(model) {
|
|
7
|
+
this.model = model;
|
|
8
|
+
this.logger = new common_1.Logger(this.constructor.name);
|
|
9
|
+
}
|
|
10
|
+
async create(entity) {
|
|
11
|
+
var _a;
|
|
12
|
+
try {
|
|
13
|
+
const created = new this.model(entity);
|
|
14
|
+
return await created.save();
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
this.logger.log(`Create error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
18
|
+
throw error;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async findById(id) {
|
|
22
|
+
var _a;
|
|
23
|
+
try {
|
|
24
|
+
return await this.model.findById(id, null).exec();
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
this.logger.log(`FindById error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async findOne(filter) {
|
|
32
|
+
var _a;
|
|
33
|
+
try {
|
|
34
|
+
return await this.model.findOne(filter, null).exec();
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
this.logger.log(`FindOne error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async findMany(filter) {
|
|
42
|
+
var _a;
|
|
43
|
+
try {
|
|
44
|
+
return await this.model.find(filter, null).exec();
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
this.logger.log(`FindMany error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
48
|
+
throw error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async update(id, updateData) {
|
|
52
|
+
var _a;
|
|
53
|
+
try {
|
|
54
|
+
return await this.model.findByIdAndUpdate(id, updateData).exec();
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
this.logger.log(`Update error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async delete(id) {
|
|
62
|
+
var _a;
|
|
63
|
+
try {
|
|
64
|
+
const result = await this.model.findByIdAndDelete(id).exec();
|
|
65
|
+
return !!result;
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
this.logger.log(`Delete error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
async countDocuments(filter) {
|
|
73
|
+
var _a;
|
|
74
|
+
try {
|
|
75
|
+
return await this.model.countDocuments(filter).exec();
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
this.logger.log(`CountDocuments error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async aggregate(pipeline) {
|
|
83
|
+
var _a;
|
|
84
|
+
try {
|
|
85
|
+
return await this.model.aggregate(pipeline).exec();
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
this.logger.log(`Aggregate error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
89
|
+
throw error;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async findWithPopulate(filter, populateFields) {
|
|
93
|
+
var _a;
|
|
94
|
+
try {
|
|
95
|
+
return await this.model.find(filter, null).populate(populateFields).exec();
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
this.logger.log(`FindWithPopulate error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
99
|
+
throw error;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async updateMany(filter, updateData) {
|
|
103
|
+
var _a;
|
|
104
|
+
try {
|
|
105
|
+
return await this.model.updateMany(filter, { $set: updateData }).exec();
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
this.logger.log(`UpdateMany error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
109
|
+
throw error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
async updateOne(filter, updateData) {
|
|
113
|
+
var _a;
|
|
114
|
+
try {
|
|
115
|
+
return await this.model.updateOne(filter, updateData).exec();
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
this.logger.log(`UpdateOne error: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
119
|
+
throw error;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
getModel() {
|
|
123
|
+
return this.model;
|
|
124
|
+
}
|
|
125
|
+
getCollection() {
|
|
126
|
+
return this.model.collection;
|
|
127
|
+
}
|
|
128
|
+
async findAndCountAll(options = {}) {
|
|
129
|
+
var _a, _b, _c;
|
|
130
|
+
try {
|
|
131
|
+
const filter = (_a = options.filter) !== null && _a !== void 0 ? _a : {};
|
|
132
|
+
const limit = options.limit;
|
|
133
|
+
const skip = options.skip;
|
|
134
|
+
const sort = options.sort;
|
|
135
|
+
const query = this.model.find(filter);
|
|
136
|
+
if (limit !== undefined)
|
|
137
|
+
query.limit(limit);
|
|
138
|
+
if (skip !== undefined)
|
|
139
|
+
query.skip(skip);
|
|
140
|
+
if (sort !== undefined)
|
|
141
|
+
query.sort(sort);
|
|
142
|
+
const [count, rows] = await Promise.all([
|
|
143
|
+
this.model.countDocuments(filter).exec(),
|
|
144
|
+
query.exec()
|
|
145
|
+
]);
|
|
146
|
+
return {
|
|
147
|
+
count,
|
|
148
|
+
rows
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
this.logger.log(`FindAndCountAll failed: ${(_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : error}`);
|
|
153
|
+
throw new Error(`FindAndCountAll failed: ${(_c = error === null || error === void 0 ? void 0 : error.message) !== null && _c !== void 0 ? _c : error}`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
findAll(whereClause, options = {}) {
|
|
157
|
+
const query = this.model.find(whereClause);
|
|
158
|
+
if (options.offset !== undefined) {
|
|
159
|
+
query.skip(options.offset);
|
|
160
|
+
}
|
|
161
|
+
if (options.limit !== undefined) {
|
|
162
|
+
query.limit(options.limit);
|
|
163
|
+
}
|
|
164
|
+
if (options.sort) {
|
|
165
|
+
query.sort(options.sort);
|
|
166
|
+
}
|
|
167
|
+
return query;
|
|
168
|
+
}
|
|
169
|
+
async aggregateMany(pipeline) {
|
|
170
|
+
var _a;
|
|
171
|
+
try {
|
|
172
|
+
return await this.model.aggregate(pipeline).exec();
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
this.logger.log(`aggregateMany error: - ERROR : ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
176
|
+
throw error;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
async findManyQuery(whereClause, options = {}) {
|
|
180
|
+
const query = this.model.find(whereClause);
|
|
181
|
+
if (options.offset !== undefined) {
|
|
182
|
+
query.skip(options.offset);
|
|
183
|
+
}
|
|
184
|
+
if (options.limit !== undefined) {
|
|
185
|
+
query.limit(options.limit);
|
|
186
|
+
}
|
|
187
|
+
if (options.sort) {
|
|
188
|
+
query.sort(options.sort);
|
|
189
|
+
}
|
|
190
|
+
return query;
|
|
191
|
+
}
|
|
192
|
+
async bulkWrite(operations) {
|
|
193
|
+
var _a;
|
|
194
|
+
try {
|
|
195
|
+
return await this.model.bulkWrite(operations);
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
this.logger.log(`bulkWrite error: - ERROR : ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
199
|
+
throw error;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async updateByIdAndReturn(id, updateData) {
|
|
203
|
+
return this.model.findByIdAndUpdate(id, { $set: updateData }, { new: true }).exec();
|
|
204
|
+
}
|
|
205
|
+
find(whereClause, skip, limit) {
|
|
206
|
+
let query = this.model.find(whereClause);
|
|
207
|
+
if (skip !== undefined)
|
|
208
|
+
query = query.skip(skip);
|
|
209
|
+
if (limit !== undefined)
|
|
210
|
+
query = query.limit(limit);
|
|
211
|
+
return query;
|
|
212
|
+
}
|
|
213
|
+
async findWithArrays(filter) {
|
|
214
|
+
var _a;
|
|
215
|
+
const query = this.model.find((_a = filter.where) !== null && _a !== void 0 ? _a : {});
|
|
216
|
+
if (filter.skip !== undefined)
|
|
217
|
+
query.skip(filter.skip);
|
|
218
|
+
if (filter.take !== undefined)
|
|
219
|
+
query.limit(filter.take);
|
|
220
|
+
if (filter.sort !== undefined)
|
|
221
|
+
query.sort(filter.sort);
|
|
222
|
+
return await query.exec();
|
|
223
|
+
}
|
|
224
|
+
async upsertOne(filter, updateData) {
|
|
225
|
+
var _a;
|
|
226
|
+
try {
|
|
227
|
+
return await this.model.updateOne(filter, updateData, { upsert: true }).exec();
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
this.logger.log(`[upsertOne] ERROR: ${(_a = error === null || error === void 0 ? void 0 : error.message) !== null && _a !== void 0 ? _a : error}`);
|
|
231
|
+
throw error;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
async deleteMany(filter) {
|
|
235
|
+
var _a, _b;
|
|
236
|
+
try {
|
|
237
|
+
const result = await this.model.deleteMany(filter).exec();
|
|
238
|
+
return (_a = result.deletedCount) !== null && _a !== void 0 ? _a : 0;
|
|
239
|
+
}
|
|
240
|
+
catch (error) {
|
|
241
|
+
this.logger.log(`[deleteMany] ERROR: ${(_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : error}`);
|
|
242
|
+
throw error;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
exports.BaseRepository = BaseRepository;
|
|
247
|
+
//# sourceMappingURL=base.repository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.repository.js","sourceRoot":"","sources":["../../../src/mongo/repositories/base.repository.ts"],"names":[],"mappings":";;;AAEA,2CAAwC;AAExC,MAAsB,cAAc;IAGlC,YAA+B,KAAe;QAAf,UAAK,GAAL,KAAK,CAAU;QAF3B,WAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAEZ,CAAC;IAEnD,KAAK,CAAC,MAAM,CAAC,MAAW;;QACtB,IAAI;YACF,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC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K,EAAE,CAAC,CAAC;YAClE,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF;AAhQD,wCAgQC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.RepositoryFactory = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const base_repository_1 = require("./base.repository");
|
|
12
|
+
let RepositoryFactory = class RepositoryFactory {
|
|
13
|
+
createRepository(model) {
|
|
14
|
+
return new (class extends base_repository_1.BaseRepository {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(model);
|
|
17
|
+
}
|
|
18
|
+
})();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
RepositoryFactory = __decorate([
|
|
22
|
+
(0, common_1.Injectable)()
|
|
23
|
+
], RepositoryFactory);
|
|
24
|
+
exports.RepositoryFactory = RepositoryFactory;
|
|
25
|
+
//# sourceMappingURL=repository.factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.factory.js","sourceRoot":"","sources":["../../../src/mongo/repositories/repository.factory.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAE5C,uDAAmD;AAG5C,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC5B,gBAAgB,CAAqB,KAAe;QAClD,OAAO,IAAI,CAAC,KAAM,SAAQ,gCAAiB;YACzC;gBACE,KAAK,CAAC,KAAK,CAAC,CAAC;YACf,CAAC;SACF,CAAC,EAAE,CAAC;IACP,CAAC;CACF,CAAA;AARY,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;GACA,iBAAiB,CAQ7B;AARY,8CAAiB"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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="mongoose/types/inferschematype" />
|
|
25
|
+
import { Types } from 'mongoose';
|
|
26
|
+
import { EnumForbiddenWordAction } from '../../../models/enum/index';
|
|
27
|
+
export type ForbiddenWordRecordDocument = ForbiddenWordRecord & Document;
|
|
28
|
+
export declare class ForbiddenWordRecord {
|
|
29
|
+
member_id: Types.ObjectId;
|
|
30
|
+
member_name: string;
|
|
31
|
+
word_id: Types.ObjectId;
|
|
32
|
+
word_name: string;
|
|
33
|
+
action: EnumForbiddenWordAction;
|
|
34
|
+
}
|
|
35
|
+
export declare const ForbiddenWordRecordSchema: import("mongoose").Schema<ForbiddenWordRecord, import("mongoose").Model<ForbiddenWordRecord, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ForbiddenWordRecord>;
|