@merkaly/api 0.2.3-2 → 0.2.3-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.
Files changed (23) hide show
  1. package/package.json +1 -1
  2. package/.output/abstract/abstract.entity.js +0 -53
  3. package/.output/modules/assets/asset.entity.js +0 -69
  4. package/.output/modules/content/banners/banner.entity.js +0 -54
  5. package/.output/modules/content/pages/page.entity.js +0 -69
  6. package/.output/modules/inventory/brands/brand.entity.js +0 -50
  7. package/.output/modules/inventory/categories/category.entity.js +0 -61
  8. package/.output/modules/inventory/products/entities/code.entity.js +0 -53
  9. package/.output/modules/inventory/products/entities/dimension.entity.js +0 -57
  10. package/.output/modules/inventory/products/entities/price.entity.js +0 -49
  11. package/.output/modules/inventory/products/entities/seo.entity.js +0 -53
  12. package/.output/modules/inventory/products/product.entity.js +0 -101
  13. package/.output/modules/inventory/properties/property.entity.js +0 -55
  14. package/.output/modules/sales/clients/client.entity.js +0 -64
  15. package/.output/modules/sales/orders/billing/billing.entity.js +0 -44
  16. package/.output/modules/sales/orders/item/item.entity.js +0 -54
  17. package/.output/modules/sales/orders/order.entity.js +0 -87
  18. package/.output/modules/sales/orders/payment/payment.entity.js +0 -28
  19. package/.output/modules/sales/orders/shipping/shipping.entity.js +0 -44
  20. package/.output/modules/sales/orders/status/status.entity.js +0 -37
  21. package/.output/modules/setting/layout/layout.entity.js +0 -46
  22. package/.output/modules/setting/organization/organization.entity.js +0 -28
  23. package/.output/modules/setting/theme/theme.entity.js +0 -46
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkaly/api",
3
- "version": "0.2.3-2",
3
+ "version": "0.2.3-3",
4
4
  "description": "NestJS Backend ApiRest Service",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,53 +0,0 @@
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;
@@ -1,69 +0,0 @@
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;
@@ -1,54 +0,0 @@
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;
@@ -1,69 +0,0 @@
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;
@@ -1,50 +0,0 @@
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;
@@ -1,61 +0,0 @@
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;
@@ -1,53 +0,0 @@
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;
@@ -1,57 +0,0 @@
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;
@@ -1,49 +0,0 @@
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;
@@ -1,53 +0,0 @@
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;
@@ -1,101 +0,0 @@
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.ProductEntity = 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 asset_entity_1 = require("../../assets/asset.entity");
32
- var brand_entity_1 = require("../brands/brand.entity");
33
- var category_entity_1 = require("../categories/category.entity");
34
- var code_entity_1 = require("./entities/code.entity");
35
- var dimension_entity_1 = require("./entities/dimension.entity");
36
- var price_entity_1 = require("./entities/price.entity");
37
- var seo_entity_1 = require("./entities/seo.entity");
38
- var ProductEntity = (function (_super) {
39
- __extends(ProductEntity, _super);
40
- function ProductEntity() {
41
- var _this = _super !== null && _super.apply(this, arguments) || this;
42
- _this.active = true;
43
- _this.hashtags = [];
44
- _this.files = [];
45
- return _this;
46
- }
47
- ProductEntity.$index = 'inventory_products';
48
- __decorate([
49
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
50
- __metadata("design:type", String)
51
- ], ProductEntity.prototype, "name", void 0);
52
- __decorate([
53
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, length: 256 }),
54
- __metadata("design:type", String)
55
- ], ProductEntity.prototype, "measurement", void 0);
56
- __decorate([
57
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Boolean, default: true }),
58
- __metadata("design:type", Object)
59
- ], ProductEntity.prototype, "active", void 0);
60
- __decorate([
61
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, nullable: true }),
62
- __metadata("design:type", String)
63
- ], ProductEntity.prototype, "description", void 0);
64
- __decorate([
65
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
66
- __metadata("design:type", Array)
67
- ], ProductEntity.prototype, "hashtags", void 0);
68
- __decorate([
69
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: category_entity_1.CategoryEntity.$index }),
70
- __metadata("design:type", category_entity_1.CategoryEntity)
71
- ], ProductEntity.prototype, "category", void 0);
72
- __decorate([
73
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: brand_entity_1.BrandEntity.$index }),
74
- __metadata("design:type", brand_entity_1.BrandEntity)
75
- ], ProductEntity.prototype, "brand", void 0);
76
- __decorate([
77
- (0, mongoose_1.Prop)({ type: [{ type: mongoose_2.Schema.Types.ObjectId, ref: asset_entity_1.AssetEntity.$index }] }),
78
- __metadata("design:type", Array)
79
- ], ProductEntity.prototype, "files", void 0);
80
- __decorate([
81
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return price_entity_1.PriceEntity; }, default: new Map() }),
82
- __metadata("design:type", price_entity_1.PriceEntity)
83
- ], ProductEntity.prototype, "price", void 0);
84
- __decorate([
85
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return code_entity_1.CodeEntity; }, default: new Map() }),
86
- __metadata("design:type", code_entity_1.CodeEntity)
87
- ], ProductEntity.prototype, "code", void 0);
88
- __decorate([
89
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return dimension_entity_1.DimensionEntity; }, default: new Map() }),
90
- __metadata("design:type", dimension_entity_1.DimensionEntity)
91
- ], ProductEntity.prototype, "dimension", void 0);
92
- __decorate([
93
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return seo_entity_1.SeoEntity; }, default: new Map() }),
94
- __metadata("design:type", seo_entity_1.SeoEntity)
95
- ], ProductEntity.prototype, "seo", void 0);
96
- ProductEntity = __decorate([
97
- (0, mongoose_1.Schema)({ timestamps: true, toJSON: { virtuals: true } })
98
- ], ProductEntity);
99
- return ProductEntity;
100
- }(abstract_entity_1.AbstractEntity));
101
- exports.ProductEntity = ProductEntity;
@@ -1,55 +0,0 @@
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.PropertyEntity = 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_validator_1 = require("./property.validator");
32
- var PropertyEntity = (function (_super) {
33
- __extends(PropertyEntity, _super);
34
- function PropertyEntity() {
35
- return _super !== null && _super.apply(this, arguments) || this;
36
- }
37
- PropertyEntity.$index = 'inventory_properties';
38
- __decorate([
39
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 32 }),
40
- __metadata("design:type", String)
41
- ], PropertyEntity.prototype, "name", void 0);
42
- __decorate([
43
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, length: 64 }),
44
- __metadata("design:type", String)
45
- ], PropertyEntity.prototype, "title", void 0);
46
- __decorate([
47
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: property_validator_1.PropertyType.STRING }),
48
- __metadata("design:type", String)
49
- ], PropertyEntity.prototype, "type", void 0);
50
- PropertyEntity = __decorate([
51
- (0, mongoose_1.Schema)({ timestamps: true })
52
- ], PropertyEntity);
53
- return PropertyEntity;
54
- }(abstract_entity_1.AbstractEntity));
55
- exports.PropertyEntity = PropertyEntity;
@@ -1,64 +0,0 @@
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.ClientEntity = 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 ClientEntity = (function (_super) {
32
- __extends(ClientEntity, _super);
33
- function ClientEntity() {
34
- var _this = _super !== null && _super.apply(this, arguments) || this;
35
- _this.addresses = [];
36
- return _this;
37
- }
38
- ClientEntity.$index = 'store_clients';
39
- __decorate([
40
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
41
- __metadata("design:type", String)
42
- ], ClientEntity.prototype, "name", void 0);
43
- __decorate([
44
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, unique: true, required: true }),
45
- __metadata("design:type", String)
46
- ], ClientEntity.prototype, "email", void 0);
47
- __decorate([
48
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
49
- __metadata("design:type", String)
50
- ], ClientEntity.prototype, "phone", void 0);
51
- __decorate([
52
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, unique: true }),
53
- __metadata("design:type", String)
54
- ], ClientEntity.prototype, "identificationNumber", void 0);
55
- __decorate([
56
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
57
- __metadata("design:type", Array)
58
- ], ClientEntity.prototype, "addresses", void 0);
59
- ClientEntity = __decorate([
60
- (0, mongoose_1.Schema)({ timestamps: true })
61
- ], ClientEntity);
62
- return ClientEntity;
63
- }(abstract_entity_1.AbstractEntity));
64
- exports.ClientEntity = ClientEntity;
@@ -1,44 +0,0 @@
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.BillingEntity = void 0;
13
- var mongoose_1 = require("@nestjs/mongoose");
14
- var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- var mongoose_2 = require("mongoose");
16
- var BillingEntity = (function () {
17
- function BillingEntity() {
18
- }
19
- __decorate([
20
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
21
- __metadata("design:type", String)
22
- ], BillingEntity.prototype, "name", void 0);
23
- __decorate([
24
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
25
- __metadata("design:type", String)
26
- ], BillingEntity.prototype, "email", void 0);
27
- __decorate([
28
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
29
- __metadata("design:type", String)
30
- ], BillingEntity.prototype, "phone", void 0);
31
- __decorate([
32
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
33
- __metadata("design:type", String)
34
- ], BillingEntity.prototype, "address", void 0);
35
- __decorate([
36
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
37
- __metadata("design:type", String)
38
- ], BillingEntity.prototype, "code", void 0);
39
- BillingEntity = __decorate([
40
- (0, schema_decorator_1.Schema)({ timestamps: true })
41
- ], BillingEntity);
42
- return BillingEntity;
43
- }());
44
- exports.BillingEntity = BillingEntity;
@@ -1,54 +0,0 @@
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.ItemEntity = 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 product_entity_1 = require("../../../inventory/products/product.entity");
32
- var ItemEntity = (function (_super) {
33
- __extends(ItemEntity, _super);
34
- function ItemEntity() {
35
- return _super !== null && _super.apply(this, arguments) || this;
36
- }
37
- __decorate([
38
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 1 }),
39
- __metadata("design:type", Number)
40
- ], ItemEntity.prototype, "quantity", void 0);
41
- __decorate([
42
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, default: 0 }),
43
- __metadata("design:type", Number)
44
- ], ItemEntity.prototype, "price", void 0);
45
- __decorate([
46
- (0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: product_entity_1.ProductEntity.$index, required: true }),
47
- __metadata("design:type", product_entity_1.ProductEntity)
48
- ], ItemEntity.prototype, "product", void 0);
49
- ItemEntity = __decorate([
50
- (0, mongoose_1.Schema)({ timestamps: true, toJSON: { virtuals: true } })
51
- ], ItemEntity);
52
- return ItemEntity;
53
- }(abstract_entity_1.AbstractEntity));
54
- exports.ItemEntity = ItemEntity;
@@ -1,87 +0,0 @@
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.OrderEntity = 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 billing_entity_1 = require("./billing/billing.entity");
32
- var item_schema_1 = require("./item/item.schema");
33
- var payment_entity_1 = require("./payment/payment.entity");
34
- var payment_schema_1 = require("./payment/payment.schema");
35
- var shipping_entity_1 = require("./shipping/shipping.entity");
36
- var client_entity_1 = require("../clients/client.entity");
37
- var OrderEntity = (function (_super) {
38
- __extends(OrderEntity, _super);
39
- function OrderEntity() {
40
- var _this = _super !== null && _super.apply(this, arguments) || this;
41
- _this.status = [];
42
- _this.items = [];
43
- return _this;
44
- }
45
- OrderEntity.$index = 'store_orders';
46
- __decorate([
47
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Number, required: true, unique: true }),
48
- __metadata("design:type", Number)
49
- ], OrderEntity.prototype, "number", void 0);
50
- __decorate([
51
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Array, default: [] }),
52
- __metadata("design:type", Array)
53
- ], OrderEntity.prototype, "status", void 0);
54
- __decorate([
55
- (0, mongoose_1.Prop)({ type: [item_schema_1.ItemSchema], default: [] }),
56
- __metadata("design:type", Array)
57
- ], OrderEntity.prototype, "items", void 0);
58
- __decorate([
59
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return billing_entity_1.BillingEntity; }, default: null }),
60
- __metadata("design:type", mongoose_2.Types.Map)
61
- ], OrderEntity.prototype, "billing", void 0);
62
- __decorate([
63
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Map, ref: function () { return shipping_entity_1.ShippingEntity; }, default: null }),
64
- __metadata("design:type", mongoose_2.Types.Map)
65
- ], OrderEntity.prototype, "shipping", void 0);
66
- __decorate([
67
- (0, mongoose_1.Prop)({ type: payment_schema_1.PaymentSchema, required: true }),
68
- __metadata("design:type", payment_entity_1.PaymentEntity)
69
- ], OrderEntity.prototype, "payment", void 0);
70
- __decorate([
71
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
72
- __metadata("design:type", String)
73
- ], OrderEntity.prototype, "createdBy", void 0);
74
- __decorate([
75
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: client_entity_1.ClientEntity.$index }),
76
- __metadata("design:type", client_entity_1.ClientEntity)
77
- ], OrderEntity.prototype, "client", void 0);
78
- __decorate([
79
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: null }),
80
- __metadata("design:type", String)
81
- ], OrderEntity.prototype, "notes", void 0);
82
- OrderEntity = __decorate([
83
- (0, mongoose_1.Schema)({ timestamps: true, toJSON: { virtuals: true } })
84
- ], OrderEntity);
85
- return OrderEntity;
86
- }(abstract_entity_1.AbstractEntity));
87
- exports.OrderEntity = OrderEntity;
@@ -1,28 +0,0 @@
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.PaymentEntity = void 0;
13
- var mongoose_1 = require("@nestjs/mongoose");
14
- var mongoose_2 = require("mongoose");
15
- var payment_validator_1 = require("./payment.validator");
16
- var PaymentEntity = (function () {
17
- function PaymentEntity() {
18
- }
19
- __decorate([
20
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: payment_validator_1.PaymentMethods, required: true }),
21
- __metadata("design:type", String)
22
- ], PaymentEntity.prototype, "type", void 0);
23
- PaymentEntity = __decorate([
24
- (0, mongoose_1.Schema)()
25
- ], PaymentEntity);
26
- return PaymentEntity;
27
- }());
28
- exports.PaymentEntity = PaymentEntity;
@@ -1,44 +0,0 @@
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.ShippingEntity = void 0;
13
- var mongoose_1 = require("@nestjs/mongoose");
14
- var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- var mongoose_2 = require("mongoose");
16
- var ShippingEntity = (function () {
17
- function ShippingEntity() {
18
- }
19
- __decorate([
20
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
21
- __metadata("design:type", String)
22
- ], ShippingEntity.prototype, "name", void 0);
23
- __decorate([
24
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
25
- __metadata("design:type", String)
26
- ], ShippingEntity.prototype, "email", void 0);
27
- __decorate([
28
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
29
- __metadata("design:type", String)
30
- ], ShippingEntity.prototype, "phone", void 0);
31
- __decorate([
32
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
33
- __metadata("design:type", String)
34
- ], ShippingEntity.prototype, "address", void 0);
35
- __decorate([
36
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true }),
37
- __metadata("design:type", String)
38
- ], ShippingEntity.prototype, "code", void 0);
39
- ShippingEntity = __decorate([
40
- (0, schema_decorator_1.Schema)({ timestamps: true })
41
- ], ShippingEntity);
42
- return ShippingEntity;
43
- }());
44
- exports.ShippingEntity = ShippingEntity;
@@ -1,37 +0,0 @@
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.StatusEntity = void 0;
13
- var mongoose_1 = require("@nestjs/mongoose");
14
- var schema_decorator_1 = require("@nestjs/mongoose/dist/decorators/schema.decorator");
15
- var mongoose_2 = require("mongoose");
16
- var status_validator_1 = require("./status.validator");
17
- var StatusEntity = (function () {
18
- function StatusEntity() {
19
- }
20
- __decorate([
21
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, enum: status_validator_1.StatusType, required: true }),
22
- __metadata("design:type", String)
23
- ], StatusEntity.prototype, "name", void 0);
24
- __decorate([
25
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
26
- __metadata("design:type", String)
27
- ], StatusEntity.prototype, "user", void 0);
28
- __decorate([
29
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Date }),
30
- __metadata("design:type", Object)
31
- ], StatusEntity.prototype, "date", void 0);
32
- StatusEntity = __decorate([
33
- (0, schema_decorator_1.Schema)({ timestamps: true })
34
- ], StatusEntity);
35
- return StatusEntity;
36
- }());
37
- exports.StatusEntity = StatusEntity;
@@ -1,46 +0,0 @@
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.LayoutEntity = 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 LayoutEntity = (function (_super) {
32
- __extends(LayoutEntity, _super);
33
- function LayoutEntity() {
34
- return _super !== null && _super.apply(this, arguments) || this;
35
- }
36
- LayoutEntity.$index = 'settings_layout';
37
- __decorate([
38
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
39
- __metadata("design:type", String)
40
- ], LayoutEntity.prototype, "path", void 0);
41
- LayoutEntity = __decorate([
42
- (0, mongoose_1.Schema)({ timestamps: true })
43
- ], LayoutEntity);
44
- return LayoutEntity;
45
- }(abstract_entity_1.AbstractEntity));
46
- exports.LayoutEntity = LayoutEntity;
@@ -1,28 +0,0 @@
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
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.OrganizationEntity = void 0;
19
- var abstract_entity_1 = require("../../../abstract/abstract.entity");
20
- var OrganizationEntity = (function (_super) {
21
- __extends(OrganizationEntity, _super);
22
- function OrganizationEntity() {
23
- return _super !== null && _super.apply(this, arguments) || this;
24
- }
25
- OrganizationEntity.$index = 'setting_organization';
26
- return OrganizationEntity;
27
- }(abstract_entity_1.AbstractEntity));
28
- exports.OrganizationEntity = OrganizationEntity;
@@ -1,46 +0,0 @@
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.ThemeEntity = 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 ThemeEntity = (function (_super) {
32
- __extends(ThemeEntity, _super);
33
- function ThemeEntity() {
34
- return _super !== null && _super.apply(this, arguments) || this;
35
- }
36
- ThemeEntity.$index = 'settings_theme';
37
- __decorate([
38
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, required: true, unique: true, length: 128 }),
39
- __metadata("design:type", String)
40
- ], ThemeEntity.prototype, "path", void 0);
41
- ThemeEntity = __decorate([
42
- (0, mongoose_1.Schema)({ timestamps: true })
43
- ], ThemeEntity);
44
- return ThemeEntity;
45
- }(abstract_entity_1.AbstractEntity));
46
- exports.ThemeEntity = ThemeEntity;