world-med-commons 1.0.2 → 1.0.4
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.d.ts +7 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/models/allergy.schema.d.ts +3 -2
- package/dist/models/allergy.schema.js +2 -1
- package/dist/models/allergy.schema.js.map +1 -1
- package/dist/models/apiKey.schema.d.ts +93 -0
- package/dist/models/apiKey.schema.js +50 -0
- package/dist/models/apiKey.schema.js.map +1 -0
- package/dist/models/business.schema.d.ts +10 -0
- package/dist/models/business.schema.js +4 -0
- package/dist/models/business.schema.js.map +1 -1
- package/dist/models/cart.model.d.ts +62 -0
- package/dist/models/cart.model.js +49 -0
- package/dist/models/cart.model.js.map +1 -0
- package/dist/models/country.schema.d.ts +72 -0
- package/dist/models/country.schema.js +39 -0
- package/dist/models/country.schema.js.map +1 -0
- package/dist/models/currency.schema.d.ts +62 -0
- package/dist/models/currency.schema.js +34 -0
- package/dist/models/currency.schema.js.map +1 -0
- package/dist/models/drug-variant.schema.d.ts +23 -3
- package/dist/models/drug-variant.schema.js +14 -11
- package/dist/models/drug-variant.schema.js.map +1 -1
- package/dist/models/orders.schema.d.ts +164 -0
- package/dist/models/orders.schema.js +86 -0
- package/dist/models/orders.schema.js.map +1 -0
- package/dist/models/suppliers.schema.d.ts +3 -2
- package/dist/models/suppliers.schema.js +2 -1
- package/dist/models/suppliers.schema.js.map +1 -1
- package/dist/util/currency.util.d.ts +3 -0
- package/dist/util/currency.util.js +45 -0
- package/dist/util/currency.util.js.map +1 -0
- package/dist/util/ip-country.util.d.ts +6 -0
- package/dist/util/ip-country.util.js +33 -0
- package/dist/util/ip-country.util.js.map +1 -0
- package/package.json +3 -1
- package/src/index.ts +8 -2
- package/src/models/allergy.schema.ts +2 -1
- package/src/models/apiKey.schema.ts +28 -0
- package/src/models/business.schema.ts +3 -0
- package/src/models/cart.model.ts +31 -0
- package/src/models/country.schema.ts +21 -0
- package/src/models/currency.schema.ts +17 -0
- package/src/models/drug-variant.schema.ts +15 -16
- package/src/models/orders.schema.ts +68 -0
- package/src/models/suppliers.schema.ts +2 -1
- package/src/util/currency.util.ts +92 -0
- package/src/util/ip-country.util.ts +60 -0
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,15 @@ export * from './models/user.schema';
|
|
|
3
3
|
export * from './models/employee.schema';
|
|
4
4
|
export * from './models/allergy.schema';
|
|
5
5
|
export * from './dtos/pagination.dto';
|
|
6
|
-
export * from './models/allergy.schema';
|
|
7
6
|
export * from './models/drug.schema';
|
|
8
7
|
export * from './models/drug-variant.schema';
|
|
9
8
|
export * from './models/business-inventory.schema';
|
|
10
9
|
export * from './models/patient.schema';
|
|
11
10
|
export * from './models/suppliers.schema';
|
|
11
|
+
export * from './models/apiKey.schema';
|
|
12
|
+
export * from './models/currency.schema';
|
|
13
|
+
export * from './util/currency.util';
|
|
14
|
+
export * from './util/ip-country.util';
|
|
15
|
+
export * from './models/country.schema';
|
|
16
|
+
export * from './models/cart.model';
|
|
17
|
+
export * from './models/orders.schema';
|
package/dist/index.js
CHANGED
|
@@ -19,10 +19,16 @@ __exportStar(require("./models/user.schema"), exports);
|
|
|
19
19
|
__exportStar(require("./models/employee.schema"), exports);
|
|
20
20
|
__exportStar(require("./models/allergy.schema"), exports);
|
|
21
21
|
__exportStar(require("./dtos/pagination.dto"), exports);
|
|
22
|
-
__exportStar(require("./models/allergy.schema"), exports);
|
|
23
22
|
__exportStar(require("./models/drug.schema"), exports);
|
|
24
23
|
__exportStar(require("./models/drug-variant.schema"), exports);
|
|
25
24
|
__exportStar(require("./models/business-inventory.schema"), exports);
|
|
26
25
|
__exportStar(require("./models/patient.schema"), exports);
|
|
27
26
|
__exportStar(require("./models/suppliers.schema"), exports);
|
|
27
|
+
__exportStar(require("./models/apiKey.schema"), exports);
|
|
28
|
+
__exportStar(require("./models/currency.schema"), exports);
|
|
29
|
+
__exportStar(require("./util/currency.util"), exports);
|
|
30
|
+
__exportStar(require("./util/ip-country.util"), exports);
|
|
31
|
+
__exportStar(require("./models/country.schema"), exports);
|
|
32
|
+
__exportStar(require("./models/cart.model"), exports);
|
|
33
|
+
__exportStar(require("./models/orders.schema"), exports);
|
|
28
34
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,uDAAqC;AACrC,2DAAyC;AACzC,0DAAwC;AACxC,wDAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2DAAyC;AACzC,uDAAqC;AACrC,2DAAyC;AACzC,0DAAwC;AACxC,wDAAsC;AACtC,uDAAqC;AACrC,+DAA6C;AAC7C,qEAAmD;AACnD,0DAAwC;AACxC,4DAA0C;AAC1C,yDAAuC;AACvC,2DAAyC;AACzC,uDAAqC;AACrC,yDAAuC;AACvC,0DAAwC;AACxC,sDAAoC;AACpC,yDAAuC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Document, Types } from 'mongoose';
|
|
2
|
+
import { User } from "./user.schema";
|
|
2
3
|
export declare enum AllergySeverity {
|
|
3
4
|
MILD = "mild",
|
|
4
5
|
MODERATE = "moderate",
|
|
@@ -16,7 +17,7 @@ export declare enum AllergyType {
|
|
|
16
17
|
CONTRAINDICATION = "contraindication"
|
|
17
18
|
}
|
|
18
19
|
export declare class Allergy extends Document {
|
|
19
|
-
user:
|
|
20
|
+
user: User;
|
|
20
21
|
substance: string;
|
|
21
22
|
codedSubstance?: {
|
|
22
23
|
system: string;
|
|
@@ -70,7 +71,7 @@ export declare const AllergySchema: import("mongoose").Schema<Allergy, import("m
|
|
|
70
71
|
}, "id"> & {
|
|
71
72
|
id: string;
|
|
72
73
|
}>;
|
|
73
|
-
user?: import("mongoose").SchemaDefinitionProperty<
|
|
74
|
+
user?: import("mongoose").SchemaDefinitionProperty<User, Allergy, Document<unknown, {}, Allergy, {
|
|
74
75
|
id: string;
|
|
75
76
|
}, import("mongoose").DefaultSchemaOptions> & Omit<Allergy & Required<{
|
|
76
77
|
_id: Types.ObjectId;
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AllergySchema = exports.Allergy = exports.AllergyType = exports.AllergyCriticality = exports.AllergySeverity = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
+
const user_schema_1 = require("./user.schema");
|
|
15
16
|
var AllergySeverity;
|
|
16
17
|
(function (AllergySeverity) {
|
|
17
18
|
AllergySeverity["MILD"] = "mild";
|
|
@@ -36,7 +37,7 @@ let Allergy = class Allergy extends mongoose_2.Document {
|
|
|
36
37
|
exports.Allergy = Allergy;
|
|
37
38
|
__decorate([
|
|
38
39
|
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: 'User', required: true, index: true }),
|
|
39
|
-
__metadata("design:type",
|
|
40
|
+
__metadata("design:type", user_schema_1.User)
|
|
40
41
|
], Allergy.prototype, "user", void 0);
|
|
41
42
|
__decorate([
|
|
42
43
|
(0, mongoose_1.Prop)({ required: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allergy.schema.js","sourceRoot":"","sources":["../../src/models/allergy.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA2C;
|
|
1
|
+
{"version":3,"file":"allergy.schema.js","sourceRoot":"","sources":["../../src/models/allergy.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
import { Business } from "./business.schema";
|
|
3
|
+
export declare class ApiKey extends Document {
|
|
4
|
+
key: String;
|
|
5
|
+
name: String;
|
|
6
|
+
isActive: Boolean;
|
|
7
|
+
ownerType: string;
|
|
8
|
+
business?: Business;
|
|
9
|
+
lastUsedAt: Date;
|
|
10
|
+
}
|
|
11
|
+
export declare const ApiKeySchema: mongoose.Schema<ApiKey, mongoose.Model<ApiKey, any, any, any, (mongoose.Document<unknown, any, ApiKey, any, mongoose.DefaultSchemaOptions> & ApiKey & Required<{
|
|
12
|
+
_id: mongoose.Types.ObjectId;
|
|
13
|
+
}> & {
|
|
14
|
+
__v: number;
|
|
15
|
+
} & {
|
|
16
|
+
id: string;
|
|
17
|
+
}) | (mongoose.Document<unknown, any, ApiKey, any, mongoose.DefaultSchemaOptions> & ApiKey & Required<{
|
|
18
|
+
_id: mongoose.Types.ObjectId;
|
|
19
|
+
}> & {
|
|
20
|
+
__v: number;
|
|
21
|
+
}), any, ApiKey>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
22
|
+
id: string;
|
|
23
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
24
|
+
_id: mongoose.Types.ObjectId;
|
|
25
|
+
}> & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}, "id"> & {
|
|
28
|
+
id: string;
|
|
29
|
+
}, {
|
|
30
|
+
name?: mongoose.SchemaDefinitionProperty<String, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
31
|
+
id: string;
|
|
32
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
33
|
+
_id: mongoose.Types.ObjectId;
|
|
34
|
+
}> & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, "id"> & {
|
|
37
|
+
id: string;
|
|
38
|
+
}>;
|
|
39
|
+
_id?: mongoose.SchemaDefinitionProperty<mongoose.Types.ObjectId, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
40
|
+
id: string;
|
|
41
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
42
|
+
_id: mongoose.Types.ObjectId;
|
|
43
|
+
}> & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}, "id"> & {
|
|
46
|
+
id: string;
|
|
47
|
+
}>;
|
|
48
|
+
business?: mongoose.SchemaDefinitionProperty<Business, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
49
|
+
id: string;
|
|
50
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
51
|
+
_id: mongoose.Types.ObjectId;
|
|
52
|
+
}> & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}, "id"> & {
|
|
55
|
+
id: string;
|
|
56
|
+
}>;
|
|
57
|
+
isActive?: mongoose.SchemaDefinitionProperty<Boolean, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
58
|
+
id: string;
|
|
59
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
60
|
+
_id: mongoose.Types.ObjectId;
|
|
61
|
+
}> & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}, "id"> & {
|
|
64
|
+
id: string;
|
|
65
|
+
}>;
|
|
66
|
+
key?: mongoose.SchemaDefinitionProperty<String, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
67
|
+
id: string;
|
|
68
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
69
|
+
_id: mongoose.Types.ObjectId;
|
|
70
|
+
}> & {
|
|
71
|
+
__v: number;
|
|
72
|
+
}, "id"> & {
|
|
73
|
+
id: string;
|
|
74
|
+
}>;
|
|
75
|
+
ownerType?: mongoose.SchemaDefinitionProperty<string, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
76
|
+
id: string;
|
|
77
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
78
|
+
_id: mongoose.Types.ObjectId;
|
|
79
|
+
}> & {
|
|
80
|
+
__v: number;
|
|
81
|
+
}, "id"> & {
|
|
82
|
+
id: string;
|
|
83
|
+
}>;
|
|
84
|
+
lastUsedAt?: mongoose.SchemaDefinitionProperty<Date, ApiKey, mongoose.Document<unknown, {}, ApiKey, {
|
|
85
|
+
id: string;
|
|
86
|
+
}, mongoose.DefaultSchemaOptions> & Omit<ApiKey & Required<{
|
|
87
|
+
_id: mongoose.Types.ObjectId;
|
|
88
|
+
}> & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}, "id"> & {
|
|
91
|
+
id: string;
|
|
92
|
+
}>;
|
|
93
|
+
}, ApiKey>;
|
|
@@ -0,0 +1,50 @@
|
|
|
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.ApiKeySchema = exports.ApiKey = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const business_schema_1 = require("./business.schema");
|
|
16
|
+
let ApiKey = class ApiKey extends mongoose_2.Document {
|
|
17
|
+
};
|
|
18
|
+
exports.ApiKey = ApiKey;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, mongoose_1.Prop)({ required: true, unique: true }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], ApiKey.prototype, "key", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ApiKey.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, mongoose_1.Prop)({ required: false, default: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], ApiKey.prototype, "isActive", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, mongoose_1.Prop)({ required: true, enum: ['Business', 'Microservice'] }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ApiKey.prototype, "ownerType", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, mongoose_1.Prop)({
|
|
37
|
+
required: false,
|
|
38
|
+
type: mongoose_2.default.Schema.Types.ObjectId, ref: 'Business'
|
|
39
|
+
}),
|
|
40
|
+
__metadata("design:type", business_schema_1.Business)
|
|
41
|
+
], ApiKey.prototype, "business", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], ApiKey.prototype, "lastUsedAt", void 0);
|
|
46
|
+
exports.ApiKey = ApiKey = __decorate([
|
|
47
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
48
|
+
], ApiKey);
|
|
49
|
+
exports.ApiKeySchema = mongoose_1.SchemaFactory.createForClass(ApiKey);
|
|
50
|
+
//# sourceMappingURL=apiKey.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiKey.schema.js","sourceRoot":"","sources":["../../src/models/apiKey.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6D;AAC7D,uCAA8D;AAC9D,uDAA2C;AAKpC,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,mBAAQ;CAkBnC,CAAA;AAlBY,wBAAM;AAEjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;8BACjC,MAAM;mCAAC;AAEZ;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACnB,MAAM;oCAAC;AAEb;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC/B,OAAO;wCAAC;AAGlB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,cAAc,CAAC,EAAE,CAAC;;yCAC3C;AAMlB;IAJC,IAAA,eAAI,EAAC;QACJ,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU;KACtD,CAAC;8BACS,0BAAQ;wCAAC;AAEpB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BACb,IAAI;0CAAA;iBAjBN,MAAM;IAHlB,IAAA,iBAAM,EACL,EAAE,UAAU,EAAE,IAAI,EAAE,CACrB;GACY,MAAM,CAkBlB;AAEY,QAAA,YAAY,GAAG,wBAAa,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -25,6 +25,7 @@ export declare class Business {
|
|
|
25
25
|
suppliers?: Supplier[];
|
|
26
26
|
currencyCode: string;
|
|
27
27
|
minimumQuantityThreshold: number;
|
|
28
|
+
isActive: boolean;
|
|
28
29
|
}
|
|
29
30
|
export declare const BusinessSchema: mongoose.Schema<Business, mongoose.Model<Business, any, any, any, (mongoose.Document<unknown, any, Business, any, mongoose.DefaultSchemaOptions> & Business & {
|
|
30
31
|
_id: mongoose.Types.ObjectId;
|
|
@@ -210,4 +211,13 @@ export declare const BusinessSchema: mongoose.Schema<Business, mongoose.Model<Bu
|
|
|
210
211
|
}, "id"> & {
|
|
211
212
|
id: string;
|
|
212
213
|
}>;
|
|
214
|
+
isActive?: mongoose.SchemaDefinitionProperty<boolean, Business, mongoose.Document<unknown, {}, Business, {
|
|
215
|
+
id: string;
|
|
216
|
+
}, mongoose.DefaultSchemaOptions> & Omit<Business & {
|
|
217
|
+
_id: mongoose.Types.ObjectId;
|
|
218
|
+
} & {
|
|
219
|
+
__v: number;
|
|
220
|
+
}, "id"> & {
|
|
221
|
+
id: string;
|
|
222
|
+
}>;
|
|
213
223
|
}, Business>;
|
|
@@ -98,6 +98,10 @@ __decorate([
|
|
|
98
98
|
(0, mongoose_2.Prop)({ required: false, default: 5 }),
|
|
99
99
|
__metadata("design:type", Number)
|
|
100
100
|
], Business.prototype, "minimumQuantityThreshold", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, mongoose_2.Prop)({ required: true, default: false }),
|
|
103
|
+
__metadata("design:type", Boolean)
|
|
104
|
+
], Business.prototype, "isActive", void 0);
|
|
101
105
|
exports.Business = Business = __decorate([
|
|
102
106
|
(0, mongoose_2.Schema)({
|
|
103
107
|
timestamps: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"business.schema.js","sourceRoot":"","sources":["../../src/models/business.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAsD;AACtD,+CAA+D;AAYxD,IAAM,QAAQ,GAAd,MAAM,QAAQ;
|
|
1
|
+
{"version":3,"file":"business.schema.js","sourceRoot":"","sources":["../../src/models/business.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAsD;AACtD,+CAA+D;AAYxD,IAAM,QAAQ,GAAd,MAAM,QAAQ;CA2DpB,CAAA;AA3DY,4BAAQ;AAEnB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACZ;AAIb;IAHC,IAAA,eAAI,EAAC;QACJ,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,IAAI;KAAE,CAAC;;uCACL;AAEd;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACL;AAEpB;IADC,IAAA,eAAI,GAAE;;yCACS;AAEhB;IADC,IAAA,eAAI,GAAE;;sCACM;AAEb;IADC,IAAA,eAAI,GAAE;;6CACa;AAEpB;IADC,IAAA,eAAI,GAAE;;yCACS;AAEhB;IADC,IAAA,eAAI,GAAE;;sCACM;AAEb;IADC,IAAA,eAAI,GAAE;;uCACO;AAEd;IADC,IAAA,eAAI,GAAE;;yCACS;AAEhB;IADC,IAAA,eAAI,GAAE;;yCACS;AAQhB;IAPC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE;YACJ,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACrB,GAAG,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACtB;QACD,KAAK,EAAE,UAAU;KAClB,CAAC;;6CAIA;AAKF;IAHC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU;KACtD,CAAC;8BACM,QAAQ;wCAAC;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;;2CACrD;AAGvB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;;0CACtD;AAGrB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC,EAAC,CAAC;;2CACpD;AAGvB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACL;AAGpB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,EAAC,CAAC;;0DACL;AAGhC;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;0CACvB;mBA1DP,QAAQ;IALpB,IAAA,iBAAM,EACL;QACE,UAAU,EAAE,IAAI;KACjB,CACF;GACY,QAAQ,CA2DpB;AAEY,QAAA,cAAc,GAAG,wBAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import mongoose, { Document } from "mongoose";
|
|
2
|
+
export declare class Cart extends Document {
|
|
3
|
+
userId: string;
|
|
4
|
+
vendors: any[];
|
|
5
|
+
lastModified: Date;
|
|
6
|
+
}
|
|
7
|
+
export declare const CartSchema: mongoose.Schema<Cart, mongoose.Model<Cart, any, any, any, (mongoose.Document<unknown, any, Cart, any, mongoose.DefaultSchemaOptions> & Cart & Required<{
|
|
8
|
+
_id: mongoose.Types.ObjectId;
|
|
9
|
+
}> & {
|
|
10
|
+
__v: number;
|
|
11
|
+
} & {
|
|
12
|
+
id: string;
|
|
13
|
+
}) | (mongoose.Document<unknown, any, Cart, any, mongoose.DefaultSchemaOptions> & Cart & Required<{
|
|
14
|
+
_id: mongoose.Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}), any, Cart>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, Cart, mongoose.Document<unknown, {}, Cart, {
|
|
18
|
+
id: string;
|
|
19
|
+
}, mongoose.DefaultSchemaOptions> & Omit<Cart & Required<{
|
|
20
|
+
_id: mongoose.Types.ObjectId;
|
|
21
|
+
}> & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}, "id"> & {
|
|
24
|
+
id: string;
|
|
25
|
+
}, {
|
|
26
|
+
_id?: mongoose.SchemaDefinitionProperty<mongoose.Types.ObjectId, Cart, mongoose.Document<unknown, {}, Cart, {
|
|
27
|
+
id: string;
|
|
28
|
+
}, mongoose.DefaultSchemaOptions> & Omit<Cart & Required<{
|
|
29
|
+
_id: mongoose.Types.ObjectId;
|
|
30
|
+
}> & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}, "id"> & {
|
|
33
|
+
id: string;
|
|
34
|
+
}>;
|
|
35
|
+
userId?: mongoose.SchemaDefinitionProperty<string, Cart, mongoose.Document<unknown, {}, Cart, {
|
|
36
|
+
id: string;
|
|
37
|
+
}, mongoose.DefaultSchemaOptions> & Omit<Cart & Required<{
|
|
38
|
+
_id: mongoose.Types.ObjectId;
|
|
39
|
+
}> & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}, "id"> & {
|
|
42
|
+
id: string;
|
|
43
|
+
}>;
|
|
44
|
+
vendors?: mongoose.SchemaDefinitionProperty<any[], Cart, mongoose.Document<unknown, {}, Cart, {
|
|
45
|
+
id: string;
|
|
46
|
+
}, mongoose.DefaultSchemaOptions> & Omit<Cart & Required<{
|
|
47
|
+
_id: mongoose.Types.ObjectId;
|
|
48
|
+
}> & {
|
|
49
|
+
__v: number;
|
|
50
|
+
}, "id"> & {
|
|
51
|
+
id: string;
|
|
52
|
+
}>;
|
|
53
|
+
lastModified?: mongoose.SchemaDefinitionProperty<Date, Cart, mongoose.Document<unknown, {}, Cart, {
|
|
54
|
+
id: string;
|
|
55
|
+
}, mongoose.DefaultSchemaOptions> & Omit<Cart & Required<{
|
|
56
|
+
_id: mongoose.Types.ObjectId;
|
|
57
|
+
}> & {
|
|
58
|
+
__v: number;
|
|
59
|
+
}, "id"> & {
|
|
60
|
+
id: string;
|
|
61
|
+
}>;
|
|
62
|
+
}, Cart>;
|
|
@@ -0,0 +1,49 @@
|
|
|
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.CartSchema = exports.Cart = void 0;
|
|
13
|
+
const mongoose_1 = require("mongoose");
|
|
14
|
+
const mongoose_2 = require("@nestjs/mongoose");
|
|
15
|
+
let Cart = class Cart extends mongoose_1.Document {
|
|
16
|
+
};
|
|
17
|
+
exports.Cart = Cart;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, mongoose_2.Prop)({
|
|
20
|
+
type: mongoose_1.default.Schema.Types.ObjectId,
|
|
21
|
+
ref: 'User',
|
|
22
|
+
required: true
|
|
23
|
+
}),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Cart.prototype, "userId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, mongoose_2.Prop)([{
|
|
28
|
+
pharmacyId: { type: mongoose_1.default.Schema.Types.ObjectId, ref: 'Business', required: true },
|
|
29
|
+
items: [{
|
|
30
|
+
inventoryId: { type: mongoose_1.default.Schema.Types.ObjectId, ref: 'PharmacyInventory', required: true },
|
|
31
|
+
quantity: { type: Number, required: true, min: 1 },
|
|
32
|
+
price: { type: Number, required: true },
|
|
33
|
+
requiresPrescription: { type: Boolean, default: false },
|
|
34
|
+
}],
|
|
35
|
+
deliveryFee: { type: Number, default: 0 }
|
|
36
|
+
}]),
|
|
37
|
+
__metadata("design:type", Array)
|
|
38
|
+
], Cart.prototype, "vendors", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, mongoose_2.Prop)({ default: Date.now, expires: '7d' }),
|
|
41
|
+
__metadata("design:type", Date)
|
|
42
|
+
], Cart.prototype, "lastModified", void 0);
|
|
43
|
+
exports.Cart = Cart = __decorate([
|
|
44
|
+
(0, mongoose_2.Schema)({
|
|
45
|
+
timestamps: true
|
|
46
|
+
})
|
|
47
|
+
], Cart);
|
|
48
|
+
exports.CartSchema = mongoose_2.SchemaFactory.createForClass(Cart);
|
|
49
|
+
//# sourceMappingURL=cart.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cart.model.js","sourceRoot":"","sources":["../../src/models/cart.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAA8C;AAC9C,+CAA+D;AAKxD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,mBAAQ;CAsBjC,CAAA;AAtBY,oBAAI;AAMf;IALC,IAAA,eAAI,EAAC;QACJ,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ;QACpC,GAAG,EAAE,MAAM;QACX,QAAQ,EAAE,IAAI;KACf,CAAC;;oCACa;AAYf;IAVC,IAAA,eAAI,EAAC,CAAC;YACL,UAAU,EAAE,EAAE,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE;YACrF,KAAK,EAAE,CAAC;oBACN,WAAW,EAAE,EAAE,IAAI,EAAE,kBAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,mBAAmB,EAAE,QAAQ,EAAE,IAAI,EAAE;oBAC/F,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE;oBAClD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;oBACvC,oBAAoB,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;iBACxD,CAAC;YACF,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE;SAC1C,CAAC,CAAC;;qCACY;AAGf;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8BAC7B,IAAI;0CAAC;eArBR,IAAI;IAHhB,IAAA,iBAAM,EAAC;QACN,UAAU,EAAE,IAAI;KACjB,CAAC;GACW,IAAI,CAsBhB;AAEY,QAAA,UAAU,GAAG,wBAAa,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
|
+
export declare class Country extends Document {
|
|
3
|
+
name: string;
|
|
4
|
+
code: string;
|
|
5
|
+
currency: string;
|
|
6
|
+
enable: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const CountrySchema: import("mongoose").Schema<Country, import("mongoose").Model<Country, any, any, any, (Document<unknown, any, Country, any, import("mongoose").DefaultSchemaOptions> & Country & Required<{
|
|
9
|
+
_id: import("mongoose").Types.ObjectId;
|
|
10
|
+
}> & {
|
|
11
|
+
__v: number;
|
|
12
|
+
} & {
|
|
13
|
+
id: string;
|
|
14
|
+
}) | (Document<unknown, any, Country, any, import("mongoose").DefaultSchemaOptions> & Country & Required<{
|
|
15
|
+
_id: import("mongoose").Types.ObjectId;
|
|
16
|
+
}> & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}), any, Country>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Country, Document<unknown, {}, Country, {
|
|
19
|
+
id: string;
|
|
20
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Country & Required<{
|
|
21
|
+
_id: import("mongoose").Types.ObjectId;
|
|
22
|
+
}> & {
|
|
23
|
+
__v: number;
|
|
24
|
+
}, "id"> & {
|
|
25
|
+
id: string;
|
|
26
|
+
}, {
|
|
27
|
+
name?: import("mongoose").SchemaDefinitionProperty<string, Country, Document<unknown, {}, Country, {
|
|
28
|
+
id: string;
|
|
29
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Country & Required<{
|
|
30
|
+
_id: import("mongoose").Types.ObjectId;
|
|
31
|
+
}> & {
|
|
32
|
+
__v: number;
|
|
33
|
+
}, "id"> & {
|
|
34
|
+
id: string;
|
|
35
|
+
}>;
|
|
36
|
+
_id?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, Country, Document<unknown, {}, Country, {
|
|
37
|
+
id: string;
|
|
38
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Country & Required<{
|
|
39
|
+
_id: import("mongoose").Types.ObjectId;
|
|
40
|
+
}> & {
|
|
41
|
+
__v: number;
|
|
42
|
+
}, "id"> & {
|
|
43
|
+
id: string;
|
|
44
|
+
}>;
|
|
45
|
+
code?: import("mongoose").SchemaDefinitionProperty<string, Country, Document<unknown, {}, Country, {
|
|
46
|
+
id: string;
|
|
47
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Country & Required<{
|
|
48
|
+
_id: import("mongoose").Types.ObjectId;
|
|
49
|
+
}> & {
|
|
50
|
+
__v: number;
|
|
51
|
+
}, "id"> & {
|
|
52
|
+
id: string;
|
|
53
|
+
}>;
|
|
54
|
+
currency?: import("mongoose").SchemaDefinitionProperty<string, Country, Document<unknown, {}, Country, {
|
|
55
|
+
id: string;
|
|
56
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Country & Required<{
|
|
57
|
+
_id: import("mongoose").Types.ObjectId;
|
|
58
|
+
}> & {
|
|
59
|
+
__v: number;
|
|
60
|
+
}, "id"> & {
|
|
61
|
+
id: string;
|
|
62
|
+
}>;
|
|
63
|
+
enable?: import("mongoose").SchemaDefinitionProperty<boolean, Country, Document<unknown, {}, Country, {
|
|
64
|
+
id: string;
|
|
65
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Country & Required<{
|
|
66
|
+
_id: import("mongoose").Types.ObjectId;
|
|
67
|
+
}> & {
|
|
68
|
+
__v: number;
|
|
69
|
+
}, "id"> & {
|
|
70
|
+
id: string;
|
|
71
|
+
}>;
|
|
72
|
+
}, Country>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CountrySchema = exports.Country = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
let Country = class Country extends mongoose_2.Document {
|
|
16
|
+
};
|
|
17
|
+
exports.Country = Country;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], Country.prototype, "name", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], Country.prototype, "code", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, mongoose_1.Prop)({ required: true, default: "USD" }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Country.prototype, "currency", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, mongoose_1.Prop)({ default: true }),
|
|
32
|
+
__metadata("design:type", Boolean)
|
|
33
|
+
], Country.prototype, "enable", void 0);
|
|
34
|
+
exports.Country = Country = __decorate([
|
|
35
|
+
(0, mongoose_1.Schema)()
|
|
36
|
+
], Country);
|
|
37
|
+
exports.CountrySchema = mongoose_1.SchemaFactory.createForClass(Country);
|
|
38
|
+
exports.CountrySchema.index({ name: 1, code: 1 });
|
|
39
|
+
//# sourceMappingURL=country.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"country.schema.js","sourceRoot":"","sources":["../../src/models/country.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA6D;AAC7D,uCAAoC;AAG7B,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,mBAAQ;CAYpC,CAAA;AAZY,0BAAO;AAElB;IADC,IAAA,eAAI,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;qCACV;AAGb;IADC,IAAA,eAAI,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;;qCACV;AAGb;IADC,IAAA,eAAI,EAAC,EAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC;;yCACtB;AAGjB;IADC,IAAA,eAAI,EAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC;;uCACN;kBAXL,OAAO;IADnB,IAAA,iBAAM,GAAE;GACI,OAAO,CAYnB;AAEY,QAAA,aAAa,GAAG,wBAAa,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAEnE,qBAAa,CAAC,KAAK,CAAC,EAAC,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
export declare class Currency extends Document {
|
|
3
|
+
currencyCode: string;
|
|
4
|
+
value: number;
|
|
5
|
+
baseCurrency: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const CurrencySchema: import("mongoose").Schema<Currency, import("mongoose").Model<Currency, any, any, any, (Document<unknown, any, Currency, any, import("mongoose").DefaultSchemaOptions> & Currency & Required<{
|
|
8
|
+
_id: import("mongoose").Types.ObjectId;
|
|
9
|
+
}> & {
|
|
10
|
+
__v: number;
|
|
11
|
+
} & {
|
|
12
|
+
id: string;
|
|
13
|
+
}) | (Document<unknown, any, Currency, any, import("mongoose").DefaultSchemaOptions> & Currency & Required<{
|
|
14
|
+
_id: import("mongoose").Types.ObjectId;
|
|
15
|
+
}> & {
|
|
16
|
+
__v: number;
|
|
17
|
+
}), any, Currency>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Currency, Document<unknown, {}, Currency, {
|
|
18
|
+
id: string;
|
|
19
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Currency & Required<{
|
|
20
|
+
_id: import("mongoose").Types.ObjectId;
|
|
21
|
+
}> & {
|
|
22
|
+
__v: number;
|
|
23
|
+
}, "id"> & {
|
|
24
|
+
id: string;
|
|
25
|
+
}, {
|
|
26
|
+
_id?: import("mongoose").SchemaDefinitionProperty<import("mongoose").Types.ObjectId, Currency, Document<unknown, {}, Currency, {
|
|
27
|
+
id: string;
|
|
28
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Currency & Required<{
|
|
29
|
+
_id: import("mongoose").Types.ObjectId;
|
|
30
|
+
}> & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}, "id"> & {
|
|
33
|
+
id: string;
|
|
34
|
+
}>;
|
|
35
|
+
currencyCode?: import("mongoose").SchemaDefinitionProperty<string, Currency, Document<unknown, {}, Currency, {
|
|
36
|
+
id: string;
|
|
37
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Currency & Required<{
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
}> & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}, "id"> & {
|
|
42
|
+
id: string;
|
|
43
|
+
}>;
|
|
44
|
+
value?: import("mongoose").SchemaDefinitionProperty<number, Currency, Document<unknown, {}, Currency, {
|
|
45
|
+
id: string;
|
|
46
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Currency & Required<{
|
|
47
|
+
_id: import("mongoose").Types.ObjectId;
|
|
48
|
+
}> & {
|
|
49
|
+
__v: number;
|
|
50
|
+
}, "id"> & {
|
|
51
|
+
id: string;
|
|
52
|
+
}>;
|
|
53
|
+
baseCurrency?: import("mongoose").SchemaDefinitionProperty<string, Currency, Document<unknown, {}, Currency, {
|
|
54
|
+
id: string;
|
|
55
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<Currency & Required<{
|
|
56
|
+
_id: import("mongoose").Types.ObjectId;
|
|
57
|
+
}> & {
|
|
58
|
+
__v: number;
|
|
59
|
+
}, "id"> & {
|
|
60
|
+
id: string;
|
|
61
|
+
}>;
|
|
62
|
+
}, Currency>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.CurrencySchema = exports.Currency = void 0;
|
|
13
|
+
const mongoose_1 = require("mongoose");
|
|
14
|
+
const mongoose_2 = require("@nestjs/mongoose");
|
|
15
|
+
let Currency = class Currency extends mongoose_1.Document {
|
|
16
|
+
};
|
|
17
|
+
exports.Currency = Currency;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, mongoose_2.Prop)({ required: true }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], Currency.prototype, "currencyCode", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, mongoose_2.Prop)({ required: true }),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], Currency.prototype, "value", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, mongoose_2.Prop)({ required: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Currency.prototype, "baseCurrency", void 0);
|
|
30
|
+
exports.Currency = Currency = __decorate([
|
|
31
|
+
(0, mongoose_2.Schema)({ timestamps: true })
|
|
32
|
+
], Currency);
|
|
33
|
+
exports.CurrencySchema = mongoose_2.SchemaFactory.createForClass(Currency);
|
|
34
|
+
//# sourceMappingURL=currency.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currency.schema.js","sourceRoot":"","sources":["../../src/models/currency.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,uCAAkC;AAClC,+CAA6D;AAGtD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,mBAAQ;CASrC,CAAA;AATY,4BAAQ;AAEnB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACJ;AAGrB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACX;AAGd;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACJ;mBARV,QAAQ;IADpB,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;GAChB,QAAQ,CASpB;AAEY,QAAA,cAAc,GAAG,wBAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC"}
|