@whatsveg/wv-data-model 1.0.0 → 1.0.2
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 +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/models/Area.d.ts +6 -0
- package/dist/models/Area.d.ts.map +1 -0
- package/dist/models/Area.js +10 -0
- package/dist/models/Area.js.map +1 -0
- package/dist/models/Category.d.ts +6 -0
- package/dist/models/Category.d.ts.map +1 -0
- package/dist/models/Category.js +10 -0
- package/dist/models/Category.js.map +1 -0
- package/dist/models/City.d.ts +6 -0
- package/dist/models/City.d.ts.map +1 -0
- package/dist/models/City.js +10 -0
- package/dist/models/City.js.map +1 -0
- package/dist/models/Pincode.d.ts +6 -0
- package/dist/models/Pincode.d.ts.map +1 -0
- package/dist/models/Pincode.js +10 -0
- package/dist/models/Pincode.js.map +1 -0
- package/dist/models/Product.d.ts +6 -0
- package/dist/models/Product.d.ts.map +1 -0
- package/dist/models/Product.js +10 -0
- package/dist/models/Product.js.map +1 -0
- package/dist/models/Store.d.ts +6 -0
- package/dist/models/Store.d.ts.map +1 -0
- package/dist/models/Store.js +10 -0
- package/dist/models/Store.js.map +1 -0
- package/dist/models/Unit.d.ts +6 -0
- package/dist/models/Unit.d.ts.map +1 -0
- package/dist/models/Unit.js +10 -0
- package/dist/models/Unit.js.map +1 -0
- package/dist/models/User.d.ts +6 -0
- package/dist/models/User.d.ts.map +1 -0
- package/dist/models/User.js +10 -0
- package/dist/models/User.js.map +1 -0
- package/dist/models/index.d.ts +18 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +38 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/mappings/CategoryArea.d.ts +4 -0
- package/dist/models/mappings/CategoryArea.d.ts.map +1 -0
- package/dist/models/mappings/CategoryArea.js +11 -0
- package/dist/models/mappings/CategoryArea.js.map +1 -0
- package/dist/models/mappings/ProductArea.d.ts +6 -0
- package/dist/models/mappings/ProductArea.d.ts.map +1 -0
- package/dist/models/mappings/ProductArea.js +11 -0
- package/dist/models/mappings/ProductArea.js.map +1 -0
- package/dist/models/mappings/StoreArea.d.ts +6 -0
- package/dist/models/mappings/StoreArea.d.ts.map +1 -0
- package/dist/models/mappings/StoreArea.js +11 -0
- package/dist/models/mappings/StoreArea.js.map +1 -0
- package/dist/models/mappings/index.d.ts +4 -0
- package/dist/models/mappings/index.d.ts.map +1 -0
- package/dist/models/mappings/index.js +13 -0
- package/dist/models/mappings/index.js.map +1 -0
- package/dist/schemas/AreaSchema.d.ts +95 -0
- package/dist/schemas/AreaSchema.d.ts.map +1 -0
- package/dist/schemas/AreaSchema.js +85 -0
- package/dist/schemas/AreaSchema.js.map +1 -0
- package/dist/schemas/CategoryAreaSchema.d.ts +86 -0
- package/dist/schemas/CategoryAreaSchema.d.ts.map +1 -0
- package/dist/schemas/CategoryAreaSchema.js +45 -0
- package/dist/schemas/CategoryAreaSchema.js.map +1 -0
- package/dist/schemas/CategorySchema.d.ts +125 -0
- package/dist/schemas/CategorySchema.d.ts.map +1 -0
- package/dist/schemas/CategorySchema.js +80 -0
- package/dist/schemas/CategorySchema.js.map +1 -0
- package/dist/schemas/CitySchema.d.ts +85 -0
- package/dist/schemas/CitySchema.d.ts.map +1 -0
- package/dist/schemas/CitySchema.js +35 -0
- package/dist/schemas/CitySchema.js.map +1 -0
- package/dist/schemas/PincodeSchema.d.ts +65 -0
- package/dist/schemas/PincodeSchema.d.ts.map +1 -0
- package/dist/schemas/PincodeSchema.js +26 -0
- package/dist/schemas/PincodeSchema.js.map +1 -0
- package/dist/schemas/ProductAreaSchema.d.ts +95 -0
- package/dist/schemas/ProductAreaSchema.d.ts.map +1 -0
- package/dist/schemas/ProductAreaSchema.js +35 -0
- package/dist/schemas/ProductAreaSchema.js.map +1 -0
- package/dist/schemas/ProductSchema.d.ts +145 -0
- package/dist/schemas/ProductSchema.d.ts.map +1 -0
- package/dist/schemas/ProductSchema.js +108 -0
- package/dist/schemas/ProductSchema.js.map +1 -0
- package/dist/schemas/StoreAreaSchema.d.ts +75 -0
- package/dist/schemas/StoreAreaSchema.d.ts.map +1 -0
- package/dist/schemas/StoreAreaSchema.js +25 -0
- package/dist/schemas/StoreAreaSchema.js.map +1 -0
- package/dist/schemas/StoreSchema.d.ts +145 -0
- package/dist/schemas/StoreSchema.d.ts.map +1 -0
- package/dist/schemas/StoreSchema.js +65 -0
- package/dist/schemas/StoreSchema.js.map +1 -0
- package/dist/schemas/UnitSchema.d.ts +81 -0
- package/dist/schemas/UnitSchema.d.ts.map +1 -0
- package/dist/schemas/UnitSchema.js +69 -0
- package/dist/schemas/UnitSchema.js.map +1 -0
- package/dist/schemas/UserSchema.d.ts +196 -0
- package/dist/schemas/UserSchema.d.ts.map +1 -0
- package/dist/schemas/UserSchema.js +81 -0
- package/dist/schemas/UserSchema.js.map +1 -0
- package/dist/schemas/index.d.ts +23 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +29 -0
- package/dist/schemas/index.js.map +1 -0
- package/package.json +33 -11
- package/src/index.js +0 -1
- package/src/models/User.js +0 -6
- package/src/models/index.js +0 -3
- package/src/schemas/UserSchema.js +0 -32
- package/src/schemas/index.js +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./models"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../src/models/Area.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,WAA4F,CAAC;AAEvG,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const AreaSchema_1 = __importDefault(require("../schemas/AreaSchema"));
|
|
8
|
+
const Area = mongoose_1.default.models.Area || mongoose_1.default.model("Area", AreaSchema_1.default);
|
|
9
|
+
exports.default = Area;
|
|
10
|
+
//# sourceMappingURL=Area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Area.js","sourceRoot":"","sources":["../../src/models/Area.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,uEAAmE;AAInE,MAAM,IAAI,GAAI,kBAAQ,CAAC,MAAM,CAAC,IAAkB,IAAI,kBAAQ,CAAC,KAAK,CAAiB,MAAM,EAAE,oBAAU,CAAC,CAAC;AAEvG,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Category.d.ts","sourceRoot":"","sources":["../../src/models/Category.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAuB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAEtD,QAAA,MAAM,QAAQ,eAAgH,CAAC;AAE/H,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const CategorySchema_1 = __importDefault(require("../schemas/CategorySchema"));
|
|
8
|
+
const Category = mongoose_1.default.models.Category || mongoose_1.default.model("Category", CategorySchema_1.default);
|
|
9
|
+
exports.default = Category;
|
|
10
|
+
//# sourceMappingURL=Category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Category.js","sourceRoot":"","sources":["../../src/models/Category.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,+EAA+E;AAI/E,MAAM,QAAQ,GAAI,kBAAQ,CAAC,MAAM,CAAC,QAA0B,IAAI,kBAAQ,CAAC,KAAK,CAAqB,UAAU,EAAE,wBAAc,CAAC,CAAC;AAE/H,kBAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"City.d.ts","sourceRoot":"","sources":["../../src/models/City.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,WAA4F,CAAC;AAEvG,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const CitySchema_1 = __importDefault(require("../schemas/CitySchema"));
|
|
8
|
+
const City = mongoose_1.default.models.City || mongoose_1.default.model("City", CitySchema_1.default);
|
|
9
|
+
exports.default = City;
|
|
10
|
+
//# sourceMappingURL=City.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"City.js","sourceRoot":"","sources":["../../src/models/City.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,uEAAmE;AAInE,MAAM,IAAI,GAAI,kBAAQ,CAAC,MAAM,CAAC,IAAkB,IAAI,kBAAQ,CAAC,KAAK,CAAiB,MAAM,EAAE,oBAAU,CAAC,CAAC;AAEvG,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pincode.d.ts","sourceRoot":"","sources":["../../src/models/Pincode.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE5E,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAEpD,QAAA,MAAM,OAAO,cAA2G,CAAC;AAEzH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const PincodeSchema_1 = __importDefault(require("../schemas/PincodeSchema"));
|
|
8
|
+
const Pincode = mongoose_1.default.models.Pincode || mongoose_1.default.model("Pincode", PincodeSchema_1.default);
|
|
9
|
+
exports.default = Pincode;
|
|
10
|
+
//# sourceMappingURL=Pincode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pincode.js","sourceRoot":"","sources":["../../src/models/Pincode.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,6EAA4E;AAI5E,MAAM,OAAO,GAAI,kBAAQ,CAAC,MAAM,CAAC,OAAwB,IAAI,kBAAQ,CAAC,KAAK,CAAoB,SAAS,EAAE,uBAAa,CAAC,CAAC;AAEzH,kBAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Product.d.ts","sourceRoot":"","sources":["../../src/models/Product.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAsB,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE5E,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAEpD,QAAA,MAAM,OAAO,cAA2G,CAAC;AAEzH,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const ProductSchema_1 = __importDefault(require("../schemas/ProductSchema"));
|
|
8
|
+
const Product = mongoose_1.default.models.Product || mongoose_1.default.model("Product", ProductSchema_1.default);
|
|
9
|
+
exports.default = Product;
|
|
10
|
+
//# sourceMappingURL=Product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Product.js","sourceRoot":"","sources":["../../src/models/Product.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,6EAA4E;AAI5E,MAAM,OAAO,GAAI,kBAAQ,CAAC,MAAM,CAAC,OAAwB,IAAI,kBAAQ,CAAC,KAAK,CAAoB,SAAS,EAAE,uBAAa,CAAC,CAAC;AAEzH,kBAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Store.d.ts","sourceRoot":"","sources":["../../src/models/Store.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAoB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAEhD,QAAA,MAAM,KAAK,YAAiG,CAAC;AAE7G,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const StoreSchema_1 = __importDefault(require("../schemas/StoreSchema"));
|
|
8
|
+
const Store = mongoose_1.default.models.Store || mongoose_1.default.model("Store", StoreSchema_1.default);
|
|
9
|
+
exports.default = Store;
|
|
10
|
+
//# sourceMappingURL=Store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Store.js","sourceRoot":"","sources":["../../src/models/Store.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,yEAAsE;AAItE,MAAM,KAAK,GAAI,kBAAQ,CAAC,MAAM,CAAC,KAAoB,IAAI,kBAAQ,CAAC,KAAK,CAAkB,OAAO,EAAE,qBAAW,CAAC,CAAC;AAE7G,kBAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unit.d.ts","sourceRoot":"","sources":["../../src/models/Unit.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,WAA4F,CAAC;AAEvG,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const UnitSchema_1 = __importDefault(require("../schemas/UnitSchema"));
|
|
8
|
+
const Unit = mongoose_1.default.models.Unit || mongoose_1.default.model("Unit", UnitSchema_1.default);
|
|
9
|
+
exports.default = Unit;
|
|
10
|
+
//# sourceMappingURL=Unit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Unit.js","sourceRoot":"","sources":["../../src/models/Unit.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,uEAAmE;AAInE,MAAM,IAAI,GAAI,kBAAQ,CAAC,MAAM,CAAC,IAAkB,IAAI,kBAAQ,CAAC,KAAK,CAAiB,MAAM,EAAE,oBAAU,CAAC,CAAC;AAEvG,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEnE,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AAE9C,QAAA,MAAM,IAAI,WAA4F,CAAC;AAEvG,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const UserSchema_1 = __importDefault(require("../schemas/UserSchema"));
|
|
8
|
+
const User = mongoose_1.default.models.User || mongoose_1.default.model("User", UserSchema_1.default);
|
|
9
|
+
exports.default = User;
|
|
10
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../src/models/User.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,uEAAmE;AAInE,MAAM,IAAI,GAAI,kBAAQ,CAAC,MAAM,CAAC,IAAkB,IAAI,kBAAQ,CAAC,KAAK,CAAiB,MAAM,EAAE,oBAAU,CAAC,CAAC;AAEvG,kBAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { default as Area } from "./Area";
|
|
2
|
+
export type { AreaModel } from "./Area";
|
|
3
|
+
export { default as Category } from "./Category";
|
|
4
|
+
export type { CategoryModel } from "./Category";
|
|
5
|
+
export { default as City } from "./City";
|
|
6
|
+
export type { CityModel } from "./City";
|
|
7
|
+
export { default as Pincode } from "./Pincode";
|
|
8
|
+
export type { PincodeModel } from "./Pincode";
|
|
9
|
+
export { default as Product } from "./Product";
|
|
10
|
+
export type { ProductModel } from "./Product";
|
|
11
|
+
export { default as Store } from "./Store";
|
|
12
|
+
export type { StoreModel } from "./Store";
|
|
13
|
+
export { default as Unit } from "./Unit";
|
|
14
|
+
export type { UnitModel } from "./Unit";
|
|
15
|
+
export { default as User } from "./User";
|
|
16
|
+
export type { UserModel } from "./User";
|
|
17
|
+
export * from "./mappings";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.User = exports.Unit = exports.Store = exports.Product = exports.Pincode = exports.City = exports.Category = exports.Area = void 0;
|
|
21
|
+
var Area_1 = require("./Area");
|
|
22
|
+
Object.defineProperty(exports, "Area", { enumerable: true, get: function () { return __importDefault(Area_1).default; } });
|
|
23
|
+
var Category_1 = require("./Category");
|
|
24
|
+
Object.defineProperty(exports, "Category", { enumerable: true, get: function () { return __importDefault(Category_1).default; } });
|
|
25
|
+
var City_1 = require("./City");
|
|
26
|
+
Object.defineProperty(exports, "City", { enumerable: true, get: function () { return __importDefault(City_1).default; } });
|
|
27
|
+
var Pincode_1 = require("./Pincode");
|
|
28
|
+
Object.defineProperty(exports, "Pincode", { enumerable: true, get: function () { return __importDefault(Pincode_1).default; } });
|
|
29
|
+
var Product_1 = require("./Product");
|
|
30
|
+
Object.defineProperty(exports, "Product", { enumerable: true, get: function () { return __importDefault(Product_1).default; } });
|
|
31
|
+
var Store_1 = require("./Store");
|
|
32
|
+
Object.defineProperty(exports, "Store", { enumerable: true, get: function () { return __importDefault(Store_1).default; } });
|
|
33
|
+
var Unit_1 = require("./Unit");
|
|
34
|
+
Object.defineProperty(exports, "Unit", { enumerable: true, get: function () { return __importDefault(Unit_1).default; } });
|
|
35
|
+
var User_1 = require("./User");
|
|
36
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(User_1).default; } });
|
|
37
|
+
__exportStar(require("./mappings"), exports);
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,+BAAyC;AAAhC,6GAAA,OAAO,OAAQ;AAGxB,uCAAiD;AAAxC,qHAAA,OAAO,OAAY;AAG5B,+BAAyC;AAAhC,6GAAA,OAAO,OAAQ;AAGxB,qCAA+C;AAAtC,mHAAA,OAAO,OAAW;AAG3B,qCAA+C;AAAtC,mHAAA,OAAO,OAAW;AAG3B,iCAA2C;AAAlC,+GAAA,OAAO,OAAS;AAGzB,+BAAyC;AAAhC,6GAAA,OAAO,OAAQ;AAGxB,+BAAyC;AAAhC,6GAAA,OAAO,OAAQ;AAGxB,6CAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryArea.d.ts","sourceRoot":"","sources":["../../../src/models/mappings/CategoryArea.ts"],"names":[],"mappings":"AAEA,OAA2B,EAA0B,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAEjH,QAAA,MAAM,YAAY,mBAE6E,CAAC;AAEhG,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const CategoryAreaSchema_1 = __importDefault(require("../../schemas/CategoryAreaSchema"));
|
|
8
|
+
const CategoryArea = mongoose_1.default.models.CategoryArea ||
|
|
9
|
+
mongoose_1.default.model("CategoryArea", CategoryAreaSchema_1.default);
|
|
10
|
+
exports.default = CategoryArea;
|
|
11
|
+
//# sourceMappingURL=CategoryArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CategoryArea.js","sourceRoot":"","sources":["../../../src/models/mappings/CategoryArea.ts"],"names":[],"mappings":";;;;;AAAA,wDAAgC;AAEhC,0FAAiH;AAEjH,MAAM,YAAY,GACf,kBAAQ,CAAC,MAAM,CAAC,YAAkC;IACnD,kBAAQ,CAAC,KAAK,CAA4C,cAAc,EAAE,4BAAkB,CAAC,CAAC;AAEhG,kBAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Model } from "mongoose";
|
|
2
|
+
import { ProductAreaAttributes } from "../../schemas/ProductAreaSchema";
|
|
3
|
+
export type ProductAreaModel = Model<ProductAreaAttributes>;
|
|
4
|
+
declare const ProductArea: ProductAreaModel;
|
|
5
|
+
export default ProductArea;
|
|
6
|
+
//# sourceMappingURL=ProductArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductArea.d.ts","sourceRoot":"","sources":["../../../src/models/mappings/ProductArea.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAA0B,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE3F,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAE5D,QAAA,MAAM,WAAW,kBAEwD,CAAC;AAE1E,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const ProductAreaSchema_1 = __importDefault(require("../../schemas/ProductAreaSchema"));
|
|
8
|
+
const ProductArea = mongoose_1.default.models.ProductArea ||
|
|
9
|
+
mongoose_1.default.model("ProductArea", ProductAreaSchema_1.default);
|
|
10
|
+
exports.default = ProductArea;
|
|
11
|
+
//# sourceMappingURL=ProductArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductArea.js","sourceRoot":"","sources":["../../../src/models/mappings/ProductArea.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,wFAA2F;AAI3F,MAAM,WAAW,GACd,kBAAQ,CAAC,MAAM,CAAC,WAAgC;IACjD,kBAAQ,CAAC,KAAK,CAAwB,aAAa,EAAE,2BAAiB,CAAC,CAAC;AAE1E,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Model } from "mongoose";
|
|
2
|
+
import { StoreAreaAttributes } from "../../schemas/StoreAreaSchema";
|
|
3
|
+
export type StoreAreaModel = Model<StoreAreaAttributes>;
|
|
4
|
+
declare const StoreArea: StoreAreaModel;
|
|
5
|
+
export default StoreArea;
|
|
6
|
+
//# sourceMappingURL=StoreArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoreArea.d.ts","sourceRoot":"","sources":["../../../src/models/mappings/StoreArea.ts"],"names":[],"mappings":"AAAA,OAAiB,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAwB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAErF,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,mBAAmB,CAAC,CAAC;AAExD,QAAA,MAAM,SAAS,gBAEoD,CAAC;AAEpE,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const mongoose_1 = __importDefault(require("mongoose"));
|
|
7
|
+
const StoreAreaSchema_1 = __importDefault(require("../../schemas/StoreAreaSchema"));
|
|
8
|
+
const StoreArea = mongoose_1.default.models.StoreArea ||
|
|
9
|
+
mongoose_1.default.model("StoreArea", StoreAreaSchema_1.default);
|
|
10
|
+
exports.default = StoreArea;
|
|
11
|
+
//# sourceMappingURL=StoreArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StoreArea.js","sourceRoot":"","sources":["../../../src/models/mappings/StoreArea.ts"],"names":[],"mappings":";;;;;AAAA,wDAA2C;AAE3C,oFAAqF;AAIrF,MAAM,SAAS,GACZ,kBAAQ,CAAC,MAAM,CAAC,SAA4B;IAC7C,kBAAQ,CAAC,KAAK,CAAsB,WAAW,EAAE,yBAAe,CAAC,CAAC;AAEpE,kBAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/mappings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.StoreArea = exports.ProductArea = exports.CategoryArea = void 0;
|
|
7
|
+
var CategoryArea_1 = require("./CategoryArea");
|
|
8
|
+
Object.defineProperty(exports, "CategoryArea", { enumerable: true, get: function () { return __importDefault(CategoryArea_1).default; } });
|
|
9
|
+
var ProductArea_1 = require("./ProductArea");
|
|
10
|
+
Object.defineProperty(exports, "ProductArea", { enumerable: true, get: function () { return __importDefault(ProductArea_1).default; } });
|
|
11
|
+
var StoreArea_1 = require("./StoreArea");
|
|
12
|
+
Object.defineProperty(exports, "StoreArea", { enumerable: true, get: function () { return __importDefault(StoreArea_1).default; } });
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/mappings/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,6CAAuD;AAA9C,2HAAA,OAAO,OAAe;AAC/B,yCAAmD;AAA1C,uHAAA,OAAO,OAAa"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Schema, Types } from "mongoose";
|
|
2
|
+
export interface AreaAttributes {
|
|
3
|
+
name: string;
|
|
4
|
+
name_local_language?: string;
|
|
5
|
+
name_hindi: string;
|
|
6
|
+
city: Types.ObjectId;
|
|
7
|
+
pincode: Types.ObjectId;
|
|
8
|
+
status?: boolean;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
}
|
|
12
|
+
declare const AreaSchema: Schema<AreaAttributes, import("mongoose").Model<AreaAttributes, any, any, any, any, any, AreaAttributes>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
13
|
+
id: string;
|
|
14
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
15
|
+
_id: Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}, "id"> & {
|
|
19
|
+
id: string;
|
|
20
|
+
}, {
|
|
21
|
+
name?: import("mongoose").SchemaDefinitionProperty<string, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
22
|
+
id: string;
|
|
23
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
24
|
+
_id: Types.ObjectId;
|
|
25
|
+
} & {
|
|
26
|
+
__v: number;
|
|
27
|
+
}, "id"> & {
|
|
28
|
+
id: string;
|
|
29
|
+
}> | undefined;
|
|
30
|
+
name_local_language?: import("mongoose").SchemaDefinitionProperty<string | undefined, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
31
|
+
id: string;
|
|
32
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
33
|
+
_id: Types.ObjectId;
|
|
34
|
+
} & {
|
|
35
|
+
__v: number;
|
|
36
|
+
}, "id"> & {
|
|
37
|
+
id: string;
|
|
38
|
+
}> | undefined;
|
|
39
|
+
name_hindi?: import("mongoose").SchemaDefinitionProperty<string, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
40
|
+
id: string;
|
|
41
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
42
|
+
_id: Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}, "id"> & {
|
|
46
|
+
id: string;
|
|
47
|
+
}> | undefined;
|
|
48
|
+
city?: import("mongoose").SchemaDefinitionProperty<Types.ObjectId, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
49
|
+
id: string;
|
|
50
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
51
|
+
_id: Types.ObjectId;
|
|
52
|
+
} & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}, "id"> & {
|
|
55
|
+
id: string;
|
|
56
|
+
}> | undefined;
|
|
57
|
+
pincode?: import("mongoose").SchemaDefinitionProperty<Types.ObjectId, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
58
|
+
id: string;
|
|
59
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
60
|
+
_id: Types.ObjectId;
|
|
61
|
+
} & {
|
|
62
|
+
__v: number;
|
|
63
|
+
}, "id"> & {
|
|
64
|
+
id: string;
|
|
65
|
+
}> | undefined;
|
|
66
|
+
status?: import("mongoose").SchemaDefinitionProperty<boolean | undefined, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
67
|
+
id: string;
|
|
68
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
69
|
+
_id: Types.ObjectId;
|
|
70
|
+
} & {
|
|
71
|
+
__v: number;
|
|
72
|
+
}, "id"> & {
|
|
73
|
+
id: string;
|
|
74
|
+
}> | undefined;
|
|
75
|
+
createdAt?: import("mongoose").SchemaDefinitionProperty<Date | undefined, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
76
|
+
id: string;
|
|
77
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
78
|
+
_id: Types.ObjectId;
|
|
79
|
+
} & {
|
|
80
|
+
__v: number;
|
|
81
|
+
}, "id"> & {
|
|
82
|
+
id: string;
|
|
83
|
+
}> | undefined;
|
|
84
|
+
updatedAt?: import("mongoose").SchemaDefinitionProperty<Date | undefined, AreaAttributes, import("mongoose").Document<unknown, {}, AreaAttributes, {
|
|
85
|
+
id: string;
|
|
86
|
+
}, import("mongoose").DefaultSchemaOptions> & Omit<AreaAttributes & {
|
|
87
|
+
_id: Types.ObjectId;
|
|
88
|
+
} & {
|
|
89
|
+
__v: number;
|
|
90
|
+
}, "id"> & {
|
|
91
|
+
id: string;
|
|
92
|
+
}> | undefined;
|
|
93
|
+
}, AreaAttributes>;
|
|
94
|
+
export default AreaSchema;
|
|
95
|
+
//# sourceMappingURL=AreaSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AreaSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/AreaSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC;IACrB,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoCf,CAAC;AAyDF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const AreaSchema = new mongoose_1.Schema({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
maxlength: 250
|
|
9
|
+
},
|
|
10
|
+
name_local_language: {
|
|
11
|
+
type: String,
|
|
12
|
+
maxlength: 250
|
|
13
|
+
},
|
|
14
|
+
name_hindi: {
|
|
15
|
+
type: String,
|
|
16
|
+
required: true,
|
|
17
|
+
maxlength: 250
|
|
18
|
+
},
|
|
19
|
+
city: {
|
|
20
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
21
|
+
ref: "City",
|
|
22
|
+
required: true
|
|
23
|
+
},
|
|
24
|
+
pincode: {
|
|
25
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
26
|
+
ref: "Pincode",
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
status: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
timestamps: true,
|
|
35
|
+
toJSON: { virtuals: true },
|
|
36
|
+
toObject: { virtuals: true }
|
|
37
|
+
});
|
|
38
|
+
AreaSchema.post("save", async function (doc) {
|
|
39
|
+
const [CategoryArea, Category, ProductArea, Product] = await Promise.all([
|
|
40
|
+
import("../models/mappings/CategoryArea.js").then((module) => module.default),
|
|
41
|
+
import("../models/Category.js").then((module) => module.default),
|
|
42
|
+
import("../models/mappings/ProductArea.js").then((module) => module.default),
|
|
43
|
+
import("../models/Product.js").then((module) => module.default)
|
|
44
|
+
]);
|
|
45
|
+
const globalCategories = await Category.find({ is_global: true, status: true });
|
|
46
|
+
const existingCategoryMappings = await CategoryArea.find({
|
|
47
|
+
category: { $in: globalCategories.map((category) => category._id) },
|
|
48
|
+
area: doc._id
|
|
49
|
+
});
|
|
50
|
+
if (existingCategoryMappings.length === 0) {
|
|
51
|
+
const categoryAreaMappings = globalCategories.map((category) => ({
|
|
52
|
+
category: category._id,
|
|
53
|
+
area: doc._id,
|
|
54
|
+
name_local_language: category.name_hindi,
|
|
55
|
+
status: true
|
|
56
|
+
}));
|
|
57
|
+
await CategoryArea.insertMany(categoryAreaMappings);
|
|
58
|
+
}
|
|
59
|
+
const globalProducts = await Product.find({ is_global: true, status: true });
|
|
60
|
+
const existingProductMappings = await ProductArea.find({
|
|
61
|
+
product: { $in: globalProducts.map((product) => product._id) },
|
|
62
|
+
area: doc._id
|
|
63
|
+
});
|
|
64
|
+
if (existingProductMappings.length === 0) {
|
|
65
|
+
const productAreaMappings = globalProducts.map((product) => ({
|
|
66
|
+
product: product._id,
|
|
67
|
+
area: doc._id,
|
|
68
|
+
name_local_language: product.name_hindi,
|
|
69
|
+
mrp: product.base_price,
|
|
70
|
+
price: product.base_price,
|
|
71
|
+
status: true
|
|
72
|
+
}));
|
|
73
|
+
await ProductArea.insertMany(productAreaMappings);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
AreaSchema.post("deleteOne", { document: true, query: false }, async function (doc) {
|
|
77
|
+
const [CategoryArea, ProductArea] = await Promise.all([
|
|
78
|
+
import("../models/mappings/CategoryArea.js").then((module) => module.default),
|
|
79
|
+
import("../models/mappings/ProductArea.js").then((module) => module.default)
|
|
80
|
+
]);
|
|
81
|
+
await CategoryArea.deleteMany({ area: doc._id });
|
|
82
|
+
await ProductArea.deleteMany({ area: doc._id });
|
|
83
|
+
});
|
|
84
|
+
exports.default = AreaSchema;
|
|
85
|
+
//# sourceMappingURL=AreaSchema.js.map
|