@things-factory/product-base 7.0.1-beta.1 → 7.0.1-beta.12
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-server/constants/index.d.ts +1 -0
- package/dist-server/constants/product.d.ts +21 -0
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/index.d.ts +2 -0
- package/dist-server/middlewares/index.d.ts +0 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/service/index.d.ts +20 -0
- package/dist-server/service/product/index.d.ts +5 -0
- package/dist-server/service/product/product-mutation.d.ts +16 -0
- package/dist-server/service/product/product-mutation.js +2 -2
- package/dist-server/service/product/product-mutation.js.map +1 -1
- package/dist-server/service/product/product-query.d.ts +28 -0
- package/dist-server/service/product/product-query.js +2 -2
- package/dist-server/service/product/product-query.js.map +1 -1
- package/dist-server/service/product/product-types.d.ts +149 -0
- package/dist-server/service/product/product-types.js +7 -8
- package/dist-server/service/product/product-types.js.map +1 -1
- package/dist-server/service/product/product.d.ts +111 -0
- package/dist-server/service/product/product.js +10 -12
- package/dist-server/service/product/product.js.map +1 -1
- package/dist-server/service/product/validate-product.d.ts +2 -0
- package/dist-server/service/product/validate-product.js.map +1 -1
- package/dist-server/service/product-bundle/index.d.ts +5 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.d.ts +9 -0
- package/dist-server/service/product-bundle/product-bundle-mutation.js +2 -2
- package/dist-server/service/product-bundle/product-bundle-mutation.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-query.d.ts +12 -0
- package/dist-server/service/product-bundle/product-bundle-query.js +2 -2
- package/dist-server/service/product-bundle/product-bundle-query.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle-types.d.ts +20 -0
- package/dist-server/service/product-bundle/product-bundle-types.js +6 -6
- package/dist-server/service/product-bundle/product-bundle-types.js.map +1 -1
- package/dist-server/service/product-bundle/product-bundle.d.ts +25 -0
- package/dist-server/service/product-bundle/product-bundle.js +3 -4
- package/dist-server/service/product-bundle/product-bundle.js.map +1 -1
- package/dist-server/service/product-bundle-setting/index.d.ts +5 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.d.ts +10 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js +2 -2
- package/dist-server/service/product-bundle-setting/product-bundle-setting-mutation.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.d.ts +6 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js +2 -2
- package/dist-server/service/product-bundle-setting/product-bundle-setting-query.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.d.ts +16 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js +4 -4
- package/dist-server/service/product-bundle-setting/product-bundle-setting-types.js.map +1 -1
- package/dist-server/service/product-bundle-setting/product-bundle-setting.d.ts +12 -0
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js +2 -2
- package/dist-server/service/product-bundle-setting/product-bundle-setting.js.map +1 -1
- package/dist-server/service/product-combination/index.d.ts +5 -0
- package/dist-server/service/product-combination/product-combination-mutation.d.ts +9 -0
- package/dist-server/service/product-combination/product-combination-mutation.js +2 -2
- package/dist-server/service/product-combination/product-combination-mutation.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-query.d.ts +11 -0
- package/dist-server/service/product-combination/product-combination-query.js +2 -2
- package/dist-server/service/product-combination/product-combination-query.js.map +1 -1
- package/dist-server/service/product-combination/product-combination-type.d.ts +20 -0
- package/dist-server/service/product-combination/product-combination-type.js +6 -6
- package/dist-server/service/product-combination/product-combination-type.js.map +1 -1
- package/dist-server/service/product-combination/product-combination.d.ts +33 -0
- package/dist-server/service/product-combination/product-combination.js +3 -3
- package/dist-server/service/product-combination/product-combination.js.map +1 -1
- package/dist-server/service/product-combination-setting/index.d.ts +5 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.d.ts +11 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js +2 -2
- package/dist-server/service/product-combination-setting/product-combination-setting-mutation.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-query.d.ts +14 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js +2 -2
- package/dist-server/service/product-combination-setting/product-combination-setting-query.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting-type.d.ts +18 -0
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js +6 -6
- package/dist-server/service/product-combination-setting/product-combination-setting-type.js.map +1 -1
- package/dist-server/service/product-combination-setting/product-combination-setting.d.ts +22 -0
- package/dist-server/service/product-combination-setting/product-combination-setting.js +2 -2
- package/dist-server/service/product-combination-setting/product-combination-setting.js.map +1 -1
- package/dist-server/service/product-detail/index.d.ts +5 -0
- package/dist-server/service/product-detail/product-detail-mutation.d.ts +11 -0
- package/dist-server/service/product-detail/product-detail-mutation.js +14 -19
- package/dist-server/service/product-detail/product-detail-mutation.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-query.d.ts +12 -0
- package/dist-server/service/product-detail/product-detail-query.js +2 -2
- package/dist-server/service/product-detail/product-detail-query.js.map +1 -1
- package/dist-server/service/product-detail/product-detail-types.d.ts +98 -0
- package/dist-server/service/product-detail/product-detail-types.js +6 -6
- package/dist-server/service/product-detail/product-detail-types.js.map +1 -1
- package/dist-server/service/product-detail/product-detail.d.ts +121 -0
- package/dist-server/service/product-detail/product-detail.js +7 -8
- package/dist-server/service/product-detail/product-detail.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/index.d.ts +5 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.d.ts +8 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js +2 -2
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.d.ts +11 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js +2 -2
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.d.ts +24 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js +6 -6
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js.map +1 -1
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.d.ts +34 -0
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js +2 -2
- package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map +1 -1
- package/dist-server/service/product-set/index.d.ts +5 -0
- package/dist-server/service/product-set/product-set-mutation.d.ts +39 -0
- package/dist-server/service/product-set/product-set-mutation.js +2 -2
- package/dist-server/service/product-set/product-set-mutation.js.map +1 -1
- package/dist-server/service/product-set/product-set-query.d.ts +12 -0
- package/dist-server/service/product-set/product-set-query.js +2 -2
- package/dist-server/service/product-set/product-set-query.js.map +1 -1
- package/dist-server/service/product-set/product-set-types.d.ts +18 -0
- package/dist-server/service/product-set/product-set-types.js +6 -6
- package/dist-server/service/product-set/product-set-types.js.map +1 -1
- package/dist-server/service/product-set/product-set.d.ts +22 -0
- package/dist-server/service/product-set/product-set.js +3 -4
- package/dist-server/service/product-set/product-set.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/utils/index.d.ts +1 -0
- package/dist-server/utils/product-util.d.ts +3 -0
- package/package.json +5 -5
- package/server/service/product/product.ts +1 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { ProductDetailBizplaceSetting } from '../product-detail-bizplace-setting/product-detail-bizplace-setting';
|
|
4
|
+
import { Product } from '../product/product';
|
|
5
|
+
/**
|
|
6
|
+
* @prop {string} id - Primary Key.
|
|
7
|
+
* @prop {Object} domain - Stock Owner company domain.
|
|
8
|
+
* @prop {string} name - Product Detail Name.
|
|
9
|
+
* @prop {string} gtin - Global Trade Item Number or Product Detail Barcode. SKU, Manufacturer, and Packaging specific code. For Product Scanning Feature.
|
|
10
|
+
* @prop {?string} refCode - Product Reference Code.
|
|
11
|
+
* @prop {Object} product - Foreign field. Relation to Product Entity / Table.
|
|
12
|
+
* @prop {boolean} isDefault - Default SKU info.
|
|
13
|
+
* @prop {string} packingType - Packing type of current Product Detail.
|
|
14
|
+
* @prop {number} packingSize - Packing size of current Product Detail.
|
|
15
|
+
* @prop {string} movement - Movement of stocks. eg, FAST, NORMAL, SLOW.
|
|
16
|
+
* @prop {string} primaryUnit - UOM unit. eg, unit, kg, g, Lt, foot, m, cm, inch.
|
|
17
|
+
* @prop {number} primaryValue - nett content.
|
|
18
|
+
* @prop {?Object} childProductDetails - Foreign field. Relation to define child packaging level.
|
|
19
|
+
* @prop {?[Object]} parentProductDetails - Foreign field. List of relation to define parent packaging level.
|
|
20
|
+
* @prop {?number} childQty - (To Be Removed: Packing Size will be used instead)Used with packaging level definition to determine in a Child Product Detail contains how many Child Product Detail Qty.
|
|
21
|
+
* @prop {?string} weightUnit - Weight Unit Definition. eg, kg, g, t.
|
|
22
|
+
* @prop {?number} nettWeight - Nett Weight of this Product Detail.
|
|
23
|
+
* @prop {?number} grossWeight - Gross Weight of this Product Detail.
|
|
24
|
+
* @prop {?string} lengthUnit - Length Unit Definition. eg, m, cm, mm, inch, foot.
|
|
25
|
+
* @prop {?number} width - Width length of Product Detail.
|
|
26
|
+
* @prop {?number} depth - Depth length of Product Detail.
|
|
27
|
+
* @prop {?number} height - Height length of Product Detail.
|
|
28
|
+
* @prop {?number} volume - Volume of Product Detail. In m3.
|
|
29
|
+
* @prop {?number} bufferQty - Quantity for reservation.
|
|
30
|
+
* @prop {?number} minQty - Minimum Quantity targetted in inventory. For reporting purposes.
|
|
31
|
+
* @prop {?number} maxQty - Maximum Quantity targetted in inventory. For reporting purposes.
|
|
32
|
+
* @prop {?string} auxUnit1 - Auxiliary Unit or supplementary data for records and reporting purposes.
|
|
33
|
+
* @prop {?string} auxValue1 - Auxiliary Value or supplementary data for records and reporting purposes.
|
|
34
|
+
* @prop {?string} auxUnit2 - Auxiliary Unit or supplementary data for records and reporting purposes.
|
|
35
|
+
* @prop {?string} auxValue2 - Auxiliary Value or supplementary data for records and reporting purposes.
|
|
36
|
+
* @prop {?string} auxUnit3 - Auxiliary Unit or supplementary data for records and reporting purposes.
|
|
37
|
+
* @prop {?string} auxValue3 - Auxiliary Value or supplementary data for records and reporting purposes.
|
|
38
|
+
* @prop {?string} auxUnit4 - Auxiliary Unit or supplementary data for records and reporting purposes.
|
|
39
|
+
* @prop {?string} auxValue4 - Auxiliary Value or supplementary data for records and reporting purposes.
|
|
40
|
+
* @prop {?string} auxUnit5 - Auxiliary Unit or supplementary data for records and reporting purposes.
|
|
41
|
+
* @prop {?string} auxValue5 - Auxiliary Value or supplementary data for records and reporting purposes.
|
|
42
|
+
* @prop {?boolean} isTrackedAsInventory - For accounting integration purposes.
|
|
43
|
+
* @prop {?number} discountId - For accounting integration purposes.
|
|
44
|
+
* @prop {?number} costPrice - For accounting integration purposes.
|
|
45
|
+
* @prop {?number} mrpPrice - For accounting integration purposes.
|
|
46
|
+
* @prop {?number} sellPrice - For accounting integration purposes.
|
|
47
|
+
* @prop {?number} afterTaxCostPrice - For accounting integration purposes.
|
|
48
|
+
* @prop {?number} afterTaxSalesPrice - For accounting integration purposes.
|
|
49
|
+
* @prop {?string} inventoryAccountCode - For accounting integration purposes.
|
|
50
|
+
* @prop {?string} cogsAccountCode - For accounting integration purposes.
|
|
51
|
+
* @prop {?Date} deletedAt - Soft Delete Date and Time.
|
|
52
|
+
* @prop {Date} createdAt - Created Date and Time.
|
|
53
|
+
* @prop {Date} updatedAt - Updated Date and Time.
|
|
54
|
+
* @prop {?Object} creator - Foreign field. Relation to User Entity / Table.
|
|
55
|
+
* @prop {?Object} updater - Foreign field. Relation to User Entity / Table.
|
|
56
|
+
**/
|
|
57
|
+
export declare class ProductDetail {
|
|
58
|
+
constructor(productDetail: any, extrasOnly?: boolean);
|
|
59
|
+
readonly id: string;
|
|
60
|
+
domain: Domain;
|
|
61
|
+
domainId: string;
|
|
62
|
+
name: string;
|
|
63
|
+
gtin: string;
|
|
64
|
+
refCode: string;
|
|
65
|
+
product: Product;
|
|
66
|
+
isDefault: boolean;
|
|
67
|
+
packingType: string;
|
|
68
|
+
packingSize: number;
|
|
69
|
+
movement: string;
|
|
70
|
+
uom: string;
|
|
71
|
+
uomValue: number;
|
|
72
|
+
childProductDetail: ProductDetail;
|
|
73
|
+
parentProductDetails: ProductDetail[];
|
|
74
|
+
productDetailBizplaceSettings: ProductDetailBizplaceSetting[];
|
|
75
|
+
childQty: number;
|
|
76
|
+
weightUnit: string;
|
|
77
|
+
nettWeight: number;
|
|
78
|
+
grossWeight: number;
|
|
79
|
+
lengthUnit: string;
|
|
80
|
+
width: number;
|
|
81
|
+
depth: number;
|
|
82
|
+
height: number;
|
|
83
|
+
volume: number;
|
|
84
|
+
bufferQty: number;
|
|
85
|
+
minQty: number;
|
|
86
|
+
maxQty: number;
|
|
87
|
+
sku?: string;
|
|
88
|
+
productId?: string;
|
|
89
|
+
brand?: string;
|
|
90
|
+
description?: string;
|
|
91
|
+
type?: string;
|
|
92
|
+
auxUnit1: string;
|
|
93
|
+
auxValue1: string;
|
|
94
|
+
auxUnit2: string;
|
|
95
|
+
auxValue2: string;
|
|
96
|
+
auxUnit3: string;
|
|
97
|
+
auxValue3: string;
|
|
98
|
+
auxUnit4: string;
|
|
99
|
+
auxValue4: string;
|
|
100
|
+
auxUnit5: string;
|
|
101
|
+
auxValue5: string;
|
|
102
|
+
isTrackedAsInventory: boolean;
|
|
103
|
+
discountId: number;
|
|
104
|
+
costPrice: number;
|
|
105
|
+
mrpPrice: number;
|
|
106
|
+
sellPrice: number;
|
|
107
|
+
afterTaxCostPrice: number;
|
|
108
|
+
afterTaxSalesPrice: number;
|
|
109
|
+
inventoryAccountCode: string;
|
|
110
|
+
cogsAccountCode: string;
|
|
111
|
+
bundleQty: number;
|
|
112
|
+
isRequireSerialNumberScanningInbound: boolean;
|
|
113
|
+
isRequireSerialNumberScanningOutbound: boolean;
|
|
114
|
+
deletedAt: Date;
|
|
115
|
+
createdAt: Date;
|
|
116
|
+
updatedAt: Date;
|
|
117
|
+
creator: User;
|
|
118
|
+
creatorId: string;
|
|
119
|
+
updater: User;
|
|
120
|
+
updaterId: string;
|
|
121
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var ProductDetail_1;
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.ProductDetail = void 0;
|
|
5
4
|
const tslib_1 = require("tslib");
|
|
@@ -61,7 +60,7 @@ const product_1 = require("../product/product");
|
|
|
61
60
|
* @prop {?Object} creator - Foreign field. Relation to User Entity / Table.
|
|
62
61
|
* @prop {?Object} updater - Foreign field. Relation to User Entity / Table.
|
|
63
62
|
**/
|
|
64
|
-
let ProductDetail =
|
|
63
|
+
let ProductDetail = class ProductDetail {
|
|
65
64
|
constructor(productDetail, extrasOnly = false) {
|
|
66
65
|
if (productDetail) {
|
|
67
66
|
if (!extrasOnly) {
|
|
@@ -114,6 +113,7 @@ let ProductDetail = ProductDetail_1 = class ProductDetail {
|
|
|
114
113
|
}
|
|
115
114
|
}
|
|
116
115
|
};
|
|
116
|
+
exports.ProductDetail = ProductDetail;
|
|
117
117
|
tslib_1.__decorate([
|
|
118
118
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
119
119
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -179,13 +179,13 @@ tslib_1.__decorate([
|
|
|
179
179
|
tslib_1.__metadata("design:type", Number)
|
|
180
180
|
], ProductDetail.prototype, "uomValue", void 0);
|
|
181
181
|
tslib_1.__decorate([
|
|
182
|
-
(0, typeorm_1.ManyToOne)(type =>
|
|
183
|
-
(0, type_graphql_1.Field)(type =>
|
|
182
|
+
(0, typeorm_1.ManyToOne)(type => ProductDetail, { nullable: true }),
|
|
183
|
+
(0, type_graphql_1.Field)(type => ProductDetail, { nullable: true }),
|
|
184
184
|
tslib_1.__metadata("design:type", ProductDetail)
|
|
185
185
|
], ProductDetail.prototype, "childProductDetail", void 0);
|
|
186
186
|
tslib_1.__decorate([
|
|
187
|
-
(0, typeorm_1.OneToMany)(type =>
|
|
188
|
-
(0, type_graphql_1.Field)(type => [
|
|
187
|
+
(0, typeorm_1.OneToMany)(type => ProductDetail, productDetail => productDetail.childProductDetail, { nullable: true }),
|
|
188
|
+
(0, type_graphql_1.Field)(type => [ProductDetail], { nullable: true }),
|
|
189
189
|
tslib_1.__metadata("design:type", Array)
|
|
190
190
|
], ProductDetail.prototype, "parentProductDetails", void 0);
|
|
191
191
|
tslib_1.__decorate([
|
|
@@ -415,7 +415,7 @@ tslib_1.__decorate([
|
|
|
415
415
|
(0, typeorm_1.RelationId)((productDetail) => productDetail.updater),
|
|
416
416
|
tslib_1.__metadata("design:type", String)
|
|
417
417
|
], ProductDetail.prototype, "updaterId", void 0);
|
|
418
|
-
ProductDetail =
|
|
418
|
+
exports.ProductDetail = ProductDetail = tslib_1.__decorate([
|
|
419
419
|
(0, typeorm_1.Entity)(),
|
|
420
420
|
(0, typeorm_1.Index)('ix_product_detail_0', (productDetail) => [productDetail.domain, productDetail.gtin, productDetail.product], { unique: true }),
|
|
421
421
|
(0, typeorm_1.Index)('ix_product_detail_1', (productDetail) => [productDetail.product]),
|
|
@@ -425,5 +425,4 @@ ProductDetail = ProductDetail_1 = tslib_1.__decorate([
|
|
|
425
425
|
(0, type_graphql_1.ObjectType)(),
|
|
426
426
|
tslib_1.__metadata("design:paramtypes", [Object, Object])
|
|
427
427
|
], ProductDetail);
|
|
428
|
-
exports.ProductDetail = ProductDetail;
|
|
429
428
|
//# sourceMappingURL=product-detail.js.map
|
|
@@ -1 +1 @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AC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDACnD;AAEjB;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;sCACO,gBAAI;8CAAA;AAEb;IAAC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDACnD;AA/SN,aAAa;IAXzB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,qBAAqB,EACrB,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,EACnG,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvF,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE;QAC7G,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,GAAE;;GACA,aAAa,CAgTzB;AAhTY,sCAAa","sourcesContent":["import { Field, Float, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, roundTransformer } from '@things-factory/shell'\n\nimport { ProductDetailBizplaceSetting } from '../product-detail-bizplace-setting/product-detail-bizplace-setting'\nimport { Product } from '../product/product'\n\n/**\n * @prop {string} id - Primary Key.\n * @prop {Object} domain - Stock Owner company domain.\n * @prop {string} name - Product Detail Name.\n * @prop {string} gtin - Global Trade Item Number or Product Detail Barcode. SKU, Manufacturer, and Packaging specific code. For Product Scanning Feature.\n * @prop {?string} refCode - Product Reference Code.\n * @prop {Object} product - Foreign field. Relation to Product Entity / Table.\n * @prop {boolean} isDefault - Default SKU info.\n * @prop {string} packingType - Packing type of current Product Detail.\n * @prop {number} packingSize - Packing size of current Product Detail.\n * @prop {string} movement - Movement of stocks. eg, FAST, NORMAL, SLOW.\n * @prop {string} primaryUnit - UOM unit. eg, unit, kg, g, Lt, foot, m, cm, inch.\n * @prop {number} primaryValue - nett content.\n * @prop {?Object} childProductDetails - Foreign field. Relation to define child packaging level.\n * @prop {?[Object]} parentProductDetails - Foreign field. List of relation to define parent packaging level.\n * @prop {?number} childQty - (To Be Removed: Packing Size will be used instead)Used with packaging level definition to determine in a Child Product Detail contains how many Child Product Detail Qty.\n * @prop {?string} weightUnit - Weight Unit Definition. eg, kg, g, t.\n * @prop {?number} nettWeight - Nett Weight of this Product Detail.\n * @prop {?number} grossWeight - Gross Weight of this Product Detail.\n * @prop {?string} lengthUnit - Length Unit Definition. eg, m, cm, mm, inch, foot.\n * @prop {?number} width - Width length of Product Detail.\n * @prop {?number} depth - Depth length of Product Detail.\n * @prop {?number} height - Height length of Product Detail.\n * @prop {?number} volume - Volume of Product Detail. In m3.\n * @prop {?number} bufferQty - Quantity for reservation.\n * @prop {?number} minQty - Minimum Quantity targetted in inventory. For reporting purposes.\n * @prop {?number} maxQty - Maximum Quantity targetted in inventory. For reporting purposes.\n * @prop {?string} auxUnit1 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue1 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit2 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue2 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit3 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue3 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit4 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue4 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit5 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue5 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?boolean} isTrackedAsInventory - For accounting integration purposes.\n * @prop {?number} discountId - For accounting integration purposes.\n * @prop {?number} costPrice - For accounting integration purposes.\n * @prop {?number} mrpPrice - For accounting integration purposes.\n * @prop {?number} sellPrice - For accounting integration purposes.\n * @prop {?number} afterTaxCostPrice - For accounting integration purposes.\n * @prop {?number} afterTaxSalesPrice - For accounting integration purposes.\n * @prop {?string} inventoryAccountCode - For accounting integration purposes.\n * @prop {?string} cogsAccountCode - For accounting integration purposes.\n * @prop {?Date} deletedAt - Soft Delete Date and Time.\n * @prop {Date} createdAt - Created Date and Time.\n * @prop {Date} updatedAt - Updated Date and Time.\n * @prop {?Object} creator - Foreign field. Relation to User Entity / Table.\n * @prop {?Object} updater - Foreign field. Relation to User Entity / Table.\n **/\n\n@Entity()\n@Index(\n 'ix_product_detail_0',\n (productDetail: ProductDetail) => [productDetail.domain, productDetail.gtin, productDetail.product],\n { unique: true }\n)\n@Index('ix_product_detail_1', (productDetail: ProductDetail) => [productDetail.product])\n@Index('ix_product_detail_2', (productDetail: ProductDetail) => [productDetail.domain, productDetail.refCode], {\n unique: true\n})\n@ObjectType()\nexport class ProductDetail {\n constructor(productDetail, extrasOnly = false) {\n if (productDetail) {\n if (!extrasOnly) {\n this.domain = productDetail.domain\n this.name = productDetail.name\n this.creator = productDetail.creator\n this.updater = productDetail.updater\n }\n this.gtin = productDetail.gtin\n this.refCode = productDetail.refCode\n this.product = productDetail.product\n this.isDefault = productDetail.isDefault\n this.packingType = productDetail.packingType\n this.packingSize = productDetail.packingSize\n this.movement = productDetail.movement || 'NORMAL'\n this.uom = productDetail.uom\n this.uomValue = productDetail.uomValue\n this.childProductDetail = productDetail.childProductDetail\n this.childQty = productDetail.childQty\n this.weightUnit = productDetail.weightUnit\n this.nettWeight = productDetail.nettWeight\n this.grossWeight = productDetail.grossWeight\n this.lengthUnit = productDetail.lengthUnit\n this.width = productDetail.width\n this.depth = productDetail.depth\n this.height = productDetail.height\n this.volume = productDetail.volume\n this.bufferQty = productDetail.bufferQty || 0\n this.minQty = productDetail.minQty || 0\n this.maxQty = productDetail.maxQty || 0\n this.auxUnit1 = productDetail.auxUnit1\n this.auxValue1 = productDetail.auxValue1\n this.auxUnit2 = productDetail.auxUnit2\n this.auxValue2 = productDetail.auxValue2\n this.auxUnit3 = productDetail.auxUnit3\n this.auxValue3 = productDetail.auxValue3\n this.auxUnit4 = productDetail.auxUnit4\n this.auxValue4 = productDetail.auxValue4\n this.auxUnit5 = productDetail.auxUnit5\n this.auxValue5 = productDetail.auxValue5\n this.isTrackedAsInventory = productDetail.isTrackedAsInventory\n this.discountId = productDetail.discountId\n this.costPrice = productDetail.costPrice\n this.mrpPrice = productDetail.mrpPrice\n this.sellPrice = productDetail.sellPrice\n this.afterTaxCostPrice = productDetail.afterTaxCostPrice\n this.afterTaxSalesPrice = productDetail.afterTaxSalesPrice\n this.inventoryAccountCode = productDetail.inventoryAccountCode\n this.cogsAccountCode = productDetail.cogsAccountCode\n }\n }\n\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain: Domain\n\n @RelationId((productDetail: ProductDetail) => productDetail.domain)\n domainId: string\n\n @Column()\n @Field()\n name: string\n\n @Column()\n @Field()\n gtin: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n refCode: string\n\n @ManyToOne(type => Product)\n @Field(type => Product)\n product: Product\n\n @Column({ default: false })\n @Field()\n isDefault: boolean\n\n @Column()\n @Field()\n packingType: string\n\n @Column('float', { default: 1, transformer: roundTransformer })\n @Field()\n packingSize: number\n\n @Column({ default: 'NORMAL' })\n @Field()\n movement: string\n\n @Column()\n @Field()\n uom: string\n\n @Column('float', { transformer: roundTransformer })\n @Field()\n uomValue: number\n\n @ManyToOne(type => ProductDetail, { nullable: true })\n @Field(type => ProductDetail, { nullable: true })\n childProductDetail: ProductDetail\n\n @OneToMany(type => ProductDetail, productDetail => productDetail.childProductDetail, { nullable: true })\n @Field(type => [ProductDetail], { nullable: true })\n parentProductDetails: ProductDetail[]\n\n @OneToMany(\n type => ProductDetailBizplaceSetting,\n productDetailBizplaceSetting => productDetailBizplaceSetting.productDetail,\n { nullable: true }\n )\n @Field(type => [ProductDetailBizplaceSetting], { nullable: true })\n productDetailBizplaceSettings: ProductDetailBizplaceSetting[]\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n childQty: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n weightUnit: string\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n nettWeight: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n grossWeight: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n lengthUnit: string\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n width: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n depth: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n height: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n volume: number\n\n @Column({ default: 0 })\n @Field()\n bufferQty: number\n\n @Column('float', { default: 0, transformer: roundTransformer })\n @Field()\n minQty: number\n\n @Column('float', { default: 0, transformer: roundTransformer })\n @Field()\n maxQty: number\n\n @Field({ nullable: true })\n sku?: string\n\n @Field({ nullable: true })\n productId?: string\n\n @Field({ nullable: true })\n brand?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit1: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue1: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit2: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue2: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit3: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue3: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit4: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue4: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit5: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue5: string\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n isTrackedAsInventory: boolean\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n discountId: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n costPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n mrpPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n sellPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n afterTaxCostPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n afterTaxSalesPrice: number\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n inventoryAccountCode: string\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n cogsAccountCode: string\n\n @Field(type => Float, { nullable: true })\n bundleQty: number\n\n @Field({ nullable: true })\n isRequireSerialNumberScanningInbound: boolean\n\n @Field({ nullable: true })\n isRequireSerialNumberScanningOutbound: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n creator: User\n\n @RelationId((productDetail: ProductDetail) => productDetail.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n updater: User\n\n @RelationId((productDetail: ProductDetail) => productDetail.updater)\n updaterId: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"product-detail.js","sourceRoot":"","sources":["../../../server/service/product-detail/product-detail.ts"],"names":[],"mappings":";;;;AAAA,+CAA2D;AAC3D,qCAUgB;AAEhB,yDAAgD;AAChD,iDAAgE;AAEhE,wHAAiH;AACjH,gDAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAmDI;AAaG,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAAY,aAAa,EAAE,UAAU,GAAG,KAAK;QAC3C,IAAI,aAAa,EAAE,CAAC;YAClB,IAAI,CAAC,UAAU,EAAE,CAAC;gBAChB,IAAI,CAAC,MAAM,GAAG,aAAa,CAAC,MAAM,CAAA;gBAClC,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAA;gBAC9B,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAA;gBACpC,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAA;YACtC,CAAC;YACD,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAA;YAC9B,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAA;YACpC,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC,OAAO,CAAA;YACpC,IAAI,CAAC,SAAS,GAAG,aAAa,CAAC,SAAS,CAAA;YACxC,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,WAAW,CAAA;YAC5C,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC,WAAW,CAAA;YAC5C,IAAI,CA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DAAA;AAIf;IAFC,IAAA,0BAAgB,GAAE;IAClB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACf,IAAI;gDAAA;AAKf;IAHC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;sCACO,gBAAI;8CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDACnD;AAKjB;IAHC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;sCACO,gBAAI;8CAAA;AAGb;IADC,IAAA,oBAAU,EAAC,CAAC,aAA4B,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC;;gDACnD;wBA/SN,aAAa;IAXzB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,qBAAqB,EACrB,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC,EACnG,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACvF,IAAA,eAAK,EAAC,qBAAqB,EAAE,CAAC,aAA4B,EAAE,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE;QAC7G,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,GAAE;;GACA,aAAa,CAgTzB","sourcesContent":["import { Field, Float, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n OneToMany,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, roundTransformer } from '@things-factory/shell'\n\nimport { ProductDetailBizplaceSetting } from '../product-detail-bizplace-setting/product-detail-bizplace-setting'\nimport { Product } from '../product/product'\n\n/**\n * @prop {string} id - Primary Key.\n * @prop {Object} domain - Stock Owner company domain.\n * @prop {string} name - Product Detail Name.\n * @prop {string} gtin - Global Trade Item Number or Product Detail Barcode. SKU, Manufacturer, and Packaging specific code. For Product Scanning Feature.\n * @prop {?string} refCode - Product Reference Code.\n * @prop {Object} product - Foreign field. Relation to Product Entity / Table.\n * @prop {boolean} isDefault - Default SKU info.\n * @prop {string} packingType - Packing type of current Product Detail.\n * @prop {number} packingSize - Packing size of current Product Detail.\n * @prop {string} movement - Movement of stocks. eg, FAST, NORMAL, SLOW.\n * @prop {string} primaryUnit - UOM unit. eg, unit, kg, g, Lt, foot, m, cm, inch.\n * @prop {number} primaryValue - nett content.\n * @prop {?Object} childProductDetails - Foreign field. Relation to define child packaging level.\n * @prop {?[Object]} parentProductDetails - Foreign field. List of relation to define parent packaging level.\n * @prop {?number} childQty - (To Be Removed: Packing Size will be used instead)Used with packaging level definition to determine in a Child Product Detail contains how many Child Product Detail Qty.\n * @prop {?string} weightUnit - Weight Unit Definition. eg, kg, g, t.\n * @prop {?number} nettWeight - Nett Weight of this Product Detail.\n * @prop {?number} grossWeight - Gross Weight of this Product Detail.\n * @prop {?string} lengthUnit - Length Unit Definition. eg, m, cm, mm, inch, foot.\n * @prop {?number} width - Width length of Product Detail.\n * @prop {?number} depth - Depth length of Product Detail.\n * @prop {?number} height - Height length of Product Detail.\n * @prop {?number} volume - Volume of Product Detail. In m3.\n * @prop {?number} bufferQty - Quantity for reservation.\n * @prop {?number} minQty - Minimum Quantity targetted in inventory. For reporting purposes.\n * @prop {?number} maxQty - Maximum Quantity targetted in inventory. For reporting purposes.\n * @prop {?string} auxUnit1 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue1 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit2 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue2 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit3 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue3 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit4 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue4 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?string} auxUnit5 - Auxiliary Unit or supplementary data for records and reporting purposes.\n * @prop {?string} auxValue5 - Auxiliary Value or supplementary data for records and reporting purposes.\n * @prop {?boolean} isTrackedAsInventory - For accounting integration purposes.\n * @prop {?number} discountId - For accounting integration purposes.\n * @prop {?number} costPrice - For accounting integration purposes.\n * @prop {?number} mrpPrice - For accounting integration purposes.\n * @prop {?number} sellPrice - For accounting integration purposes.\n * @prop {?number} afterTaxCostPrice - For accounting integration purposes.\n * @prop {?number} afterTaxSalesPrice - For accounting integration purposes.\n * @prop {?string} inventoryAccountCode - For accounting integration purposes.\n * @prop {?string} cogsAccountCode - For accounting integration purposes.\n * @prop {?Date} deletedAt - Soft Delete Date and Time.\n * @prop {Date} createdAt - Created Date and Time.\n * @prop {Date} updatedAt - Updated Date and Time.\n * @prop {?Object} creator - Foreign field. Relation to User Entity / Table.\n * @prop {?Object} updater - Foreign field. Relation to User Entity / Table.\n **/\n\n@Entity()\n@Index(\n 'ix_product_detail_0',\n (productDetail: ProductDetail) => [productDetail.domain, productDetail.gtin, productDetail.product],\n { unique: true }\n)\n@Index('ix_product_detail_1', (productDetail: ProductDetail) => [productDetail.product])\n@Index('ix_product_detail_2', (productDetail: ProductDetail) => [productDetail.domain, productDetail.refCode], {\n unique: true\n})\n@ObjectType()\nexport class ProductDetail {\n constructor(productDetail, extrasOnly = false) {\n if (productDetail) {\n if (!extrasOnly) {\n this.domain = productDetail.domain\n this.name = productDetail.name\n this.creator = productDetail.creator\n this.updater = productDetail.updater\n }\n this.gtin = productDetail.gtin\n this.refCode = productDetail.refCode\n this.product = productDetail.product\n this.isDefault = productDetail.isDefault\n this.packingType = productDetail.packingType\n this.packingSize = productDetail.packingSize\n this.movement = productDetail.movement || 'NORMAL'\n this.uom = productDetail.uom\n this.uomValue = productDetail.uomValue\n this.childProductDetail = productDetail.childProductDetail\n this.childQty = productDetail.childQty\n this.weightUnit = productDetail.weightUnit\n this.nettWeight = productDetail.nettWeight\n this.grossWeight = productDetail.grossWeight\n this.lengthUnit = productDetail.lengthUnit\n this.width = productDetail.width\n this.depth = productDetail.depth\n this.height = productDetail.height\n this.volume = productDetail.volume\n this.bufferQty = productDetail.bufferQty || 0\n this.minQty = productDetail.minQty || 0\n this.maxQty = productDetail.maxQty || 0\n this.auxUnit1 = productDetail.auxUnit1\n this.auxValue1 = productDetail.auxValue1\n this.auxUnit2 = productDetail.auxUnit2\n this.auxValue2 = productDetail.auxValue2\n this.auxUnit3 = productDetail.auxUnit3\n this.auxValue3 = productDetail.auxValue3\n this.auxUnit4 = productDetail.auxUnit4\n this.auxValue4 = productDetail.auxValue4\n this.auxUnit5 = productDetail.auxUnit5\n this.auxValue5 = productDetail.auxValue5\n this.isTrackedAsInventory = productDetail.isTrackedAsInventory\n this.discountId = productDetail.discountId\n this.costPrice = productDetail.costPrice\n this.mrpPrice = productDetail.mrpPrice\n this.sellPrice = productDetail.sellPrice\n this.afterTaxCostPrice = productDetail.afterTaxCostPrice\n this.afterTaxSalesPrice = productDetail.afterTaxSalesPrice\n this.inventoryAccountCode = productDetail.inventoryAccountCode\n this.cogsAccountCode = productDetail.cogsAccountCode\n }\n }\n\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain: Domain\n\n @RelationId((productDetail: ProductDetail) => productDetail.domain)\n domainId: string\n\n @Column()\n @Field()\n name: string\n\n @Column()\n @Field()\n gtin: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n refCode: string\n\n @ManyToOne(type => Product)\n @Field(type => Product)\n product: Product\n\n @Column({ default: false })\n @Field()\n isDefault: boolean\n\n @Column()\n @Field()\n packingType: string\n\n @Column('float', { default: 1, transformer: roundTransformer })\n @Field()\n packingSize: number\n\n @Column({ default: 'NORMAL' })\n @Field()\n movement: string\n\n @Column()\n @Field()\n uom: string\n\n @Column('float', { transformer: roundTransformer })\n @Field()\n uomValue: number\n\n @ManyToOne(type => ProductDetail, { nullable: true })\n @Field(type => ProductDetail, { nullable: true })\n childProductDetail: ProductDetail\n\n @OneToMany(type => ProductDetail, productDetail => productDetail.childProductDetail, { nullable: true })\n @Field(type => [ProductDetail], { nullable: true })\n parentProductDetails: ProductDetail[]\n\n @OneToMany(\n type => ProductDetailBizplaceSetting,\n productDetailBizplaceSetting => productDetailBizplaceSetting.productDetail,\n { nullable: true }\n )\n @Field(type => [ProductDetailBizplaceSetting], { nullable: true })\n productDetailBizplaceSettings: ProductDetailBizplaceSetting[]\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n childQty: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n weightUnit: string\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n nettWeight: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n grossWeight: number\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n lengthUnit: string\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n width: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n depth: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n height: number\n\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n volume: number\n\n @Column({ default: 0 })\n @Field()\n bufferQty: number\n\n @Column('float', { default: 0, transformer: roundTransformer })\n @Field()\n minQty: number\n\n @Column('float', { default: 0, transformer: roundTransformer })\n @Field()\n maxQty: number\n\n @Field({ nullable: true })\n sku?: string\n\n @Field({ nullable: true })\n productId?: string\n\n @Field({ nullable: true })\n brand?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n type?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit1: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue1: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit2: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue2: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit3: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue3: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit4: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue4: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxUnit5: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n auxValue5: string\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n isTrackedAsInventory: boolean\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n discountId: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n costPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n mrpPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n sellPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n afterTaxCostPrice: number\n\n //// For Accounting Integration ////\n @Column('float', { nullable: true, transformer: roundTransformer })\n @Field({ nullable: true })\n afterTaxSalesPrice: number\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n inventoryAccountCode: string\n\n //// For Accounting Integration ////\n @Column({ nullable: true })\n @Field({ nullable: true })\n cogsAccountCode: string\n\n @Field(type => Float, { nullable: true })\n bundleQty: number\n\n @Field({ nullable: true })\n isRequireSerialNumberScanningInbound: boolean\n\n @Field({ nullable: true })\n isRequireSerialNumberScanningOutbound: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n deletedAt: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n creator: User\n\n @RelationId((productDetail: ProductDetail) => productDetail.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n updater: User\n\n @RelationId((productDetail: ProductDetail) => productDetail.updater)\n updaterId: string\n}\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting';
|
|
2
|
+
import { ProductDetailBizplaceSettingMutation } from './product-detail-bizplace-setting-mutation';
|
|
3
|
+
import { ProductDetailBizplaceSettingQuery } from './product-detail-bizplace-setting-query';
|
|
4
|
+
export declare const entities: (typeof ProductDetailBizplaceSetting)[];
|
|
5
|
+
export declare const resolvers: (typeof ProductDetailBizplaceSettingMutation | typeof ProductDetailBizplaceSettingQuery)[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting';
|
|
2
|
+
import { ProductDetailBizplaceSettingPatch } from './product-detail-bizplace-setting-types';
|
|
3
|
+
export declare class ProductDetailBizplaceSettingMutation {
|
|
4
|
+
updateProductDetailBizplaceSetting(name: string, patch: ProductDetailBizplaceSettingPatch, context: ResolverContext): Promise<ProductDetailBizplaceSetting>;
|
|
5
|
+
updateMultipleProductDetailBizplaceSetting(productId: string, patches: ProductDetailBizplaceSettingPatch[], context: ResolverContext): Promise<ProductDetailBizplaceSettingPatch[]>;
|
|
6
|
+
deleteProductDetailBizplaceSetting(name: string, context: ResolverContext): Promise<Boolean>;
|
|
7
|
+
deleteProductDetailBizplaceSettings(names: string[], context: ResolverContext): Promise<Boolean>;
|
|
8
|
+
}
|
|
@@ -62,6 +62,7 @@ let ProductDetailBizplaceSettingMutation = class ProductDetailBizplaceSettingMut
|
|
|
62
62
|
return true;
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
|
+
exports.ProductDetailBizplaceSettingMutation = ProductDetailBizplaceSettingMutation;
|
|
65
66
|
tslib_1.__decorate([
|
|
66
67
|
(0, type_graphql_1.Mutation)(returns => product_detail_bizplace_setting_1.ProductDetailBizplaceSetting),
|
|
67
68
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
@@ -97,8 +98,7 @@ tslib_1.__decorate([
|
|
|
97
98
|
tslib_1.__metadata("design:paramtypes", [Array, Object]),
|
|
98
99
|
tslib_1.__metadata("design:returntype", Promise)
|
|
99
100
|
], ProductDetailBizplaceSettingMutation.prototype, "deleteProductDetailBizplaceSettings", null);
|
|
100
|
-
ProductDetailBizplaceSettingMutation = tslib_1.__decorate([
|
|
101
|
+
exports.ProductDetailBizplaceSettingMutation = ProductDetailBizplaceSettingMutation = tslib_1.__decorate([
|
|
101
102
|
(0, type_graphql_1.Resolver)(product_detail_bizplace_setting_1.ProductDetailBizplaceSetting)
|
|
102
103
|
], ProductDetailBizplaceSettingMutation);
|
|
103
|
-
exports.ProductDetailBizplaceSettingMutation = ProductDetailBizplaceSettingMutation;
|
|
104
104
|
//# sourceMappingURL=product-detail-bizplace-setting-mutation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-detail-bizplace-setting-mutation.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,iDAAqD;AAErD,qEAAgE;AAChE,uFAAgF;AAChF,mGAA2F;AAGpF,IAAM,oCAAoC,GAA1C,MAAM,oCAAoC;IAEzC,AAAN,KAAK,CAAC,kCAAkC,CACzB,IAAY,EACX,KAAwC,EAC/C,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEtC,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,8DAA4B,CAAC,CAAA;QAC9D,MAAM,4BAA4B,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC;YAC5D,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE;SAC3C,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,4BAA4B,GAC5B,KAAK,KACR,OAAO,EAAE,IAAI,IACb,CAAA;IACJ,CAAC;IAIK,AAAN,KAAK,CAAC,0CAA0C,CAC5B,SAAiB,EAC0B,OAA4C,EAClG,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAE1C,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAChE,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;QAE/D,MAAM,gCAAgC,GAAG,EAAE,CAAC,aAAa,CAAC,8DAA4B,CAAC,CAAA;QAEvF,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"product-detail-bizplace-setting-mutation.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-mutation.ts"],"names":[],"mappings":";;;;AAAA,+CAAsE;AACtE,qCAA4B;AAE5B,iD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;IAEjD,mBAAA,IAAA,kBAAG,EAAC,WAAW,CAAC,CAAA;IAChB,mBAAA,IAAA,kBAAG,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,yEAAiC,CAAC,CAAC,CAAA;IAC3D,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;sGAqDP;AAGK;IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IAE1B,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;8FAOP;AAGK;IADL,IAAA,uBAAQ,EAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC;IAE1B,mBAAA,IAAA,kBAAG,EAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAA;IAC9B,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+FAUP;+CA1GU,oCAAoC;IADhD,IAAA,uBAAQ,EAAC,8DAA4B,CAAC;GAC1B,oCAAoC,CA2GhD","sourcesContent":["import { Arg, Ctx, Directive, Mutation, Resolver } from 'type-graphql'\nimport { In } from 'typeorm'\n\nimport { getRepository } from '@things-factory/shell'\n\nimport { ProductDetail } from '../product-detail/product-detail'\nimport { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting'\nimport { ProductDetailBizplaceSettingPatch } from './product-detail-bizplace-setting-types'\n\n@Resolver(ProductDetailBizplaceSetting)\nexport class ProductDetailBizplaceSettingMutation {\n @Mutation(returns => ProductDetailBizplaceSetting)\n async updateProductDetailBizplaceSetting(\n @Arg('name') name: string,\n @Arg('patch') patch: ProductDetailBizplaceSettingPatch,\n @Ctx() context: ResolverContext\n ): Promise<ProductDetailBizplaceSetting> {\n const { domain, user } = context.state\n\n const repository = getRepository(ProductDetailBizplaceSetting)\n const productDetailBizplaceSetting = await repository.findOne({\n where: { domain: { id: domain.id }, name }\n })\n\n return await repository.save({\n ...productDetailBizplaceSetting,\n ...patch,\n updater: user\n })\n }\n\n @Directive('@transaction')\n @Mutation(returns => [ProductDetailBizplaceSetting])\n async updateMultipleProductDetailBizplaceSetting(\n @Arg('productId') productId: string,\n @Arg('patches', type => [ProductDetailBizplaceSettingPatch]) patches: ProductDetailBizplaceSettingPatch[],\n @Ctx() context: ResolverContext\n ): Promise<ProductDetailBizplaceSettingPatch[]> {\n const { domain, user, tx } = context.state\n\n let results = []\n const _createRecords = patches.filter((patch: any) => !patch.id)\n const _updateRecords = patches.filter((patch: any) => patch.id)\n\n const productDetailBizplaceSettingRepo = tx.getRepository(ProductDetailBizplaceSetting)\n\n if (_createRecords.length > 0) {\n for (let i = 0; i < _createRecords.length; i++) {\n const newRecord = _createRecords[i]\n delete newRecord.id\n\n const productDetail = await tx.getRepository(ProductDetail).findOneBy({ id: newRecord.productDetail.id })\n\n if (productDetail) {\n const result = await productDetailBizplaceSettingRepo.save({\n ...newRecord,\n name: productDetail.gtin,\n productDetail,\n domain: domain,\n creator: user,\n updater: user\n })\n results.push({ ...result, cuFlag: '+' })\n }\n }\n }\n\n if (_updateRecords.length > 0) {\n for (let i = 0; i < _updateRecords.length; i++) {\n const newRecord = _updateRecords[i]\n const productDetailBizplaceSetting = await productDetailBizplaceSettingRepo.findOneBy({\n domain: { id: domain.id },\n id: newRecord.id\n })\n const productDetail = await tx.getRepository(ProductDetail).findOneBy({ id: newRecord.productDetail.id })\n\n const result = await productDetailBizplaceSettingRepo.save({\n ...productDetailBizplaceSetting,\n ...newRecord,\n name: productDetail.gtin,\n productDetail,\n updater: user\n })\n\n results.push({ ...result, cuFlag: 'M' })\n }\n }\n\n return results\n }\n\n @Mutation(returns => Boolean)\n async deleteProductDetailBizplaceSetting(\n @Arg('name') name: string,\n @Ctx() context: ResolverContext\n ): Promise<Boolean> {\n const { domain } = context.state\n\n await getRepository(ProductDetailBizplaceSetting).delete({ domain: { id: domain.id }, name })\n\n return true\n }\n\n @Mutation(returns => Boolean)\n async deleteProductDetailBizplaceSettings(\n @Arg('names', type => [String]) names: string[],\n @Ctx() context: ResolverContext\n ): Promise<Boolean> {\n const { domain } = context.state\n\n await getRepository(ProductDetailBizplaceSetting).delete({\n domain: { id: domain.id },\n name: In(names)\n })\n\n return true\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain, ListParam } from '@things-factory/shell';
|
|
3
|
+
import { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting';
|
|
4
|
+
import { ProductDetailBizplaceSettingList } from './product-detail-bizplace-setting-types';
|
|
5
|
+
export declare class ProductDetailBizplaceSettingQuery {
|
|
6
|
+
productDetailBizplaceSetting(name: string, context: ResolverContext): Promise<ProductDetailBizplaceSetting>;
|
|
7
|
+
productDetailBizplaceSettings(params: ListParam, context: ResolverContext): Promise<ProductDetailBizplaceSettingList>;
|
|
8
|
+
domain(productDetailBizplaceSetting: ProductDetailBizplaceSetting): Promise<Domain>;
|
|
9
|
+
updater(productDetailBizplaceSetting: ProductDetailBizplaceSetting): Promise<User>;
|
|
10
|
+
creator(productDetailBizplaceSetting: ProductDetailBizplaceSetting): Promise<User>;
|
|
11
|
+
}
|
package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.js
CHANGED
|
@@ -52,6 +52,7 @@ let ProductDetailBizplaceSettingQuery = class ProductDetailBizplaceSettingQuery
|
|
|
52
52
|
return await (0, shell_1.getRepository)(auth_base_1.User).findOneBy({ id: productDetailBizplaceSetting.creator.id });
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
+
exports.ProductDetailBizplaceSettingQuery = ProductDetailBizplaceSettingQuery;
|
|
55
56
|
tslib_1.__decorate([
|
|
56
57
|
(0, type_graphql_1.Query)(returns => product_detail_bizplace_setting_1.ProductDetailBizplaceSetting),
|
|
57
58
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
@@ -89,8 +90,7 @@ tslib_1.__decorate([
|
|
|
89
90
|
tslib_1.__metadata("design:paramtypes", [product_detail_bizplace_setting_1.ProductDetailBizplaceSetting]),
|
|
90
91
|
tslib_1.__metadata("design:returntype", Promise)
|
|
91
92
|
], ProductDetailBizplaceSettingQuery.prototype, "creator", null);
|
|
92
|
-
ProductDetailBizplaceSettingQuery = tslib_1.__decorate([
|
|
93
|
+
exports.ProductDetailBizplaceSettingQuery = ProductDetailBizplaceSettingQuery = tslib_1.__decorate([
|
|
93
94
|
(0, type_graphql_1.Resolver)(product_detail_bizplace_setting_1.ProductDetailBizplaceSetting)
|
|
94
95
|
], ProductDetailBizplaceSettingQuery);
|
|
95
|
-
exports.ProductDetailBizplaceSettingQuery = ProductDetailBizplaceSettingQuery;
|
|
96
96
|
//# sourceMappingURL=product-detail-bizplace-setting-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-detail-bizplace-setting-query.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAoF;AAEpF,qEAAgE;AAChE,uFAAgF;AAChF,mGAA0F;AAGnF,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAEtC,AAAN,KAAK,CAAC,4BAA4B,CACnB,IAAY,EAClB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,8DAA4B,CAAC,CAAA;QAE9D,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;YAC9B,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE;SAC3C,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,6BAA6B,CACzB,MAAiB,EAClB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE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QAC9E,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,4BAA4B,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;IAC7F,CAAC;IAGK,AAAN,KAAK,CAAC,OAAO,CAAS,4BAA0D;QAC9E,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,4BAA4B,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;IAC7F,CAAC;CACF,CAAA;
|
|
1
|
+
{"version":3,"file":"product-detail-bizplace-setting-query.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAmF;AAEnF,yDAAgD;AAChD,iDAAoF;AAEpF,qEAAgE;AAChE,uFAAgF;AAChF,mGAA0F;AAGnF,IAAM,iCAAiC,GAAvC,MAAM,iCAAiC;IAEtC,AAAN,KAAK,CAAC,4BAA4B,CACnB,IAAY,EAClB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAChC,MAAM,UAAU,GAAG,IAAA,qBAAa,EAAC,8DAA4B,CAAC,CAAA;QAE9D,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;YAC9B,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE;SAC3C,CAAC,CAAA;IACJ,CAAC;IAGK,AAAN,KAAK,CAAC,6BAA6B,CACzB,MAAiB,EAClB,OAAwB;QAE/B,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAmC,OAAO,CAAC,KAAK,CAAA;QAE/E,MAAM,YAAY,GAAG,IAAA,qBAAa,EAAC,8BAAa,CAAC,CAAC,kBAAkB,CAAC,eAAe,CAAC,CAAA;QAErF,IAAA,kBAAU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AAN,KAAK,CAAC,OAAO,CAAS,4BAA0D;QAC9E,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAI,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,4BAA4B,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;IAC7F,CAAC;CACF,CAAA;AA/EY,8EAAiC;AAEtC;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,8DAA4B,CAAC;IAE5C,mBAAA,IAAA,kBAAG,EAAC,MAAM,CAAC,CAAA;IACX,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;qFAQP;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,wEAAgC,CAAC;IAEhD,mBAAA,IAAA,mBAAI,GAAE,CAAA;IACN,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CADU,iBAAS;;sFA+C1B;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAA+B,8DAA4B;;+DAE9E;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAA+B,8DAA4B;;gEAE/E;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,CAAC;IACb,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAA+B,8DAA4B;;gEAE/E;4CA9EU,iCAAiC;IAD7C,IAAA,uBAAQ,EAAC,8DAA4B,CAAC;GAC1B,iCAAiC,CA+E7C","sourcesContent":["import { Arg, Args, Ctx, FieldResolver, Query, Resolver, Root } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { buildQuery, Domain, getRepository, ListParam } from '@things-factory/shell'\n\nimport { ProductDetail } from '../product-detail/product-detail'\nimport { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting'\nimport { ProductDetailBizplaceSettingList } from './product-detail-bizplace-setting-types'\n\n@Resolver(ProductDetailBizplaceSetting)\nexport class ProductDetailBizplaceSettingQuery {\n @Query(returns => ProductDetailBizplaceSetting)\n async productDetailBizplaceSetting(\n @Arg('name') name: string,\n @Ctx() context: ResolverContext\n ): Promise<ProductDetailBizplaceSetting> {\n const { domain } = context.state\n const repository = getRepository(ProductDetailBizplaceSetting)\n\n return await repository.findOne({\n where: { domain: { id: domain.id }, name }\n })\n }\n\n @Query(returns => ProductDetailBizplaceSettingList)\n async productDetailBizplaceSettings(\n @Args() params: ListParam,\n @Ctx() context: ResolverContext\n ): Promise<ProductDetailBizplaceSettingList> {\n const { domain, user: updater }: { domain: Domain; user: User } = context.state\n\n const queryBuilder = getRepository(ProductDetail).createQueryBuilder('productDetail')\n\n buildQuery(queryBuilder, params, context, {\n domainRef: false\n })\n\n let qb = queryBuilder\n .leftJoinAndSelect(\n 'productDetail.productDetailBizplaceSettings',\n 'pdbs',\n '\"pdbs\".\"product_detail_id\"=\"productDetail\".\"id\"'\n )\n .leftJoinAndSelect('productDetail.domain', 'domain')\n .leftJoinAndSelect('productDetail.creator', 'creator')\n .leftJoinAndSelect('productDetail.updater', 'updater')\n\n // qb.andWhere('pdbs.bizplace_id = :bizplaceId', { bizplaceId: bizplace.id })\n\n const [items, total] = await qb.getManyAndCount()\n\n return {\n items: items.map(itm => {\n let productDetailBizplaceSetting = itm.productDetailBizplaceSettings[0]\n\n return {\n requirePacking: false,\n bufferQty: 0,\n minQty: 0,\n maxQty: 0,\n productDetail: itm,\n ...productDetailBizplaceSetting\n }\n }),\n total\n }\n\n // const convertedParams = convertListParams(params)\n // const [items, total] = await getRepository(ProductDetailBizplaceSettingEntity).findAndCount({\n // ...convertedParams\n // })\n\n // return { items, total }\n }\n\n @FieldResolver(type => Domain)\n async domain(@Root() productDetailBizplaceSetting: ProductDetailBizplaceSetting): Promise<Domain> {\n return await getRepository(Domain).findOneBy({ id: productDetailBizplaceSetting.domain.id })\n }\n\n @FieldResolver(type => User)\n async updater(@Root() productDetailBizplaceSetting: ProductDetailBizplaceSetting): Promise<User> {\n return await getRepository(User).findOneBy({ id: productDetailBizplaceSetting.updater.id })\n }\n\n @FieldResolver(type => User)\n async creator(@Root() productDetailBizplaceSetting: ProductDetailBizplaceSetting): Promise<User> {\n return await getRepository(User).findOneBy({ id: productDetailBizplaceSetting.creator.id })\n }\n}\n"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ObjectRef } from '@things-factory/shell';
|
|
2
|
+
import { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting';
|
|
3
|
+
export declare class NewProductDetailBizplaceSetting {
|
|
4
|
+
name: string;
|
|
5
|
+
productDetail?: ObjectRef;
|
|
6
|
+
requirePacking?: boolean;
|
|
7
|
+
bufferQty?: number;
|
|
8
|
+
minQty?: number;
|
|
9
|
+
maxQty?: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class ProductDetailBizplaceSettingList {
|
|
12
|
+
items?: ProductDetailBizplaceSetting[];
|
|
13
|
+
total?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class ProductDetailBizplaceSettingPatch {
|
|
16
|
+
id?: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
productDetail?: ObjectRef;
|
|
19
|
+
requirePacking?: boolean;
|
|
20
|
+
bufferQty?: number;
|
|
21
|
+
minQty?: number;
|
|
22
|
+
maxQty?: number;
|
|
23
|
+
cuFlag?: string;
|
|
24
|
+
}
|
package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.js
CHANGED
|
@@ -7,6 +7,7 @@ const shell_1 = require("@things-factory/shell");
|
|
|
7
7
|
const product_detail_bizplace_setting_1 = require("./product-detail-bizplace-setting");
|
|
8
8
|
let NewProductDetailBizplaceSetting = class NewProductDetailBizplaceSetting {
|
|
9
9
|
};
|
|
10
|
+
exports.NewProductDetailBizplaceSetting = NewProductDetailBizplaceSetting;
|
|
10
11
|
tslib_1.__decorate([
|
|
11
12
|
(0, type_graphql_1.Field)(),
|
|
12
13
|
tslib_1.__metadata("design:type", String)
|
|
@@ -31,12 +32,12 @@ tslib_1.__decorate([
|
|
|
31
32
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
32
33
|
tslib_1.__metadata("design:type", Number)
|
|
33
34
|
], NewProductDetailBizplaceSetting.prototype, "maxQty", void 0);
|
|
34
|
-
NewProductDetailBizplaceSetting = tslib_1.__decorate([
|
|
35
|
+
exports.NewProductDetailBizplaceSetting = NewProductDetailBizplaceSetting = tslib_1.__decorate([
|
|
35
36
|
(0, type_graphql_1.InputType)()
|
|
36
37
|
], NewProductDetailBizplaceSetting);
|
|
37
|
-
exports.NewProductDetailBizplaceSetting = NewProductDetailBizplaceSetting;
|
|
38
38
|
let ProductDetailBizplaceSettingList = class ProductDetailBizplaceSettingList {
|
|
39
39
|
};
|
|
40
|
+
exports.ProductDetailBizplaceSettingList = ProductDetailBizplaceSettingList;
|
|
40
41
|
tslib_1.__decorate([
|
|
41
42
|
(0, type_graphql_1.Field)(type => [product_detail_bizplace_setting_1.ProductDetailBizplaceSetting], { nullable: true }),
|
|
42
43
|
tslib_1.__metadata("design:type", Array)
|
|
@@ -45,12 +46,12 @@ tslib_1.__decorate([
|
|
|
45
46
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
46
47
|
tslib_1.__metadata("design:type", Number)
|
|
47
48
|
], ProductDetailBizplaceSettingList.prototype, "total", void 0);
|
|
48
|
-
ProductDetailBizplaceSettingList = tslib_1.__decorate([
|
|
49
|
+
exports.ProductDetailBizplaceSettingList = ProductDetailBizplaceSettingList = tslib_1.__decorate([
|
|
49
50
|
(0, type_graphql_1.ObjectType)()
|
|
50
51
|
], ProductDetailBizplaceSettingList);
|
|
51
|
-
exports.ProductDetailBizplaceSettingList = ProductDetailBizplaceSettingList;
|
|
52
52
|
let ProductDetailBizplaceSettingPatch = class ProductDetailBizplaceSettingPatch {
|
|
53
53
|
};
|
|
54
|
+
exports.ProductDetailBizplaceSettingPatch = ProductDetailBizplaceSettingPatch;
|
|
54
55
|
tslib_1.__decorate([
|
|
55
56
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
56
57
|
tslib_1.__metadata("design:type", String)
|
|
@@ -83,8 +84,7 @@ tslib_1.__decorate([
|
|
|
83
84
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
84
85
|
tslib_1.__metadata("design:type", String)
|
|
85
86
|
], ProductDetailBizplaceSettingPatch.prototype, "cuFlag", void 0);
|
|
86
|
-
ProductDetailBizplaceSettingPatch = tslib_1.__decorate([
|
|
87
|
+
exports.ProductDetailBizplaceSettingPatch = ProductDetailBizplaceSettingPatch = tslib_1.__decorate([
|
|
87
88
|
(0, type_graphql_1.InputType)()
|
|
88
89
|
], ProductDetailBizplaceSettingPatch);
|
|
89
|
-
exports.ProductDetailBizplaceSettingPatch = ProductDetailBizplaceSettingPatch;
|
|
90
90
|
//# sourceMappingURL=product-detail-bizplace-setting-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-detail-bizplace-setting-types.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAuE;AAEvE,iDAAiD;AAEjD,uFAAgF;AAGzE,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;CAkB3C,CAAA;
|
|
1
|
+
{"version":3,"file":"product-detail-bizplace-setting-types.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAuE;AAEvE,iDAAiD;AAEjD,uFAAgF;AAGzE,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;CAkB3C,CAAA;AAlBY,0EAA+B;AAE1C;IADC,IAAA,oBAAK,GAAE;;6DACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,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,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yEACF;AAGxB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oEACrB;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEAC1B;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEAC1B;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iEACX;4CAvBJ,iCAAiC;IAD7C,IAAA,wBAAS,GAAE;GACC,iCAAiC,CAwB7C","sourcesContent":["import { Field, Float, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef } from '@things-factory/shell'\n\nimport { ProductDetailBizplaceSetting } from './product-detail-bizplace-setting'\n\n@InputType()\nexport class NewProductDetailBizplaceSetting {\n @Field()\n name: string\n\n @Field({ nullable: true })\n productDetail?: ObjectRef\n\n @Field({ nullable: true })\n requirePacking?: boolean\n\n @Field(type => Int, { nullable: true })\n bufferQty?: number\n\n @Field(type => Float, { nullable: true })\n minQty?: number\n\n @Field(type => Float, { nullable: true })\n maxQty?: number\n}\n\n@ObjectType()\nexport class ProductDetailBizplaceSettingList {\n @Field(type => [ProductDetailBizplaceSetting], { nullable: true })\n items?: ProductDetailBizplaceSetting[]\n\n @Field(type => Int, { nullable: true })\n total?: number\n}\n\n@InputType()\nexport class ProductDetailBizplaceSettingPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n productDetail?: ObjectRef\n\n @Field({ nullable: true })\n requirePacking?: boolean\n\n @Field(type => Int, { nullable: true })\n bufferQty?: number\n\n @Field(type => Float, { nullable: true })\n minQty?: number\n\n @Field(type => Float, { nullable: true })\n maxQty?: number\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n"]}
|
package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { User } from '@things-factory/auth-base';
|
|
2
|
+
import { Domain } from '@things-factory/shell';
|
|
3
|
+
import { ProductDetail } from '../product-detail/product-detail';
|
|
4
|
+
/**
|
|
5
|
+
* @prop {string} id - Primary Key.
|
|
6
|
+
* @prop {Object} domain - Foreign field. Relation to Domain Entity / Table.
|
|
7
|
+
* @prop {Object} productDetail - Foreign field. Relation to Product Detail Entity / Table.
|
|
8
|
+
* @prop {string} name - Product Detail Name.
|
|
9
|
+
* @prop {boolean} requirePacking - Default SKU info.
|
|
10
|
+
* @prop {?number} bufferQty - Quantity for reservation.
|
|
11
|
+
* @prop {?number} minQty - Minimum Quantity targetted in inventory. For reporting purposes.
|
|
12
|
+
* @prop {?number} maxQty - Maximum Quantity targetted in inventory. For reporting purposes.
|
|
13
|
+
* @prop {Date} createdAt - Created Date and Time.
|
|
14
|
+
* @prop {Date} updatedAt - Updated Date and Time.
|
|
15
|
+
* @prop {?Object} creator - Foreign field. Relation to User Entity / Table.
|
|
16
|
+
* @prop {?Object} updater - Foreign field. Relation to User Entity / Table.
|
|
17
|
+
**/
|
|
18
|
+
export declare class ProductDetailBizplaceSetting {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
domain: Domain;
|
|
21
|
+
domainId: string;
|
|
22
|
+
productDetail: ProductDetail;
|
|
23
|
+
name: string;
|
|
24
|
+
requirePacking: boolean;
|
|
25
|
+
bufferQty: number;
|
|
26
|
+
minQty: number;
|
|
27
|
+
maxQty: number;
|
|
28
|
+
createdAt: Date;
|
|
29
|
+
updatedAt: Date;
|
|
30
|
+
creator: User;
|
|
31
|
+
creatorId: string;
|
|
32
|
+
updater: User;
|
|
33
|
+
updaterId: string;
|
|
34
|
+
}
|
package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js
CHANGED
|
@@ -23,6 +23,7 @@ const product_detail_1 = require("../product-detail/product-detail");
|
|
|
23
23
|
**/
|
|
24
24
|
let ProductDetailBizplaceSetting = class ProductDetailBizplaceSetting {
|
|
25
25
|
};
|
|
26
|
+
exports.ProductDetailBizplaceSetting = ProductDetailBizplaceSetting;
|
|
26
27
|
tslib_1.__decorate([
|
|
27
28
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
28
29
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
@@ -99,7 +100,7 @@ tslib_1.__decorate([
|
|
|
99
100
|
(0, typeorm_1.RelationId)((productDetailBizplaceSetting) => productDetailBizplaceSetting.updater),
|
|
100
101
|
tslib_1.__metadata("design:type", String)
|
|
101
102
|
], ProductDetailBizplaceSetting.prototype, "updaterId", void 0);
|
|
102
|
-
ProductDetailBizplaceSetting = tslib_1.__decorate([
|
|
103
|
+
exports.ProductDetailBizplaceSetting = ProductDetailBizplaceSetting = tslib_1.__decorate([
|
|
103
104
|
(0, typeorm_1.Entity)(),
|
|
104
105
|
(0, typeorm_1.Index)('ix_product_detail_bizplace_setting_0', (productDetailBizplaceSetting) => [
|
|
105
106
|
productDetailBizplaceSetting.domain,
|
|
@@ -107,5 +108,4 @@ ProductDetailBizplaceSetting = tslib_1.__decorate([
|
|
|
107
108
|
], { unique: true }),
|
|
108
109
|
(0, type_graphql_1.ObjectType)()
|
|
109
110
|
], ProductDetailBizplaceSetting);
|
|
110
|
-
exports.ProductDetailBizplaceSetting = ProductDetailBizplaceSetting;
|
|
111
111
|
//# sourceMappingURL=product-detail-bizplace-setting.js.map
|
package/dist-server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-detail-bizplace-setting.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,yDAAgD;AAChD,iDAAgE;AAEhE,qEAAgE;AAEhE;;;;;;;;;;;;;IAaI;AAYG,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;CA6DxC,CAAA;
|
|
1
|
+
{"version":3,"file":"product-detail-bizplace-setting.js","sourceRoot":"","sources":["../../../server/service/product-detail-bizplace-setting/product-detail-bizplace-setting.ts"],"names":[],"mappings":";;;;AAAA,+CAAoD;AACpD,qCASgB;AAEhB,yDAAgD;AAChD,iDAAgE;AAEhE,qEAAgE;AAEhE;;;;;;;;;;;;;IAaI;AAYG,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;CA6DxC,CAAA;AA7DY,oEAA4B;AAG9B;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;wDACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACd,cAAM;4DAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,4BAA0D,EAAE,EAAE,CAAC,4BAA4B,CAAC,MAAM,CAAC;;8DAChG;AAIhB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC;IAChC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,8BAAa,CAAC;sCACd,8BAAa;mEAAA;AAI5B;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;0DACI;AAIZ;IAFC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC1B,IAAA,oBAAK,GAAE;;oEACe;AAIvB;IAFC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtB,IAAA,oBAAK,GAAE;;+D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A4B,CAAC,aAAa;KAC3C,EACD,EAAE,MAAM,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,yBAAU,GAAE;GACA,4BAA4B,CA6DxC","sourcesContent":["import { Field, ID, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Domain, roundTransformer } from '@things-factory/shell'\n\nimport { ProductDetail } from '../product-detail/product-detail'\n\n/**\n * @prop {string} id - Primary Key.\n * @prop {Object} domain - Foreign field. Relation to Domain Entity / Table.\n * @prop {Object} productDetail - Foreign field. Relation to Product Detail Entity / Table.\n * @prop {string} name - Product Detail Name.\n * @prop {boolean} requirePacking - Default SKU info.\n * @prop {?number} bufferQty - Quantity for reservation.\n * @prop {?number} minQty - Minimum Quantity targetted in inventory. For reporting purposes.\n * @prop {?number} maxQty - Maximum Quantity targetted in inventory. For reporting purposes.\n * @prop {Date} createdAt - Created Date and Time.\n * @prop {Date} updatedAt - Updated Date and Time.\n * @prop {?Object} creator - Foreign field. Relation to User Entity / Table.\n * @prop {?Object} updater - Foreign field. Relation to User Entity / Table.\n **/\n\n@Entity()\n@Index(\n 'ix_product_detail_bizplace_setting_0',\n (productDetailBizplaceSetting: ProductDetailBizplaceSetting) => [\n productDetailBizplaceSetting.domain,\n productDetailBizplaceSetting.productDetail\n ],\n { unique: true }\n)\n@ObjectType()\nexport class ProductDetailBizplaceSetting {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain: Domain\n\n @RelationId((productDetailBizplaceSetting: ProductDetailBizplaceSetting) => productDetailBizplaceSetting.domain)\n domainId: string\n\n @ManyToOne(type => ProductDetail)\n @Field(type => ProductDetail)\n productDetail: ProductDetail\n\n @Column()\n @Field()\n name: string\n\n @Column({ default: false })\n @Field()\n requirePacking: boolean\n\n @Column({ default: 0 })\n @Field()\n bufferQty: number\n\n @Column('float', { default: 0, transformer: roundTransformer })\n @Field()\n minQty: number\n\n @Column('float', { default: 0, transformer: roundTransformer })\n @Field()\n maxQty: number\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator: User\n\n @RelationId((productDetailBizplaceSetting: ProductDetailBizplaceSetting) => productDetailBizplaceSetting.creator)\n creatorId: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater: User\n\n @RelationId((productDetailBizplaceSetting: ProductDetailBizplaceSetting) => productDetailBizplaceSetting.updater)\n updaterId: string\n}\n"]}
|