@merkaly/api 0.2.3-4 → 0.2.3
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/.output/abstract/abstract.entity.d.ts +1 -1
- package/.output/abstract/abstract.entity.js +53 -0
- package/.output/modules/assets/asset.entity.js +69 -0
- package/.output/modules/content/banners/banner.entity.js +54 -0
- package/.output/modules/content/pages/page.entity.js +69 -0
- package/.output/modules/inventory/brands/brand.entity.js +50 -0
- package/.output/modules/inventory/categories/category.entity.js +61 -0
- package/.output/modules/inventory/products/entities/code.entity.js +53 -0
- package/.output/modules/inventory/products/entities/dimension.entity.js +57 -0
- package/.output/modules/inventory/products/entities/price.entity.js +49 -0
- package/.output/modules/inventory/products/entities/seo.entity.js +53 -0
- package/.output/modules/inventory/products/product.entity.js +101 -0
- package/.output/modules/inventory/properties/property.entity.js +55 -0
- package/.output/modules/sales/clients/client.entity.js +64 -0
- package/.output/modules/sales/orders/address/address.entity.d.ts +4 -3
- package/.output/modules/sales/orders/address/address.entity.js +68 -0
- package/.output/modules/sales/orders/address/address.validator.d.ts +3 -2
- package/.output/modules/sales/orders/address/address.validator.js +19 -7
- package/.output/modules/sales/orders/billing/billing.entity.d.ts +5 -4
- package/.output/modules/sales/orders/billing/billing.entity.js +59 -0
- package/.output/modules/sales/orders/billing/billing.validator.d.ts +1 -1
- package/.output/modules/sales/orders/billing/billing.validator.js +4 -2
- package/.output/modules/sales/orders/customer/customer.entity.d.ts +1 -1
- package/.output/modules/sales/orders/customer/customer.entity.js +52 -0
- package/.output/modules/sales/orders/customer/customer.validator.js +5 -2
- package/.output/modules/sales/orders/item/item.entity.d.ts +1 -0
- package/.output/modules/sales/orders/item/item.entity.js +58 -0
- package/.output/modules/sales/orders/order.entity.d.ts +6 -8
- package/.output/modules/sales/orders/order.entity.js +89 -0
- package/.output/modules/sales/orders/order.validator.d.ts +2 -1
- package/.output/modules/sales/orders/order.validator.js +13 -7
- package/.output/modules/sales/orders/shipping/shipping.entity.d.ts +7 -4
- package/.output/modules/sales/orders/shipping/shipping.entity.js +63 -0
- package/.output/modules/sales/orders/shipping/shipping.validator.d.ts +1 -1
- package/.output/modules/sales/orders/shipping/shipping.validator.js +4 -2
- package/.output/modules/sales/orders/status/status.entity.js +37 -0
- package/.output/modules/setting/layout/layout.entity.js +46 -0
- package/.output/modules/setting/organization/organization.entity.js +28 -0
- package/.output/modules/setting/organization/organization.types.d.ts +4 -3
- package/.output/modules/setting/organization/organization.types.js +7 -2
- package/.output/modules/setting/theme/theme.entity.js +46 -0
- package/.output/modules/users/user.validator.d.ts +3 -3
- package/.output/modules/users/user.validator.js +6 -6
- package/.output/types.d.ts +5 -5
- package/package.json +2 -2
- package/.output/modules/sales/orders/payment/payment.entity.d.ts +0 -4
- package/.output/modules/sales/orders/payment/payment.validator.d.ts +0 -6
- package/.output/modules/sales/orders/payment/payment.validator.js +0 -10
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.AbstractEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var AbstractEntity = (function (_super) {
|
|
31
|
+
__extends(AbstractEntity, _super);
|
|
32
|
+
function AbstractEntity() {
|
|
33
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
_this._id = String();
|
|
35
|
+
_this.updatedAt = null;
|
|
36
|
+
_this.deletedAt = null;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
41
|
+
__metadata("design:type", Date)
|
|
42
|
+
], AbstractEntity.prototype, "createdAt", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
|
|
45
|
+
__metadata("design:type", Date)
|
|
46
|
+
], AbstractEntity.prototype, "updatedAt", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date, default: null }),
|
|
49
|
+
__metadata("design:type", Date)
|
|
50
|
+
], AbstractEntity.prototype, "deletedAt", void 0);
|
|
51
|
+
return AbstractEntity;
|
|
52
|
+
}(mongoose_2.Document));
|
|
53
|
+
exports.AbstractEntity = AbstractEntity;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.AssetEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../abstract/abstract.entity");
|
|
31
|
+
var AssetEntity = (function (_super) {
|
|
32
|
+
__extends(AssetEntity, _super);
|
|
33
|
+
function AssetEntity() {
|
|
34
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
_this.weak = true;
|
|
36
|
+
_this.size = 0;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
AssetEntity.$index = 'assets';
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], AssetEntity.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AssetEntity.prototype, "url", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], AssetEntity.prototype, "weak", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], AssetEntity.prototype, "description", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], AssetEntity.prototype, "type", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, required: true, default: 0 }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], AssetEntity.prototype, "size", void 0);
|
|
64
|
+
AssetEntity = __decorate([
|
|
65
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
66
|
+
], AssetEntity);
|
|
67
|
+
return AssetEntity;
|
|
68
|
+
}(abstract_entity_1.AbstractEntity));
|
|
69
|
+
exports.AssetEntity = AssetEntity;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.BannerEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var BannerEntity = (function (_super) {
|
|
32
|
+
__extends(BannerEntity, _super);
|
|
33
|
+
function BannerEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
BannerEntity.$index = 'content_banners';
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], BannerEntity.prototype, "name", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], BannerEntity.prototype, "image", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: '#' }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], BannerEntity.prototype, "href", void 0);
|
|
49
|
+
BannerEntity = __decorate([
|
|
50
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
51
|
+
], BannerEntity);
|
|
52
|
+
return BannerEntity;
|
|
53
|
+
}(abstract_entity_1.AbstractEntity));
|
|
54
|
+
exports.BannerEntity = BannerEntity;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.PageEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var page_types_1 = require("./page.types");
|
|
32
|
+
var PageEntity = (function (_super) {
|
|
33
|
+
__extends(PageEntity, _super);
|
|
34
|
+
function PageEntity() {
|
|
35
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
_this.type = page_types_1.PageTypes.PAGE;
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
PageEntity.$index = 'content_pages';
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], PageEntity.prototype, "slug", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], PageEntity.prototype, "title", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], PageEntity.prototype, "description", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], PageEntity.prototype, "image", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: page_types_1.PageTypes, required: true, default: page_types_1.PageTypes.PAGE }),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], PageEntity.prototype, "type", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], PageEntity.prototype, "content", void 0);
|
|
64
|
+
PageEntity = __decorate([
|
|
65
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
66
|
+
], PageEntity);
|
|
67
|
+
return PageEntity;
|
|
68
|
+
}(abstract_entity_1.AbstractEntity));
|
|
69
|
+
exports.PageEntity = PageEntity;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.BrandEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var BrandEntity = (function (_super) {
|
|
32
|
+
__extends(BrandEntity, _super);
|
|
33
|
+
function BrandEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
BrandEntity.$index = 'inventory_brands';
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], BrandEntity.prototype, "name", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], BrandEntity.prototype, "description", void 0);
|
|
45
|
+
BrandEntity = __decorate([
|
|
46
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
47
|
+
], BrandEntity);
|
|
48
|
+
return BrandEntity;
|
|
49
|
+
}(abstract_entity_1.AbstractEntity));
|
|
50
|
+
exports.BrandEntity = BrandEntity;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.CategoryEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var mongoose_2 = require("mongoose");
|
|
30
|
+
var abstract_entity_1 = require("../../../abstract/abstract.entity");
|
|
31
|
+
var property_entity_1 = require("../properties/property.entity");
|
|
32
|
+
var CategoryEntity = (function (_super) {
|
|
33
|
+
__extends(CategoryEntity, _super);
|
|
34
|
+
function CategoryEntity() {
|
|
35
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
36
|
+
_this.properties = [];
|
|
37
|
+
return _this;
|
|
38
|
+
}
|
|
39
|
+
CategoryEntity.$index = 'inventory_categories';
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 32, unique: true, required: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CategoryEntity.prototype, "name", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CategoryEntity.prototype, "description", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 32, default: 'tag' }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CategoryEntity.prototype, "icon", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Types.ObjectId, ref: property_entity_1.PropertyEntity.$index }] }),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], CategoryEntity.prototype, "properties", void 0);
|
|
56
|
+
CategoryEntity = __decorate([
|
|
57
|
+
(0, mongoose_1.Schema)({ timestamps: true })
|
|
58
|
+
], CategoryEntity);
|
|
59
|
+
return CategoryEntity;
|
|
60
|
+
}(abstract_entity_1.AbstractEntity));
|
|
61
|
+
exports.CategoryEntity = CategoryEntity;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.CodeEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var CodeEntity = (function (_super) {
|
|
32
|
+
__extends(CodeEntity, _super);
|
|
33
|
+
function CodeEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CodeEntity.prototype, "sku", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CodeEntity.prototype, "gtin", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CodeEntity.prototype, "mpn", void 0);
|
|
48
|
+
CodeEntity = __decorate([
|
|
49
|
+
(0, schema_decorator_1.Schema)()
|
|
50
|
+
], CodeEntity);
|
|
51
|
+
return CodeEntity;
|
|
52
|
+
}(Map));
|
|
53
|
+
exports.CodeEntity = CodeEntity;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.DimensionEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var DimensionEntity = (function (_super) {
|
|
32
|
+
__extends(DimensionEntity, _super);
|
|
33
|
+
function DimensionEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], DimensionEntity.prototype, "weight", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], DimensionEntity.prototype, "height", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], DimensionEntity.prototype, "width", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], DimensionEntity.prototype, "depth", void 0);
|
|
52
|
+
DimensionEntity = __decorate([
|
|
53
|
+
(0, schema_decorator_1.Schema)()
|
|
54
|
+
], DimensionEntity);
|
|
55
|
+
return DimensionEntity;
|
|
56
|
+
}(Map));
|
|
57
|
+
exports.DimensionEntity = DimensionEntity;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.PriceEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var PriceEntity = (function (_super) {
|
|
32
|
+
__extends(PriceEntity, _super);
|
|
33
|
+
function PriceEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, required: true }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], PriceEntity.prototype, "sale", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], PriceEntity.prototype, "purchase", void 0);
|
|
44
|
+
PriceEntity = __decorate([
|
|
45
|
+
(0, schema_decorator_1.Schema)()
|
|
46
|
+
], PriceEntity);
|
|
47
|
+
return PriceEntity;
|
|
48
|
+
}(Map));
|
|
49
|
+
exports.PriceEntity = PriceEntity;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
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;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.SeoEntity = void 0;
|
|
28
|
+
var mongoose_1 = require("@nestjs/mongoose");
|
|
29
|
+
var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
|
|
30
|
+
var mongoose_2 = require("mongoose");
|
|
31
|
+
var SeoEntity = (function (_super) {
|
|
32
|
+
__extends(SeoEntity, _super);
|
|
33
|
+
function SeoEntity() {
|
|
34
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], SeoEntity.prototype, "title", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], SeoEntity.prototype, "slug", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], SeoEntity.prototype, "description", void 0);
|
|
48
|
+
SeoEntity = __decorate([
|
|
49
|
+
(0, schema_decorator_1.Schema)()
|
|
50
|
+
], SeoEntity);
|
|
51
|
+
return SeoEntity;
|
|
52
|
+
}(Map));
|
|
53
|
+
exports.SeoEntity = SeoEntity;
|