@lyxa.ai/core 1.0.21 → 1.0.22
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/dist/index.js.map +1 -1
- package/dist/libraries/logger/index.d.ts +2 -0
- package/dist/libraries/logger/index.js +17 -1
- package/dist/libraries/logger/index.js.map +1 -1
- package/dist/libraries/mongo/index.js +49 -16
- package/dist/libraries/mongo/index.js.map +1 -1
- package/dist/libraries/mongo/models/areeba-card.model.d.ts +17 -0
- package/dist/libraries/mongo/models/areeba-card.model.js +73 -0
- package/dist/libraries/mongo/models/areeba-card.model.js.map +1 -0
- package/dist/libraries/mongo/models/auth-identity.model.d.ts +8 -0
- package/dist/libraries/mongo/models/auth-identity.model.js +33 -0
- package/dist/libraries/mongo/models/auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/base/base-coupon.model.js.map +1 -1
- package/dist/libraries/mongo/models/cart.model.js +9 -2
- package/dist/libraries/mongo/models/cart.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/attribute-item.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/attribute-map.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/business-development-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/charge-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/charge.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/courier-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/currency-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/currency.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/featured-item.mode.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/otp-fields.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/package.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/parent-document.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/payout-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/price-breakdown.model.d.ts +5 -0
- package/dist/libraries/mongo/models/embedded/price-breakdown.model.js +32 -0
- package/dist/libraries/mongo/models/embedded/price-breakdown.model.js.map +1 -0
- package/dist/libraries/mongo/models/embedded/price.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/product-nutrition.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/referral-discount-config.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/rider-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/service-fee-setting.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/shop-document.model.js.map +1 -1
- package/dist/libraries/mongo/models/embedded/subscription-summary.model.js.map +1 -1
- package/dist/libraries/mongo/models/index.d.ts +24 -0
- package/dist/libraries/mongo/models/index.js +26 -2
- package/dist/libraries/mongo/models/index.js.map +1 -1
- package/dist/libraries/mongo/models/line-item.model.d.ts +4 -4
- package/dist/libraries/mongo/models/line-item.model.js +8 -8
- package/dist/libraries/mongo/models/line-item.model.js.map +1 -1
- package/dist/libraries/mongo/models/payout.model.js.map +1 -1
- package/dist/libraries/mongo/models/product.model.d.ts +5 -6
- package/dist/libraries/mongo/models/product.model.js +12 -17
- package/dist/libraries/mongo/models/product.model.js.map +1 -1
- package/dist/libraries/mongo/models/providers/apple-auth-identity.model.d.ts +6 -0
- package/dist/libraries/mongo/models/providers/apple-auth-identity.model.js +25 -0
- package/dist/libraries/mongo/models/providers/apple-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/email-auth-identity.model.d.ts +9 -0
- package/dist/libraries/mongo/models/providers/email-auth-identity.model.js +36 -0
- package/dist/libraries/mongo/models/providers/email-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/google-auth-identity.model.d.ts +6 -0
- package/dist/libraries/mongo/models/providers/google-auth-identity.model.js +25 -0
- package/dist/libraries/mongo/models/providers/google-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/phone-auth-identity.model.d.ts +8 -0
- package/dist/libraries/mongo/models/providers/phone-auth-identity.model.js +31 -0
- package/dist/libraries/mongo/models/providers/phone-auth-identity.model.js.map +1 -0
- package/dist/libraries/mongo/models/providers/referral-code-coupon.mode.d.ts +10 -0
- package/dist/libraries/mongo/models/providers/referral-code-coupon.mode.js +28 -0
- package/dist/libraries/mongo/models/providers/referral-code-coupon.mode.js.map +1 -0
- package/dist/libraries/mongo/models/role.model.ts.d.ts +8 -0
- package/dist/libraries/mongo/models/role.model.ts.js +37 -0
- package/dist/libraries/mongo/models/role.model.ts.js.map +1 -0
- package/dist/libraries/mongo/models/shared/duration.model.js.map +1 -1
- package/dist/libraries/mongo/models/shared/work-hour.model.js +1 -1
- package/dist/libraries/mongo/models/shared/work-hour.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop-access-control.model.js +10 -6
- package/dist/libraries/mongo/models/shop-access-control.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop-product.model.d.ts +4 -4
- package/dist/libraries/mongo/models/shop-product.model.js +7 -7
- package/dist/libraries/mongo/models/shop-product.model.js.map +1 -1
- package/dist/libraries/mongo/models/shop-review.d.ts +7 -0
- package/dist/libraries/mongo/models/shop-review.js +28 -0
- package/dist/libraries/mongo/models/shop-review.js.map +1 -0
- package/dist/libraries/mongo/models/shop.model.js.map +1 -1
- package/dist/libraries/mongo/models/transaction.model.js.map +1 -1
- package/dist/libraries/mongo/models/zone.model..d.ts +15 -0
- package/dist/libraries/mongo/models/zone.model..js +64 -0
- package/dist/libraries/mongo/models/zone.model..js.map +1 -0
- package/dist/utilities/common/password.d.ts +1 -0
- package/dist/utilities/common/password.js +12 -0
- package/dist/utilities/common/password.js.map +1 -0
- package/dist/utilities/common/week.d.ts +1 -0
- package/dist/utilities/common/week.js +5 -0
- package/dist/utilities/common/week.js.map +1 -0
- package/dist/utilities/enum.d.ts +9 -5
- package/dist/utilities/enum.js +21 -16
- package/dist/utilities/enum.js.map +1 -1
- package/dist/utilities/transformers.js.map +1 -1
- package/dist/utilities/validation/global-validation.js +1 -1
- package/dist/utilities/validation/global-validation.js.map +1 -1
- package/package.json +1 -1
- package/dist/libraries/mongo/models/cart-lineitem.model.d.ts +0 -29
- package/dist/libraries/mongo/models/cart-lineitem.model.js +0 -120
- package/dist/libraries/mongo/models/cart-lineitem.model.js.map +0 -1
- package/dist/libraries/mongo/models/cart-perticipant.model.d.ts +0 -22
- package/dist/libraries/mongo/models/cart-perticipant.model.js +0 -104
- package/dist/libraries/mongo/models/cart-perticipant.model.js.map +0 -1
- package/dist/libraries/mongo/models/embedded/payment-details.model.d.ts +0 -9
- package/dist/libraries/mongo/models/embedded/payment-details.model.js +0 -52
- package/dist/libraries/mongo/models/embedded/payment-details.model.js.map +0 -1
- package/dist/libraries/mongo/models/order-pricing.model.d.ts +0 -18
- package/dist/libraries/mongo/models/order-pricing.model.js +0 -88
- package/dist/libraries/mongo/models/order-pricing.model.js.map +0 -1
|
@@ -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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CoreAppleAuthIdentityModel = exports.AppleAuthIdentity = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const auth_identity_model_1 = require("../auth-identity.model");
|
|
15
|
+
const enum_1 = require("../../../../utilities/enum");
|
|
16
|
+
class AppleAuthIdentity extends auth_identity_model_1.AuthIdentity {
|
|
17
|
+
token;
|
|
18
|
+
}
|
|
19
|
+
exports.AppleAuthIdentity = AppleAuthIdentity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], AppleAuthIdentity.prototype, "token", void 0);
|
|
24
|
+
exports.CoreAppleAuthIdentityModel = (0, typegoose_1.getDiscriminatorModelForClass)(auth_identity_model_1.AuthIdentityModel, AppleAuthIdentity, enum_1.AuthIdentityType.APPLE);
|
|
25
|
+
//# sourceMappingURL=apple-auth-identity.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apple-auth-identity.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/apple-auth-identity.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4F;AAC5F,gEAAyE;AACzE,qDAA8D;AAE9D,MAAa,iBAAkB,SAAQ,kCAAY;IAE3C,KAAK,CAAU;CACtB;AAHD,8CAGC;AADO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACjB;AAGV,QAAA,0BAA0B,GACtC,IAAA,yCAA6B,EAAC,uCAAiB,EAAE,iBAAiB,EAAE,uBAAgB,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import { getDiscriminatorModelForClass, prop, ReturnModelType } from '@typegoose/typegoose';\r\nimport { AuthIdentity, AuthIdentityModel } from '../auth-identity.model';\r\nimport { AuthIdentityType } from '../../../../utilities/enum';\r\n\r\nexport class AppleAuthIdentity extends AuthIdentity {\r\n\t@prop({ required: true, type: String })\r\n\tpublic token!: string;\r\n}\r\n\r\nexport const CoreAppleAuthIdentityModel: ReturnModelType<typeof AppleAuthIdentity> =\r\n\tgetDiscriminatorModelForClass(AuthIdentityModel, AppleAuthIdentity, AuthIdentityType.APPLE);\r\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { AuthIdentity } from '../auth-identity.model';
|
|
3
|
+
import { OTPFields } from '../embedded/otp-fields.model';
|
|
4
|
+
export declare class EmailAuthIdentity extends AuthIdentity {
|
|
5
|
+
email: string;
|
|
6
|
+
password: string;
|
|
7
|
+
otp: OTPFields;
|
|
8
|
+
}
|
|
9
|
+
export declare const EmailAuthIdentityModel: ReturnModelType<typeof EmailAuthIdentity>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.EmailAuthIdentityModel = exports.EmailAuthIdentity = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const auth_identity_model_1 = require("../auth-identity.model");
|
|
15
|
+
const otp_fields_model_1 = require("../embedded/otp-fields.model");
|
|
16
|
+
const enum_1 = require("../../../../utilities/enum");
|
|
17
|
+
class EmailAuthIdentity extends auth_identity_model_1.AuthIdentity {
|
|
18
|
+
email;
|
|
19
|
+
password;
|
|
20
|
+
otp;
|
|
21
|
+
}
|
|
22
|
+
exports.EmailAuthIdentity = EmailAuthIdentity;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], EmailAuthIdentity.prototype, "email", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], EmailAuthIdentity.prototype, "password", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typegoose_1.prop)({ required: true, type: otp_fields_model_1.OTPFields }),
|
|
33
|
+
__metadata("design:type", otp_fields_model_1.OTPFields)
|
|
34
|
+
], EmailAuthIdentity.prototype, "otp", void 0);
|
|
35
|
+
exports.EmailAuthIdentityModel = (0, typegoose_1.getDiscriminatorModelForClass)(auth_identity_model_1.AuthIdentityModel, EmailAuthIdentity, enum_1.AuthIdentityType.EMAIL);
|
|
36
|
+
//# sourceMappingURL=email-auth-identity.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-auth-identity.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/email-auth-identity.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4F;AAC5F,gEAAyE;AACzE,mEAAyD;AACzD,qDAA8D;AAE9D,MAAa,iBAAkB,SAAQ,kCAAY;IAE3C,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,GAAG,CAAa;CACvB;AATD,8CASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDACd;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,4BAAS,EAAE,CAAC;8BAC7B,4BAAS;8CAAC;AAGX,QAAA,sBAAsB,GAClC,IAAA,yCAA6B,EAAC,uCAAiB,EAAE,iBAAiB,EAAE,uBAAgB,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import { getDiscriminatorModelForClass, prop, ReturnModelType } from '@typegoose/typegoose';\r\nimport { AuthIdentity, AuthIdentityModel } from '../auth-identity.model';\r\nimport { OTPFields } from '../embedded/otp-fields.model';\r\nimport { AuthIdentityType } from '../../../../utilities/enum';\r\n\r\nexport class EmailAuthIdentity extends AuthIdentity {\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic password!: string;\r\n\r\n\t@prop({ required: true, type: OTPFields })\r\n\tpublic otp!: OTPFields;\r\n}\r\n\r\nexport const EmailAuthIdentityModel: ReturnModelType<typeof EmailAuthIdentity> =\r\n\tgetDiscriminatorModelForClass(AuthIdentityModel, EmailAuthIdentity, AuthIdentityType.EMAIL);\r\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { AuthIdentity } from '../auth-identity.model';
|
|
3
|
+
export declare class GoogleAuthIdentity extends AuthIdentity {
|
|
4
|
+
token: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const GoogleAuthIdentityModel: ReturnModelType<typeof GoogleAuthIdentity>;
|
|
@@ -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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GoogleAuthIdentityModel = exports.GoogleAuthIdentity = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const auth_identity_model_1 = require("../auth-identity.model");
|
|
15
|
+
const enum_1 = require("../../../../utilities/enum");
|
|
16
|
+
class GoogleAuthIdentity extends auth_identity_model_1.AuthIdentity {
|
|
17
|
+
token;
|
|
18
|
+
}
|
|
19
|
+
exports.GoogleAuthIdentity = GoogleAuthIdentity;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GoogleAuthIdentity.prototype, "token", void 0);
|
|
24
|
+
exports.GoogleAuthIdentityModel = (0, typegoose_1.getDiscriminatorModelForClass)(auth_identity_model_1.AuthIdentityModel, GoogleAuthIdentity, enum_1.AuthIdentityType.GOOGLE);
|
|
25
|
+
//# sourceMappingURL=google-auth-identity.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"google-auth-identity.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/google-auth-identity.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4F;AAC5F,gEAAyE;AACzE,qDAA8D;AAE9D,MAAa,kBAAmB,SAAQ,kCAAY;IAE5C,KAAK,CAAU;CACtB;AAHD,gDAGC;AADO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACjB;AAGV,QAAA,uBAAuB,GACnC,IAAA,yCAA6B,EAAC,uCAAiB,EAAE,kBAAkB,EAAE,uBAAgB,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { getDiscriminatorModelForClass, prop, ReturnModelType } from '@typegoose/typegoose';\r\nimport { AuthIdentity, AuthIdentityModel } from '../auth-identity.model';\r\nimport { AuthIdentityType } from '../../../../utilities/enum';\r\n\r\nexport class GoogleAuthIdentity extends AuthIdentity {\r\n\t@prop({ required: true, type: String })\r\n\tpublic token!: string;\r\n}\r\n\r\nexport const GoogleAuthIdentityModel: ReturnModelType<typeof GoogleAuthIdentity> =\r\n\tgetDiscriminatorModelForClass(AuthIdentityModel, GoogleAuthIdentity, AuthIdentityType.GOOGLE);\r\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { AuthIdentity } from '../auth-identity.model';
|
|
3
|
+
import { OTPFields } from '../embedded/otp-fields.model';
|
|
4
|
+
export declare class PhoneAuthIdentity extends AuthIdentity {
|
|
5
|
+
phoneNumber: string;
|
|
6
|
+
otp: OTPFields;
|
|
7
|
+
}
|
|
8
|
+
export declare const PhoneAuthIdentityModel: ReturnModelType<typeof PhoneAuthIdentity>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PhoneAuthIdentityModel = exports.PhoneAuthIdentity = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const auth_identity_model_1 = require("../auth-identity.model");
|
|
15
|
+
const otp_fields_model_1 = require("../embedded/otp-fields.model");
|
|
16
|
+
const enum_1 = require("../../../../utilities/enum");
|
|
17
|
+
class PhoneAuthIdentity extends auth_identity_model_1.AuthIdentity {
|
|
18
|
+
phoneNumber;
|
|
19
|
+
otp;
|
|
20
|
+
}
|
|
21
|
+
exports.PhoneAuthIdentity = PhoneAuthIdentity;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], PhoneAuthIdentity.prototype, "phoneNumber", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typegoose_1.prop)({ required: true, type: otp_fields_model_1.OTPFields }),
|
|
28
|
+
__metadata("design:type", otp_fields_model_1.OTPFields)
|
|
29
|
+
], PhoneAuthIdentity.prototype, "otp", void 0);
|
|
30
|
+
exports.PhoneAuthIdentityModel = (0, typegoose_1.getDiscriminatorModelForClass)(auth_identity_model_1.AuthIdentityModel, PhoneAuthIdentity, enum_1.AuthIdentityType.PHONE);
|
|
31
|
+
//# sourceMappingURL=phone-auth-identity.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-auth-identity.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/phone-auth-identity.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4F;AAC5F,gEAAyE;AACzE,mEAAyD;AACzD,qDAA8D;AAE9D,MAAa,iBAAkB,SAAQ,kCAAY;IAE3C,WAAW,CAAU;IAGrB,GAAG,CAAa;CACvB;AAND,8CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDACX;AAGrB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,4BAAS,EAAE,CAAC;8BAC7B,4BAAS;8CAAC;AAGX,QAAA,sBAAsB,GAClC,IAAA,yCAA6B,EAAC,uCAAiB,EAAE,iBAAiB,EAAE,uBAAgB,CAAC,KAAK,CAAC,CAAC","sourcesContent":["import { getDiscriminatorModelForClass, prop, ReturnModelType } from '@typegoose/typegoose';\r\nimport { AuthIdentity, AuthIdentityModel } from '../auth-identity.model';\r\nimport { OTPFields } from '../embedded/otp-fields.model';\r\nimport { AuthIdentityType } from '../../../../utilities/enum';\r\n\r\nexport class PhoneAuthIdentity extends AuthIdentity {\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber!: string;\r\n\r\n\t@prop({ required: true, type: OTPFields })\r\n\tpublic otp!: OTPFields;\r\n}\r\n\r\nexport const PhoneAuthIdentityModel: ReturnModelType<typeof PhoneAuthIdentity> =\r\n\tgetDiscriminatorModelForClass(AuthIdentityModel, PhoneAuthIdentity, AuthIdentityType.PHONE);\r\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { CouponType } from '../../../../utilities/enum';
|
|
3
|
+
import { User } from '../user.model';
|
|
4
|
+
import { Coupon } from '../coupon.model';
|
|
5
|
+
export declare class ReferralCodeCoupon extends Coupon {
|
|
6
|
+
couponType: CouponType.REFERRAL_CODE;
|
|
7
|
+
orderLimitPerUser: 1;
|
|
8
|
+
referralUser: Ref<User>;
|
|
9
|
+
}
|
|
10
|
+
export declare const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ReferralCodeCouponModel = exports.ReferralCodeCoupon = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const enum_1 = require("../../../../utilities/enum");
|
|
15
|
+
const user_model_1 = require("../user.model");
|
|
16
|
+
const coupon_model_1 = require("../coupon.model");
|
|
17
|
+
class ReferralCodeCoupon extends coupon_model_1.Coupon {
|
|
18
|
+
couponType = enum_1.CouponType.REFERRAL_CODE;
|
|
19
|
+
orderLimitPerUser = 1;
|
|
20
|
+
referralUser;
|
|
21
|
+
}
|
|
22
|
+
exports.ReferralCodeCoupon = ReferralCodeCoupon;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typegoose_1.prop)({ required: true, ref: () => user_model_1.User }),
|
|
25
|
+
__metadata("design:type", Object)
|
|
26
|
+
], ReferralCodeCoupon.prototype, "referralUser", void 0);
|
|
27
|
+
exports.ReferralCodeCouponModel = (0, typegoose_1.getDiscriminatorModelForClass)(coupon_model_1.CouponModel, ReferralCodeCoupon, enum_1.CouponType.REFERRAL_CODE);
|
|
28
|
+
//# sourceMappingURL=referral-code-coupon.mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referral-code-coupon.mode.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/referral-code-coupon.mode.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiG;AACjG,qDAAwD;AACxD,8CAAqC;AACrC,kDAAsD;AAEtD,MAAa,kBAAmB,SAAQ,qBAAM;IACtC,UAAU,GAAG,iBAAU,CAAC,aAAsB,CAAC;IAE/C,iBAAiB,GAAG,CAAU,CAAC;IAG/B,YAAY,CAAa;CAChC;AAPD,gDAOC;AADO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;wDACV;AAGpB,QAAA,uBAAuB,GACnC,IAAA,yCAA6B,EAAC,0BAAW,EAAE,kBAAkB,EAAE,iBAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import { getDiscriminatorModelForClass, prop, Ref, ReturnModelType } from '@typegoose/typegoose';\r\nimport { CouponType } from '../../../../utilities/enum';\r\nimport { User } from '../user.model';\r\nimport { Coupon, CouponModel } from '../coupon.model';\r\n\r\nexport class ReferralCodeCoupon extends Coupon {\r\n\tpublic couponType = CouponType.REFERRAL_CODE as const;\r\n\r\n\tpublic orderLimitPerUser = 1 as const;\r\n\r\n\t@prop({ required: true, ref: () => User })\r\n\tpublic referralUser!: Ref<User>;\r\n}\r\n\r\nexport const ReferralCodeCouponModel: ReturnModelType<typeof ReferralCodeCoupon> =\r\n\tgetDiscriminatorModelForClass(CouponModel, ReferralCodeCoupon, CouponType.REFERRAL_CODE);\r\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
export declare class Role extends TimeStamps {
|
|
4
|
+
name: string;
|
|
5
|
+
status: boolean;
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const RoleModel: ReturnModelType<typeof Role>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RoleModel = exports.Role = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
|
+
let Role = class Role extends defaultClasses_1.TimeStamps {
|
|
16
|
+
name;
|
|
17
|
+
status;
|
|
18
|
+
description;
|
|
19
|
+
};
|
|
20
|
+
exports.Role = Role;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typegoose_1.prop)({ required: true, type: String }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Role.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typegoose_1.prop)({ required: true, type: Boolean, default: true }),
|
|
27
|
+
__metadata("design:type", Boolean)
|
|
28
|
+
], Role.prototype, "status", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typegoose_1.prop)({ type: String }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], Role.prototype, "description", void 0);
|
|
33
|
+
exports.Role = Role = __decorate([
|
|
34
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'roles' } })
|
|
35
|
+
], Role);
|
|
36
|
+
exports.RoleModel = (0, typegoose_1.getModelForClass)(Role);
|
|
37
|
+
//# sourceMappingURL=role.model.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"role.model.ts.js","sourceRoot":"/","sources":["libraries/mongo/models/role.model.ts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA6F;AAC7F,4EAAqE;AAG9D,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,IAAI,CAAU;IAGd,MAAM,CAAW;IAGjB,WAAW,CAAU;CAC5B,CAAA;AATY,oBAAI;AAET;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kCAClB;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oCAC/B;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACK;eARhB,IAAI;IADhB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,CAAC;GAC5C,IAAI,CAShB;AAEY,QAAA,SAAS,GAAiC,IAAA,4BAAgB,EAAC,IAAI,CAAC,CAAC","sourcesContent":["import { getModelForClass, modelOptions, prop, ReturnModelType } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'roles' } })\r\nexport class Role extends TimeStamps {\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, type: Boolean, default: true })\r\n\tpublic status!: boolean;\r\n\r\n\t@prop({ type: String })\r\n\tpublic description?: string;\r\n}\r\n\r\nexport const RoleModel: ReturnModelType<typeof Role> = getModelForClass(Role);\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duration.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/duration.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,QAAQ;IAEb,KAAK,CAAQ;IAGb,GAAG,CAAQ;CAClB;AAND,4BAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC3C,IAAI;uCAAC;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACR,IAAI;qCAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\n\nexport class Duration {\n\t@prop({ required: true, type: Date, default: new Date() })\n\tpublic start!: Date;\n\n\t@prop({ type: Date })\n\tpublic end?: Date;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"duration.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/duration.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAE5C,MAAa,QAAQ;IAEb,KAAK,CAAQ;IAGb,GAAG,CAAQ;CAClB;AAND,4BAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC3C,IAAI;uCAAC;AAGb;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;8BACR,IAAI;qCAAC","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\n\r\nexport class Duration {\r\n\t@prop({ required: true, type: Date, default: new Date() })\r\n\tpublic start!: Date;\r\n\r\n\t@prop({ type: Date })\r\n\tpublic end?: Date;\r\n}\r\n"]}
|
|
@@ -31,7 +31,7 @@ class NormalHour {
|
|
|
31
31
|
}
|
|
32
32
|
exports.NormalHour = NormalHour;
|
|
33
33
|
__decorate([
|
|
34
|
-
(0, typegoose_1.prop)({ required: true,
|
|
34
|
+
(0, typegoose_1.prop)({ required: true, type: Number, enum: enum_1.WeekDay }),
|
|
35
35
|
__metadata("design:type", Number)
|
|
36
36
|
], NormalHour.prototype, "day", void 0);
|
|
37
37
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-hour.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/work-hour.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAoF;AAEpF,MAAM,YAAY;IAEV,KAAK,CAAU;IAGf,GAAG,CAAU;CACpB;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACjB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACnB;AAGrB,MAAa,UAAU;IAEf,GAAG,CAAW;IAGd,MAAM,CAAc;IAGpB,YAAY,CAAkB;CACrC;AATD,gCASC;AAPO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"work-hour.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shared/work-hour.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAoF;AAEpF,MAAM,YAAY;IAEV,KAAK,CAAU;IAGf,GAAG,CAAU;CACpB;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;2CACjB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,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;qDACb","sourcesContent":["import { prop } from '@typegoose/typegoose';\r\nimport { HolidayWorkStatus, WeekDay, WorkStatus } from '../../../../utilities/enum';\r\n\r\nclass StartEndTime {\r\n\t@prop({ required: true, type: String })\r\n\tpublic start!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic end!: string;\r\n}\r\n\r\nexport class NormalHour {\r\n\t@prop({ required: true, type: Number, enum: WeekDay })\r\n\tpublic day!: WeekDay;\r\n\r\n\t@prop({ required: true, type: String, enum: WorkStatus })\r\n\tpublic status!: WorkStatus;\r\n\r\n\t@prop({ type: () => [StartEndTime], default: [] })\r\n\tpublic openingHours?: StartEndTime[];\r\n}\r\n\r\nexport class HolidayHour {\r\n\t@prop({ required: true, type: Date })\r\n\tpublic date?: Date;\r\n\r\n\t@prop({\r\n\t\trequired: true,\r\n\t\ttype: String,\r\n\t\tenum: HolidayWorkStatus,\r\n\t})\r\n\tpublic status!: HolidayWorkStatus;\r\n\r\n\t@prop({ type: StartEndTime })\r\n\tpublic closingHour?: StartEndTime;\r\n}\r\n\r\nexport class WorkHourSetting {\r\n\t@prop({ type: () => [NormalHour], default: [] })\r\n\tpublic normalHours?: NormalHour[];\r\n\r\n\t@prop({ type: () => [HolidayHour], default: [] })\r\n\tpublic holidayHours?: HolidayHour[];\r\n}\r\n"]}
|
|
@@ -8,17 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
12
|
exports.ShopAccessControl = void 0;
|
|
16
13
|
const typegoose_1 = require("@typegoose/typegoose");
|
|
17
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
18
|
-
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
|
19
15
|
const enum_1 = require("../../../utilities/enum");
|
|
20
16
|
const parent_model_1 = require("./parent.model");
|
|
21
17
|
const shop_model_1 = require("./shop.model");
|
|
18
|
+
const password_1 = require("../../../utilities/common/password");
|
|
22
19
|
let ShopAccessControl = class ShopAccessControl extends defaultClasses_1.TimeStamps {
|
|
23
20
|
email;
|
|
24
21
|
password;
|
|
@@ -50,8 +47,15 @@ __decorate([
|
|
|
50
47
|
exports.ShopAccessControl = ShopAccessControl = __decorate([
|
|
51
48
|
(0, typegoose_1.pre)('save', async function (next) {
|
|
52
49
|
if (this.isModified('password')) {
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
this.password = await (0, password_1.hashPassword)(this.password);
|
|
51
|
+
}
|
|
52
|
+
next();
|
|
53
|
+
}),
|
|
54
|
+
(0, typegoose_1.pre)('findOneAndUpdate', async function (next) {
|
|
55
|
+
const update = this.getUpdate();
|
|
56
|
+
if (update?.password) {
|
|
57
|
+
update.password = await (0, password_1.hashPassword)(update.password);
|
|
58
|
+
this.setUpdate(update);
|
|
55
59
|
}
|
|
56
60
|
next();
|
|
57
61
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAoE;AACpE,4EAAqE;AAErE,kDAAmD;AACnD,iDAAwC;AACxC,6CAAoC;AACpC,iEAAkE;AAiB3D,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2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AC;YACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;GACzD,iBAAiB,CAe7B","sourcesContent":["import { modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { Query } from 'mongoose';\r\nimport { ShopRole } from '../../../utilities/enum';\r\nimport { Parent } from './parent.model';\r\nimport { Shop } from './shop.model';\r\nimport { hashPassword } from '../../../utilities/common/password';\r\n\r\n@pre<ShopAccessControl>('save', async function (next) {\r\n\tif (this.isModified('password')) {\r\n\t\tthis.password = await hashPassword(this.password);\r\n\t}\r\n\tnext();\r\n})\r\n@pre<Query<any, ShopAccessControl>>('findOneAndUpdate', async function (next) {\r\n\tconst update = this.getUpdate() as Record<string, any>;\r\n\tif (update?.password) {\r\n\t\tupdate.password = await hashPassword(update.password);\r\n\t\tthis.setUpdate(update);\r\n\t}\r\n\tnext();\r\n})\r\n@modelOptions({ schemaOptions: { collection: 'shopAccessControls' } })\r\nexport class ShopAccessControl extends TimeStamps {\r\n\t@prop({ required: true, type: String, unique: true })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic password!: string;\r\n\r\n\t@prop({ required: true, ref: () => Parent })\r\n\tpublic parent!: Ref<Parent>;\r\n\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shops!: Ref<Shop>[];\r\n\r\n\t@prop({ required: true, type: String, enum: ShopRole })\r\n\tpublic role!: ShopRole;\r\n}\r\n"]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { Ref } from '@typegoose/typegoose';
|
|
2
2
|
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
-
import {
|
|
3
|
+
import { PriceOption, Status } from '../../../utilities/enum';
|
|
4
4
|
import { AttributeMap } from './embedded/attribute-map.model';
|
|
5
|
-
import {
|
|
5
|
+
import { PriceBreakdown } from './embedded/price-breakdown.model';
|
|
6
6
|
import { Product } from './product.model';
|
|
7
7
|
import { ShopCategory } from './shop-category.model';
|
|
8
8
|
import { Shop } from './shop.model';
|
|
9
9
|
export declare class ShopProduct extends TimeStamps {
|
|
10
10
|
product: Ref<Product>;
|
|
11
11
|
shop: Ref<Shop>;
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
priceOption?: PriceOption;
|
|
13
|
+
priceBreakdowns?: PriceBreakdown[];
|
|
14
14
|
description?: string;
|
|
15
15
|
attributeMaps?: AttributeMap[];
|
|
16
16
|
addons?: Ref<ShopProduct>[];
|
|
@@ -14,15 +14,15 @@ const typegoose_1 = require("@typegoose/typegoose");
|
|
|
14
14
|
const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
|
|
15
15
|
const enum_1 = require("../../../utilities/enum");
|
|
16
16
|
const attribute_map_model_1 = require("./embedded/attribute-map.model");
|
|
17
|
-
const
|
|
17
|
+
const price_breakdown_model_1 = require("./embedded/price-breakdown.model");
|
|
18
18
|
const product_model_1 = require("./product.model");
|
|
19
19
|
const shop_category_model_1 = require("./shop-category.model");
|
|
20
20
|
const shop_model_1 = require("./shop.model");
|
|
21
21
|
let ShopProduct = class ShopProduct extends defaultClasses_1.TimeStamps {
|
|
22
22
|
product;
|
|
23
23
|
shop;
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
priceOption;
|
|
25
|
+
priceBreakdowns;
|
|
26
26
|
description;
|
|
27
27
|
attributeMaps;
|
|
28
28
|
addons;
|
|
@@ -45,13 +45,13 @@ __decorate([
|
|
|
45
45
|
__metadata("design:type", Object)
|
|
46
46
|
], ShopProduct.prototype, "shop", void 0);
|
|
47
47
|
__decorate([
|
|
48
|
-
(0, typegoose_1.prop)({ type: String, enum: enum_1.
|
|
48
|
+
(0, typegoose_1.prop)({ type: String, enum: enum_1.PriceOption, default: enum_1.PriceOption.SINGLE_PRICE }),
|
|
49
49
|
__metadata("design:type", String)
|
|
50
|
-
], ShopProduct.prototype, "
|
|
50
|
+
], ShopProduct.prototype, "priceOption", void 0);
|
|
51
51
|
__decorate([
|
|
52
|
-
(0, typegoose_1.prop)({ required: true, type: [
|
|
52
|
+
(0, typegoose_1.prop)({ required: true, type: [price_breakdown_model_1.PriceBreakdown], min: 1 }),
|
|
53
53
|
__metadata("design:type", Array)
|
|
54
|
-
], ShopProduct.prototype, "
|
|
54
|
+
], ShopProduct.prototype, "priceBreakdowns", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
(0, typegoose_1.prop)({ type: String }),
|
|
57
57
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop-product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"shop-product.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-product.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA+D;AAC/D,4EAAqE;AACrE,kDAA8D;AAC9D,wEAA8D;AAC9D,4EAAkE;AAClE,mDAA0C;AAC1C,+DAAqD;AACrD,6CAAoC;AAG7B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,2BAAU;IAEnC,OAAO,CAAgB;IAGvB,IAAI,CAAa;IAGjB,WAAW,CAAe;IAG1B,eAAe,CAAoB;IAGnC,WAAW,CAAU;IAGrB,aAAa,CAAkB;IAG/B,MAAM,CAAsB;IAG5B,MAAM,CAAU;IAGhB,YAAY,CAAqB;IAGjC,YAAY,CAAU;IAGtB,cAAc,CAAW;IAGzB,aAAa,CAAU;IAGvB,IAAI,CAAU;IAGd,eAAe,CAAW;IAG1B,kBAAkB,CAAU;CACnC,CAAA;AA7CY,kCAAW;AAEhB;IADN,I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,KAAK,EAAE,CAAC;;mDACR;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDACO;AAGvB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yCACF;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;oDACP;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;uDACA;sBA5CvB,WAAW;IADvB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC;GACnD,WAAW,CA6CvB","sourcesContent":["import { modelOptions, prop, Ref } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { PriceOption, Status } from '../../../utilities/enum';\r\nimport { AttributeMap } from './embedded/attribute-map.model';\r\nimport { PriceBreakdown } from './embedded/price-breakdown.model';\r\nimport { Product } from './product.model';\r\nimport { ShopCategory } from './shop-category.model';\r\nimport { Shop } from './shop.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'shopProducts' } })\r\nexport class ShopProduct extends TimeStamps {\r\n\t@prop({ required: true, ref: () => Product })\r\n\tpublic product!: Ref<Product>;\r\n\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shop!: Ref<Shop>;\r\n\r\n\t@prop({ type: String, enum: PriceOption, default: PriceOption.SINGLE_PRICE })\r\n\tpublic priceOption?: PriceOption;\r\n\r\n\t@prop({ required: true, type: [PriceBreakdown], min: 1 })\r\n\tpublic priceBreakdowns?: PriceBreakdown[];\r\n\r\n\t@prop({ type: String })\r\n\tpublic description?: string;\r\n\r\n\t@prop({ type: [AttributeMap], default: [] })\r\n\tpublic attributeMaps?: AttributeMap[];\r\n\r\n\t@prop({ ref: () => ShopProduct, default: [] })\r\n\tpublic addons?: Ref<ShopProduct>[];\r\n\r\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status?: Status;\r\n\r\n\t@prop({ required: true, ref: () => ShopCategory })\r\n\tpublic shopCategory!: Ref<ShopCategory>;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isStockEnabled?: boolean;\r\n\r\n\t@prop({ type: Number })\r\n\tpublic stockQuantity?: number;\r\n\r\n\t@prop({ type: String })\r\n\tpublic note?: string;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isDrinkIncluded?: boolean;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic orderQuantityLimit?: number;\r\n}\r\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Ref, ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { BaseReview } from './base/base-review.model';
|
|
3
|
+
import { Shop } from './shop.model';
|
|
4
|
+
export declare class ShopReview extends BaseReview {
|
|
5
|
+
shop: Ref<Shop>;
|
|
6
|
+
}
|
|
7
|
+
export declare const ShopReviewModel: ReturnModelType<typeof ShopReview>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ShopReviewModel = exports.ShopReview = void 0;
|
|
13
|
+
const typegoose_1 = require("@typegoose/typegoose");
|
|
14
|
+
const base_review_model_1 = require("./base/base-review.model");
|
|
15
|
+
const shop_model_1 = require("./shop.model");
|
|
16
|
+
let ShopReview = class ShopReview extends base_review_model_1.BaseReview {
|
|
17
|
+
shop;
|
|
18
|
+
};
|
|
19
|
+
exports.ShopReview = ShopReview;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, typegoose_1.prop)({ required: true, ref: () => shop_model_1.Shop }),
|
|
22
|
+
__metadata("design:type", Object)
|
|
23
|
+
], ShopReview.prototype, "shop", void 0);
|
|
24
|
+
exports.ShopReview = ShopReview = __decorate([
|
|
25
|
+
(0, typegoose_1.modelOptions)({ schemaOptions: { collection: 'shopReviews' } })
|
|
26
|
+
], ShopReview);
|
|
27
|
+
exports.ShopReviewModel = (0, typegoose_1.getModelForClass)(ShopReview);
|
|
28
|
+
//# sourceMappingURL=shop-review.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shop-review.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-review.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAkG;AAClG,gEAAsD;AACtD,6CAAoC;AAG7B,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,8BAAU;IAElC,IAAI,CAAa;CACxB,CAAA;AAHY,gCAAU;AAEf;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;wCAClB;qBAFZ,UAAU;IADtB,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,CAAC;GAClD,UAAU,CAGtB;AAEY,QAAA,eAAe,GAAuC,IAAA,4BAAgB,EAAC,UAAU,CAAC,CAAC","sourcesContent":["import { prop, getModelForClass, modelOptions, Ref, ReturnModelType } from '@typegoose/typegoose';\r\nimport { BaseReview } from './base/base-review.model';\r\nimport { Shop } from './shop.model';\r\n\r\n@modelOptions({ schemaOptions: { collection: 'shopReviews' } })\r\nexport class ShopReview extends BaseReview {\r\n\t@prop({ required: true, ref: () => Shop })\r\n\tpublic shop!: Ref<Shop>;\r\n}\r\n\r\nexport const ShopReviewModel: ReturnModelType<typeof ShopReview> = getModelForClass(ShopReview);\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shop.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,wEAA8D;AAC9D,iDAAwC;AACxC,0DAAiD;AACjD,8DAA2D;AAC3D,2CAAkC;AAClC,6CAAoC;
|
|
1
|
+
{"version":3,"file":"shop.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAyE;AACzE,4EAAqE;AACrE,kDAA6E;AAC7E,+CAAsC;AACtC,wEAA8D;AAC9D,iDAAwC;AACxC,0DAAiD;AACjD,8DAA2D;AAC3D,2CAAkC;AAClC,6CAAoC;AAO7B,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,2BAAU;IAE5B,IAAI,CAAU;IAGd,MAAM,CAAc;IAGpB,QAAQ,CAAY;IAGpB,IAAI,CAAU;IAGd,KAAK,CAAa;IAGlB,SAAS,CAAU;IAGnB,KAAK,CAAU;IAGf,WAAW,CAAU;IAGrB,eAAe,CAAU;IAGzB,sBAAsB,CAAY;IAGlC,OAAO,CAAW;IAGlB,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,MAAM,CAAU;IAGhB,QAAQ,CAAg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ADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;oDACG;AAGvC;IADC,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;0CAChB;AAGf;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,iCAAe,EAAE,CAAC;8BACP,iCAAe;6CAAC;AAGlC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;;wDACH;AAGrC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;;oDACP;AAGhC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;;yDACF;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;;qDACN;AAGjC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;0CACN;eAnHjB,IAAI;IAJhB,IAAA,wBAAY,EAAC;QACb,aAAa,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE;QACtC,OAAO,EAAE,EAAE,UAAU,EAAE,oBAAQ,CAAC,KAAK,EAAE;KACvC,CAAC;GACW,IAAI,CAoHhB","sourcesContent":["import { modelOptions, prop, Ref, Severity } from '@typegoose/typegoose';\r\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\r\nimport { ItemType, ShopOnlineStatus, Status } from '../../../utilities/enum';\r\nimport { Brand } from './brand.model';\r\nimport { ShopDocument } from './embedded/shop-document.model';\r\nimport { Parent } from './parent.model';\r\nimport { Address } from './shared/address.model';\r\nimport { WorkHourSetting } from './shared/work-hour.model';\r\nimport { Tag } from './tag.model';\r\nimport { Zone } from './zone.model';\r\n\r\n\r\n@modelOptions({\r\n\tschemaOptions: { collection: 'shops' },\r\n\toptions: { allowMixed: Severity.ALLOW },\r\n})\r\nexport class Shop extends TimeStamps {\r\n\t@prop({ required: true, unique: true, type: String })\r\n\tpublic slug!: string;\r\n\r\n\t@prop({ required: true, ref: () => Parent })\r\n\tpublic parent: Ref<Parent>;\r\n\r\n\t@prop({ required: true, type: String, enum: ItemType })\r\n\tpublic itemType!: ItemType;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic name!: string;\r\n\r\n\t@prop({ required: true, ref: () => Brand })\r\n\tpublic brand: Ref<Brand>;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic ownerName!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic email!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic phoneNumber!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic userPhoneNumber!: string;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic additionalPhoneNumbers?: string[];\r\n\r\n\t@prop({ required: true, type: Address })\r\n\tpublic address!: Address;\r\n\r\n\t@prop({ required: true, ref: () => Zone })\r\n\tpublic zone!: Ref<Zone>;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic logo!: string;\r\n\r\n\t@prop({ required: true, type: String })\r\n\tpublic banner!: string;\r\n\r\n\t@prop({ required: true, type: ShopDocument })\r\n\tpublic document!: ShopDocument;\r\n\r\n\t@prop({ required: true, type: Boolean })\r\n\tpublic isBeirutAuthentic!: boolean;\r\n\r\n\t@prop({ required: true, type: Boolean })\r\n\tpublic isVisibleToUser!: boolean;\r\n\r\n\t@prop({ required: true, type: String, enum: Status, default: Status.ACTIVE })\r\n\tpublic status!: Status;\r\n\r\n\t@prop({\r\n\t\ttype: String,\r\n\t\tenum: ShopOnlineStatus,\r\n\t\tdefault: ShopOnlineStatus.OFFLINE,\r\n\t})\r\n\tpublic onlineStatus?: ShopOnlineStatus;\r\n\r\n\t// Setting\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic allowSpecialInstructions?: boolean;\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isRiderNoteVisible?: boolean;\r\n\r\n\t@prop({ type: String })\r\n\tpublic riderNote?: string;\r\n\r\n\t@prop({ type: Number, default: 1, min: 1, max: 4 })\r\n\tpublic priceRange?: number;\r\n\r\n\t@prop({ type: () => [String], default: [] })\r\n\tpublic dietaries?: string[];\r\n\r\n\t@prop({ ref: () => Tag, default: [] })\r\n\tpublic tags?: Ref<Tag>[];\r\n\r\n\t@prop({ type: Boolean, default: false })\r\n\tpublic isShopDelivery?: boolean;\r\n\r\n\t@prop({ type: Number })\r\n\tpublic deliveryFee?: number;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic minimumOrderAmount?: number;\r\n\r\n\t@prop({ type: Number, default: Infinity })\r\n\tpublic orderCapacity?: number;\r\n\r\n\t@prop({ type: Number, default: 10 })\r\n\tpublic defaultPreparationTime?: number;\r\n\r\n\t@prop({ type: Number, default: null })\r\n\texchangeRate?: number;\r\n\r\n\t@prop({ type: WorkHourSetting })\r\n\tpublic workHourSetting?: WorkHourSetting;\r\n\r\n\t@prop({ required: false, type: () => Boolean })\r\n\tpublic isFavouriteCategoryVisible?: boolean;\r\n\r\n\t@prop({ required: false, type: () => String })\r\n\tpublic favouriteCategoryTitle?: string;\r\n\r\n\t@prop({ required: false, type: () => Boolean })\r\n\tpublic isBestSellerCategoryVisible?: boolean;\r\n\r\n\t@prop({ required: false, type: () => String })\r\n\tpublic bestSellerCategoryTitle?: string;\r\n\r\n\t@prop({ type: Number, default: 0 })\r\n\tpublic sortingOrder?: number;\r\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.model.js","sourceRoot":"/","sources":["libraries/mongo/models/transaction.model.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;CAAG;AAA3B,kCAA2B","sourcesContent":["export class Transaction {}\n"]}
|
|
1
|
+
{"version":3,"file":"transaction.model.js","sourceRoot":"/","sources":["libraries/mongo/models/transaction.model.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;CAAG;AAA3B,kCAA2B","sourcesContent":["export class Transaction {}\r\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReturnModelType } from '@typegoose/typegoose';
|
|
2
|
+
import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
|
|
3
|
+
import { ZoneStatus } from '../../../utilities/enum';
|
|
4
|
+
import { ZoneGeometry } from './embedded/zone-geometry.mode';
|
|
5
|
+
export declare class Zone extends TimeStamps {
|
|
6
|
+
zoneName: string;
|
|
7
|
+
zoneArea?: string;
|
|
8
|
+
zoneGeometry: ZoneGeometry;
|
|
9
|
+
status?: ZoneStatus;
|
|
10
|
+
zoneBusyTitle?: string;
|
|
11
|
+
zoneBusyDescription?: string;
|
|
12
|
+
riderWeeklyTarget?: number;
|
|
13
|
+
riderWeeklyReward?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const ZoneModel: ReturnModelType<typeof Zone>;
|