@merkaly/api 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract.repository.d.ts +13 -3
- package/dist/account/address/index.js +0 -10
- package/dist/account/cart/index.js +0 -10
- package/dist/account/payment/index.js +0 -10
- package/dist/account/user/index.js +0 -10
- package/dist/account/user/user.validator.d.ts +4 -4
- package/dist/account/wishlist/index.js +0 -10
- package/dist/assets/asset/index.js +0 -5
- package/dist/finance/invoice/index.d.ts +3 -0
- package/dist/{billing/status → finance/invoice}/index.js +3 -3
- package/dist/finance/invoice/invoice.entity.d.ts +13 -0
- package/dist/finance/invoice/invoice.enum.d.ts +14 -0
- package/dist/finance/invoice/invoice.enum.js +20 -0
- package/dist/finance/invoice/invoice.validator.d.ts +18 -0
- package/dist/finance/payment/index.d.ts +4 -0
- package/dist/{billing → finance}/payment/index.js +0 -5
- package/dist/finance/payment/payment.entity.d.ts +17 -0
- package/dist/{billing → finance}/payment/payment.enum.d.ts +3 -2
- package/dist/finance/payment/payment.enum.js +22 -0
- package/dist/{billing/status/status.entity.d.ts → finance/payment/payment.status.entity.d.ts} +3 -3
- package/dist/finance/payment/payment.validator.d.ts +18 -0
- package/dist/finance/refund/index.d.ts +3 -0
- package/dist/finance/refund/index.js +7 -0
- package/dist/finance/refund/refund.entity.d.ts +12 -0
- package/dist/finance/refund/refund.enum.d.ts +16 -0
- package/dist/finance/refund/refund.enum.js +22 -0
- package/dist/finance/refund/refund.validator.d.ts +19 -0
- package/dist/finance/subscription/index.d.ts +3 -0
- package/dist/finance/subscription/index.js +7 -0
- package/dist/finance/subscription/subscription.entity.d.ts +15 -0
- package/dist/finance/subscription/subscription.enum.d.ts +15 -0
- package/dist/finance/subscription/subscription.enum.js +21 -0
- package/dist/finance/subscription/subscription.validator.d.ts +19 -0
- package/dist/finance/tax/index.d.ts +3 -0
- package/dist/finance/tax/index.js +7 -0
- package/dist/finance/tax/tax.entity.d.ts +10 -0
- package/dist/finance/tax/tax.enum.d.ts +8 -0
- package/dist/finance/tax/tax.enum.js +13 -0
- package/dist/finance/tax/tax.validator.d.ts +17 -0
- package/dist/index.js +0 -20
- package/dist/inventory/catalog/attribute/attribute.validator.d.ts +4 -4
- package/dist/inventory/catalog/attribute/index.js +0 -10
- package/dist/inventory/catalog/brand/brand.validator.d.ts +4 -4
- package/dist/inventory/catalog/brand/index.js +0 -10
- package/dist/inventory/catalog/category/category.validator.d.ts +4 -4
- package/dist/inventory/catalog/category/index.js +0 -10
- package/dist/inventory/catalog/collection/collection.validator.d.ts +4 -4
- package/dist/inventory/catalog/collection/index.js +0 -10
- package/dist/inventory/catalog/product/index.js +0 -10
- package/dist/inventory/catalog/product/product.entity.d.ts +7 -0
- package/dist/inventory/catalog/product/product.validator.d.ts +6 -6
- package/dist/inventory/catalog/variant/index.d.ts +2 -0
- package/dist/inventory/catalog/variant/index.js +2 -0
- package/dist/inventory/catalog/variant/variant.entity.d.ts +17 -0
- package/dist/inventory/catalog/variant/variant.validator.d.ts +27 -0
- package/dist/inventory/configuration/label/index.js +0 -10
- package/dist/inventory/configuration/label/label.validator.d.ts +4 -4
- package/dist/inventory/configuration/measurement/index.js +0 -10
- package/dist/inventory/configuration/measurement/measurement.validator.d.ts +4 -4
- package/dist/inventory/configuration/unit/index.js +0 -5
- package/dist/inventory/stock/backorder/backorder.validator.d.ts +4 -4
- package/dist/inventory/stock/backorder/index.js +0 -10
- package/dist/inventory/stock/transfer/index.js +0 -10
- package/dist/inventory/stock/transfer/transfer.validator.d.ts +4 -4
- package/dist/inventory/stock/warehouse/index.js +0 -10
- package/dist/inventory/stock/warehouse/warehouse.validator.d.ts +4 -4
- package/dist/order/purchase/item/index.js +0 -10
- package/dist/order/purchase/transaction/index.js +0 -10
- package/dist/order/purchase/vendor/index.js +0 -10
- package/dist/order/sale/address/index.js +0 -5
- package/dist/order/sale/customer/index.js +0 -10
- package/dist/order/sale/item/index.js +0 -10
- package/dist/order/sale/item/item.entity.d.ts +6 -0
- package/dist/order/sale/item/item.validator.d.ts +2 -1
- package/dist/order/sale/payment/index.js +0 -5
- package/dist/order/sale/payment/payment.validator.d.ts +3 -12
- package/dist/order/sale/shipping/index.d.ts +4 -0
- package/dist/order/sale/shipping/index.js +7 -0
- package/dist/order/sale/shipping/shipping.entity.d.ts +19 -0
- package/dist/{logistic/shipment/shipment.enum.d.ts → order/sale/shipping/shipping.enum.d.ts} +2 -2
- package/dist/order/sale/shipping/shipping.enum.js +22 -0
- package/dist/order/sale/shipping/shipping.status.entity.d.ts +8 -0
- package/dist/{logistic/shipment/shipment.validator.d.ts → order/sale/shipping/shipping.validator.d.ts} +7 -7
- package/dist/order/sale/transaction/index.js +0 -10
- package/dist/order/sale/transaction/transaction.entity.d.ts +5 -5
- package/dist/order/sale/transaction/transaction.validator.d.ts +9 -9
- package/dist/settings/organization/index.d.ts +3 -0
- package/dist/settings/organization/index.js +7 -0
- package/dist/settings/organization/organization.entity.d.ts +5 -0
- package/dist/settings/organization/organization.enum.d.ts +13 -0
- package/dist/settings/organization/organization.enum.js +18 -0
- package/dist/settings/organization/organization.validator.d.ts +13 -0
- package/package.json +25 -18
- package/dist/abstract.entity.js +0 -45
- package/dist/abstract.repository.js +0 -200
- package/dist/abstract.validator.js +0 -98
- package/dist/account/address/address.entity.js +0 -34
- package/dist/account/address/address.validator.js +0 -67
- package/dist/account/cart/cart.entity.js +0 -34
- package/dist/account/cart/cart.validator.js +0 -45
- package/dist/account/payment/payment.entity.js +0 -57
- package/dist/account/payment/payment.validator.js +0 -57
- package/dist/account/user/user.entity.js +0 -46
- package/dist/account/user/user.validator.js +0 -68
- package/dist/account/wishlist/wishlist.entity.js +0 -38
- package/dist/account/wishlist/wishlist.validator.js +0 -39
- package/dist/address.entity.js +0 -59
- package/dist/assets/asset/asset.entity.js +0 -58
- package/dist/billing/payment/index.d.ts +0 -2
- package/dist/billing/payment/payment.enum.js +0 -21
- package/dist/billing/payment/transaction.entity.d.ts +0 -15
- package/dist/billing/payment/transaction.entity.js +0 -55
- package/dist/billing/status/index.d.ts +0 -1
- package/dist/billing/status/status.entity.js +0 -40
- package/dist/inventory/catalog/attribute/attribute.entity.js +0 -47
- package/dist/inventory/catalog/attribute/attribute.validator.js +0 -58
- package/dist/inventory/catalog/brand/brand.entity.js +0 -33
- package/dist/inventory/catalog/brand/brand.validator.js +0 -39
- package/dist/inventory/catalog/category/category.entity.js +0 -33
- package/dist/inventory/catalog/category/category.validator.js +0 -39
- package/dist/inventory/catalog/collection/collection.entity.js +0 -42
- package/dist/inventory/catalog/collection/collection.validator.js +0 -45
- package/dist/inventory/catalog/product/product.entity.js +0 -115
- package/dist/inventory/catalog/product/product.validator.js +0 -135
- package/dist/inventory/configuration/label/label.entity.js +0 -42
- package/dist/inventory/configuration/label/label.validator.js +0 -51
- package/dist/inventory/configuration/measurement/measurement.entity.js +0 -42
- package/dist/inventory/configuration/measurement/measurement.validator.js +0 -87
- package/dist/inventory/configuration/unit/unit.entity.js +0 -46
- package/dist/inventory/stock/backorder/backorder.entity.js +0 -106
- package/dist/inventory/stock/backorder/backorder.validator.js +0 -112
- package/dist/inventory/stock/transfer/transfer.entity.js +0 -108
- package/dist/inventory/stock/transfer/transfer.validator.js +0 -108
- package/dist/inventory/stock/warehouse/warehouse.entity.js +0 -67
- package/dist/inventory/stock/warehouse/warehouse.validator.js +0 -115
- package/dist/logistic/carrier/carrier.entity.d.ts +0 -10
- package/dist/logistic/carrier/carrier.entity.js +0 -57
- package/dist/logistic/carrier/carrier.validator.d.ts +0 -17
- package/dist/logistic/carrier/carrier.validator.js +0 -69
- package/dist/logistic/carrier/index.d.ts +0 -2
- package/dist/logistic/carrier/index.js +0 -12
- package/dist/logistic/shipment/index.d.ts +0 -3
- package/dist/logistic/shipment/index.js +0 -17
- package/dist/logistic/shipment/shipment.entity.d.ts +0 -19
- package/dist/logistic/shipment/shipment.entity.js +0 -67
- package/dist/logistic/shipment/shipment.enum.js +0 -22
- package/dist/logistic/shipment/shipment.validator.js +0 -65
- package/dist/order/purchase/item/item.entity.js +0 -46
- package/dist/order/purchase/item/item.validator.js +0 -41
- package/dist/order/purchase/transaction/transaction.entity.js +0 -67
- package/dist/order/purchase/transaction/transaction.validator.js +0 -87
- package/dist/order/purchase/vendor/vendor.entity.js +0 -62
- package/dist/order/purchase/vendor/vendor.validator.js +0 -75
- package/dist/order/sale/address/address.validator.js +0 -70
- package/dist/order/sale/customer/customer.entity.js +0 -62
- package/dist/order/sale/customer/customer.validator.js +0 -77
- package/dist/order/sale/item/item.entity.js +0 -45
- package/dist/order/sale/item/item.validator.js +0 -34
- package/dist/order/sale/payment/payment.validator.js +0 -51
- package/dist/order/sale/transaction/transaction.entity.js +0 -56
- package/dist/order/sale/transaction/transaction.validator.js +0 -76
|
@@ -1,55 +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.BillingPaymentEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
16
|
-
const payment_enum_1 = require("../enums/payment.enum");
|
|
17
|
-
let BillingPaymentEntity = class BillingPaymentEntity extends abstract_entity_1.AbstractEntity {
|
|
18
|
-
order;
|
|
19
|
-
statuses = [];
|
|
20
|
-
total = 0;
|
|
21
|
-
fee = 0;
|
|
22
|
-
type;
|
|
23
|
-
sequence = 0;
|
|
24
|
-
number;
|
|
25
|
-
currentStatus;
|
|
26
|
-
};
|
|
27
|
-
exports.BillingPaymentEntity = BillingPaymentEntity;
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, mongoose_1.Prop)({ ref: 'order.sale.transactions', required: true, type: mongoose_2.Schema.Types.ObjectId }),
|
|
30
|
-
__metadata("design:type", Object)
|
|
31
|
-
], BillingPaymentEntity.prototype, "order", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, mongoose_1.Prop)({ default: [], type: mongoose_2.Schema.Types.Array }),
|
|
34
|
-
__metadata("design:type", Array)
|
|
35
|
-
], BillingPaymentEntity.prototype, "statuses", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, mongoose_1.Prop)({ required: true, type: mongoose_2.Schema.Types.Number }),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], BillingPaymentEntity.prototype, "total", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, mongoose_1.Prop)({ default: 0, min: 0, type: mongoose_2.Schema.Types.Number }),
|
|
42
|
-
__metadata("design:type", Object)
|
|
43
|
-
], BillingPaymentEntity.prototype, "fee", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, mongoose_1.Prop)({ enum: payment_enum_1.BillingPaymentTypeEnum, required: true, type: mongoose_2.Schema.Types.String }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], BillingPaymentEntity.prototype, "type", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, mongoose_1.Prop)({ default: 1, immutable: true, type: mongoose_2.Schema.Types.Number, unique: true }),
|
|
50
|
-
__metadata("design:type", Object)
|
|
51
|
-
], BillingPaymentEntity.prototype, "sequence", void 0);
|
|
52
|
-
exports.BillingPaymentEntity = BillingPaymentEntity = __decorate([
|
|
53
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
54
|
-
], BillingPaymentEntity);
|
|
55
|
-
//# sourceMappingURL=transaction.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './status.entity';
|
|
@@ -1,40 +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.BillingPaymentStatusEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const user_schema_1 = require("../../../account/schemas/user.schema");
|
|
16
|
-
const payment_enum_1 = require("../enums/payment.enum");
|
|
17
|
-
class BillingPaymentStatusEntity {
|
|
18
|
-
name;
|
|
19
|
-
date;
|
|
20
|
-
user;
|
|
21
|
-
}
|
|
22
|
-
exports.BillingPaymentStatusEntity = BillingPaymentStatusEntity;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, mongoose_1.Prop)({
|
|
25
|
-
default: () => payment_enum_1.BillingPaymentStatusEnum.OPEN,
|
|
26
|
-
enum: payment_enum_1.BillingPaymentStatusEnum,
|
|
27
|
-
required: true,
|
|
28
|
-
type: mongoose_2.Schema.Types.String,
|
|
29
|
-
}),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], BillingPaymentStatusEntity.prototype, "name", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, mongoose_1.Prop)({ default: () => new Date(), type: mongoose_2.Schema.Types.Date }),
|
|
34
|
-
__metadata("design:type", Date)
|
|
35
|
-
], BillingPaymentStatusEntity.prototype, "date", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, mongoose_1.Prop)({ ref: user_schema_1.AccountUserSchema.name, required: true, type: mongoose_2.Schema.Types.String }),
|
|
38
|
-
__metadata("design:type", Object)
|
|
39
|
-
], BillingPaymentStatusEntity.prototype, "user", void 0);
|
|
40
|
-
//# sourceMappingURL=status.entity.js.map
|
|
@@ -1,47 +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.CatalogAttributeEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
16
|
-
let CatalogAttributeEntity = class CatalogAttributeEntity extends abstract_entity_1.AbstractEntity {
|
|
17
|
-
name;
|
|
18
|
-
type;
|
|
19
|
-
options;
|
|
20
|
-
required;
|
|
21
|
-
active;
|
|
22
|
-
};
|
|
23
|
-
exports.CatalogAttributeEntity = CatalogAttributeEntity;
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, mongoose_1.Prop)({ required: true, trim: true, unique: true }),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], CatalogAttributeEntity.prototype, "name", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, mongoose_1.Prop)({ required: true, default: 'text', enum: ['text', 'number', 'select', 'boolean'] }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], CatalogAttributeEntity.prototype, "type", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, mongoose_1.Prop)({ type: [mongoose_2.Schema.Types.String], default: [] }),
|
|
34
|
-
__metadata("design:type", Array)
|
|
35
|
-
], CatalogAttributeEntity.prototype, "options", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, mongoose_1.Prop)({ default: false }),
|
|
38
|
-
__metadata("design:type", Boolean)
|
|
39
|
-
], CatalogAttributeEntity.prototype, "required", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, mongoose_1.Prop)({ default: true }),
|
|
42
|
-
__metadata("design:type", Boolean)
|
|
43
|
-
], CatalogAttributeEntity.prototype, "active", void 0);
|
|
44
|
-
exports.CatalogAttributeEntity = CatalogAttributeEntity = __decorate([
|
|
45
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
46
|
-
], CatalogAttributeEntity);
|
|
47
|
-
//# sourceMappingURL=attribute.entity.js.map
|
|
@@ -1,58 +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.UpdateAttributeValidator = exports.CreateAttributeValidator = exports.ReadAttributeValidator = exports.SearchAttributeValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class SearchAttributeValidator extends abstract_validator_1.SearchValidator {
|
|
16
|
-
}
|
|
17
|
-
exports.SearchAttributeValidator = SearchAttributeValidator;
|
|
18
|
-
class ReadAttributeValidator extends abstract_validator_1.ReadValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.ReadAttributeValidator = ReadAttributeValidator;
|
|
21
|
-
class CreateAttributeValidator extends abstract_validator_1.AbstractValidator {
|
|
22
|
-
name;
|
|
23
|
-
type;
|
|
24
|
-
options = [];
|
|
25
|
-
required;
|
|
26
|
-
active;
|
|
27
|
-
}
|
|
28
|
-
exports.CreateAttributeValidator = CreateAttributeValidator;
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, class_validator_1.IsString)(),
|
|
31
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], CreateAttributeValidator.prototype, "name", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, class_validator_1.IsString)(),
|
|
36
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], CreateAttributeValidator.prototype, "type", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, class_validator_1.IsArray)(),
|
|
41
|
-
(0, class_validator_1.IsString)({ each: true }),
|
|
42
|
-
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
__metadata("design:type", Array)
|
|
44
|
-
], CreateAttributeValidator.prototype, "options", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, class_validator_1.IsBoolean)(),
|
|
47
|
-
(0, class_validator_1.IsOptional)(),
|
|
48
|
-
__metadata("design:type", Boolean)
|
|
49
|
-
], CreateAttributeValidator.prototype, "required", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, class_validator_1.IsBoolean)(),
|
|
52
|
-
(0, class_validator_1.IsOptional)(),
|
|
53
|
-
__metadata("design:type", Boolean)
|
|
54
|
-
], CreateAttributeValidator.prototype, "active", void 0);
|
|
55
|
-
class UpdateAttributeValidator extends CreateAttributeValidator {
|
|
56
|
-
}
|
|
57
|
-
exports.UpdateAttributeValidator = UpdateAttributeValidator;
|
|
58
|
-
//# sourceMappingURL=attribute.validator.js.map
|
|
@@ -1,33 +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.CatalogBrandEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
16
|
-
let CatalogBrandEntity = class CatalogBrandEntity extends abstract_entity_1.AbstractEntity {
|
|
17
|
-
name;
|
|
18
|
-
description;
|
|
19
|
-
products = [];
|
|
20
|
-
};
|
|
21
|
-
exports.CatalogBrandEntity = CatalogBrandEntity;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, mongoose_1.Prop)({ length: 32, required: true, trim: true, type: mongoose_2.Schema.Types.String, unique: true }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], CatalogBrandEntity.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], CatalogBrandEntity.prototype, "description", void 0);
|
|
30
|
-
exports.CatalogBrandEntity = CatalogBrandEntity = __decorate([
|
|
31
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
32
|
-
], CatalogBrandEntity);
|
|
33
|
-
//# sourceMappingURL=brand.entity.js.map
|
|
@@ -1,39 +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.UpdateBrandValidator = exports.CreateBrandValidator = exports.ReadBrandValidator = exports.SearchBrandValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class SearchBrandValidator extends abstract_validator_1.SearchValidator {
|
|
16
|
-
}
|
|
17
|
-
exports.SearchBrandValidator = SearchBrandValidator;
|
|
18
|
-
class ReadBrandValidator extends abstract_validator_1.ReadValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.ReadBrandValidator = ReadBrandValidator;
|
|
21
|
-
class CreateBrandValidator extends abstract_validator_1.AbstractValidator {
|
|
22
|
-
name = String();
|
|
23
|
-
description = String();
|
|
24
|
-
}
|
|
25
|
-
exports.CreateBrandValidator = CreateBrandValidator;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
-
__metadata("design:type", Object)
|
|
30
|
-
], CreateBrandValidator.prototype, "name", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsString)(),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
__metadata("design:type", Object)
|
|
35
|
-
], CreateBrandValidator.prototype, "description", void 0);
|
|
36
|
-
class UpdateBrandValidator extends CreateBrandValidator {
|
|
37
|
-
}
|
|
38
|
-
exports.UpdateBrandValidator = UpdateBrandValidator;
|
|
39
|
-
//# sourceMappingURL=brand.validator.js.map
|
|
@@ -1,33 +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.CatalogCategoryEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
16
|
-
let CatalogCategoryEntity = class CatalogCategoryEntity extends abstract_entity_1.AbstractEntity {
|
|
17
|
-
name;
|
|
18
|
-
description;
|
|
19
|
-
products = [];
|
|
20
|
-
};
|
|
21
|
-
exports.CatalogCategoryEntity = CatalogCategoryEntity;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, mongoose_1.Prop)({ required: true, trim: true, type: mongoose_2.Schema.Types.String, unique: true }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], CatalogCategoryEntity.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, mongoose_1.Prop)({ trim: true, type: mongoose_2.Schema.Types.String }),
|
|
28
|
-
__metadata("design:type", String)
|
|
29
|
-
], CatalogCategoryEntity.prototype, "description", void 0);
|
|
30
|
-
exports.CatalogCategoryEntity = CatalogCategoryEntity = __decorate([
|
|
31
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
32
|
-
], CatalogCategoryEntity);
|
|
33
|
-
//# sourceMappingURL=category.entity.js.map
|
|
@@ -1,39 +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.UpdateCategoryValidator = exports.CreateCategoryValidator = exports.ReadCategoryValidator = exports.SearchCategoryValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class SearchCategoryValidator extends abstract_validator_1.SearchValidator {
|
|
16
|
-
}
|
|
17
|
-
exports.SearchCategoryValidator = SearchCategoryValidator;
|
|
18
|
-
class ReadCategoryValidator extends abstract_validator_1.ReadValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.ReadCategoryValidator = ReadCategoryValidator;
|
|
21
|
-
class CreateCategoryValidator extends abstract_validator_1.AbstractValidator {
|
|
22
|
-
name;
|
|
23
|
-
description;
|
|
24
|
-
}
|
|
25
|
-
exports.CreateCategoryValidator = CreateCategoryValidator;
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsString)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], CreateCategoryValidator.prototype, "name", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsString)(),
|
|
33
|
-
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], CreateCategoryValidator.prototype, "description", void 0);
|
|
36
|
-
class UpdateCategoryValidator extends CreateCategoryValidator {
|
|
37
|
-
}
|
|
38
|
-
exports.UpdateCategoryValidator = UpdateCategoryValidator;
|
|
39
|
-
//# sourceMappingURL=category.validator.js.map
|
|
@@ -1,42 +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.CatalogCollectionEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const product_schema_1 = require("../schemas/product.schema");
|
|
16
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
17
|
-
let CatalogCollectionEntity = class CatalogCollectionEntity extends abstract_entity_1.AbstractEntity {
|
|
18
|
-
name;
|
|
19
|
-
description;
|
|
20
|
-
products = [];
|
|
21
|
-
};
|
|
22
|
-
exports.CatalogCollectionEntity = CatalogCollectionEntity;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, mongoose_1.Prop)({ length: 32, required: true, trim: true, type: mongoose_2.Schema.Types.String, unique: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], CatalogCollectionEntity.prototype, "name", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.String, default: '' }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], CatalogCollectionEntity.prototype, "description", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, mongoose_1.Prop)({
|
|
33
|
-
default: [],
|
|
34
|
-
ref: product_schema_1.InventoryCatalogProductSchema.name,
|
|
35
|
-
type: [{ type: mongoose_2.Schema.Types.ObjectId }],
|
|
36
|
-
}),
|
|
37
|
-
__metadata("design:type", Array)
|
|
38
|
-
], CatalogCollectionEntity.prototype, "products", void 0);
|
|
39
|
-
exports.CatalogCollectionEntity = CatalogCollectionEntity = __decorate([
|
|
40
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
41
|
-
], CatalogCollectionEntity);
|
|
42
|
-
//# sourceMappingURL=collection.entity.js.map
|
|
@@ -1,45 +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.UpdateCollectionValidator = exports.CreateCollectionValidator = exports.ReadCollectionValidator = exports.SearchCollectionValidator = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const abstract_validator_1 = require("../../../../infrastructure/abstracts/abstract.validator");
|
|
15
|
-
class SearchCollectionValidator extends abstract_validator_1.SearchValidator {
|
|
16
|
-
}
|
|
17
|
-
exports.SearchCollectionValidator = SearchCollectionValidator;
|
|
18
|
-
class ReadCollectionValidator extends abstract_validator_1.ReadValidator {
|
|
19
|
-
}
|
|
20
|
-
exports.ReadCollectionValidator = ReadCollectionValidator;
|
|
21
|
-
class CreateCollectionValidator extends abstract_validator_1.AbstractValidator {
|
|
22
|
-
name;
|
|
23
|
-
description;
|
|
24
|
-
products = [];
|
|
25
|
-
}
|
|
26
|
-
exports.CreateCollectionValidator = CreateCollectionValidator;
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, class_validator_1.IsString)(),
|
|
29
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], CreateCollectionValidator.prototype, "name", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, class_validator_1.IsString)(),
|
|
34
|
-
(0, class_validator_1.IsOptional)(),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], CreateCollectionValidator.prototype, "description", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, class_validator_1.IsMongoId)({ each: true }),
|
|
39
|
-
(0, class_validator_1.IsOptional)(),
|
|
40
|
-
__metadata("design:type", Array)
|
|
41
|
-
], CreateCollectionValidator.prototype, "products", void 0);
|
|
42
|
-
class UpdateCollectionValidator extends CreateCollectionValidator {
|
|
43
|
-
}
|
|
44
|
-
exports.UpdateCollectionValidator = UpdateCollectionValidator;
|
|
45
|
-
//# sourceMappingURL=collection.validator.js.map
|
|
@@ -1,115 +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.CatalogProductEntity = void 0;
|
|
13
|
-
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
-
const mongoose_2 = require("mongoose");
|
|
15
|
-
const asset_schema_1 = require("../../../assets/schemas/asset.schema");
|
|
16
|
-
const product_status_enum_1 = require("../enums/product.status.enum");
|
|
17
|
-
const attribute_schema_1 = require("../schemas/attribute.schema");
|
|
18
|
-
const brand_schema_1 = require("../schemas/brand.schema");
|
|
19
|
-
const category_schema_1 = require("../schemas/category.schema");
|
|
20
|
-
const measurement_schema_1 = require("../../configuration/schemas/measurement.schema");
|
|
21
|
-
const abstract_entity_1 = require("../../../../infrastructure/abstracts/abstract.entity");
|
|
22
|
-
let CatalogProductEntity = class CatalogProductEntity extends abstract_entity_1.AbstractEntity {
|
|
23
|
-
sku;
|
|
24
|
-
name;
|
|
25
|
-
description;
|
|
26
|
-
price;
|
|
27
|
-
pictures = [];
|
|
28
|
-
category;
|
|
29
|
-
brand;
|
|
30
|
-
attributes = [];
|
|
31
|
-
measure;
|
|
32
|
-
hashtags = [];
|
|
33
|
-
status;
|
|
34
|
-
stock;
|
|
35
|
-
wishlist = [];
|
|
36
|
-
};
|
|
37
|
-
exports.CatalogProductEntity = CatalogProductEntity;
|
|
38
|
-
__decorate([
|
|
39
|
-
(0, mongoose_1.Prop)({ trim: true, unique: true, sparse: true }),
|
|
40
|
-
__metadata("design:type", String)
|
|
41
|
-
], CatalogProductEntity.prototype, "sku", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, mongoose_1.Prop)({ required: true, trim: true }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], CatalogProductEntity.prototype, "name", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, mongoose_1.Prop)({ default: '', trim: true }),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], CatalogProductEntity.prototype, "description", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, mongoose_1.Prop)({
|
|
52
|
-
default: 0,
|
|
53
|
-
min: 0,
|
|
54
|
-
type: mongoose_2.Schema.Types.Number,
|
|
55
|
-
validate: { validator: Number.isInteger },
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", Number)
|
|
58
|
-
], CatalogProductEntity.prototype, "price", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, mongoose_1.Prop)({ default: [], ref: asset_schema_1.AssetSchema.name, type: [{ type: mongoose_2.Schema.Types.ObjectId }] }),
|
|
61
|
-
__metadata("design:type", Array)
|
|
62
|
-
], CatalogProductEntity.prototype, "pictures", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, mongoose_1.Prop)({ ref: category_schema_1.InventoryCatalogCategorySchema.name, type: mongoose_2.Schema.Types.ObjectId }),
|
|
65
|
-
__metadata("design:type", Object)
|
|
66
|
-
], CatalogProductEntity.prototype, "category", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, mongoose_1.Prop)({ ref: brand_schema_1.InventoryCatalogBrandSchema.name, type: mongoose_2.Schema.Types.ObjectId }),
|
|
69
|
-
__metadata("design:type", Object)
|
|
70
|
-
], CatalogProductEntity.prototype, "brand", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, mongoose_1.Prop)({
|
|
73
|
-
_id: false,
|
|
74
|
-
default: () => ({}),
|
|
75
|
-
required: true,
|
|
76
|
-
type: [
|
|
77
|
-
{
|
|
78
|
-
content: { required: true, type: mongoose_2.Schema.Types.Mixed },
|
|
79
|
-
relation: { ref: attribute_schema_1.InventoryCatalogAttributeSchema.name, type: mongoose_2.Schema.Types.ObjectId },
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
}),
|
|
83
|
-
__metadata("design:type", Array)
|
|
84
|
-
], CatalogProductEntity.prototype, "attributes", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, mongoose_1.Prop)({
|
|
87
|
-
_id: false,
|
|
88
|
-
default: () => ({}),
|
|
89
|
-
type: {
|
|
90
|
-
amount: { default: 0, min: 0, type: mongoose_2.Schema.Types.Number },
|
|
91
|
-
kind: {
|
|
92
|
-
ref: measurement_schema_1.ConfigurationMeasurementSchema.name,
|
|
93
|
-
type: mongoose_2.Schema.Types.ObjectId,
|
|
94
|
-
},
|
|
95
|
-
unit: { type: mongoose_2.Schema.Types.String },
|
|
96
|
-
},
|
|
97
|
-
}),
|
|
98
|
-
__metadata("design:type", Object)
|
|
99
|
-
], CatalogProductEntity.prototype, "measure", void 0);
|
|
100
|
-
__decorate([
|
|
101
|
-
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
102
|
-
__metadata("design:type", Array)
|
|
103
|
-
], CatalogProductEntity.prototype, "hashtags", void 0);
|
|
104
|
-
__decorate([
|
|
105
|
-
(0, mongoose_1.Prop)({ default: product_status_enum_1.CatalogProductStatus.Draft, enum: product_status_enum_1.CatalogProductStatus }),
|
|
106
|
-
__metadata("design:type", String)
|
|
107
|
-
], CatalogProductEntity.prototype, "status", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, mongoose_1.Prop)({ default: 0, min: 0, type: mongoose_2.Schema.Types.Number }),
|
|
110
|
-
__metadata("design:type", Number)
|
|
111
|
-
], CatalogProductEntity.prototype, "stock", void 0);
|
|
112
|
-
exports.CatalogProductEntity = CatalogProductEntity = __decorate([
|
|
113
|
-
(0, mongoose_1.Schema)(abstract_entity_1.$collection)
|
|
114
|
-
], CatalogProductEntity);
|
|
115
|
-
//# sourceMappingURL=product.entity.js.map
|