@things-factory/product-base 8.0.2 → 8.0.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-server/service/index.d.ts +2 -2
- package/dist-server/service/product/index.d.ts +1 -1
- package/dist-server/service/product/product-query.js +2 -0
- package/dist-server/service/product/product-query.js.map +1 -1
- package/dist-server/service/product/product-types.d.ts +4 -0
- package/dist-server/service/product/product-types.js +16 -0
- package/dist-server/service/product/product-types.js.map +1 -1
- package/dist-server/service/product/product.d.ts +5 -1
- package/dist-server/service/product/product.js +18 -0
- package/dist-server/service/product/product.js.map +1 -1
- package/dist-server/service/product-bundle/index.d.ts +1 -1
- package/dist-server/service/product-bundle-setting/index.d.ts +1 -1
- package/dist-server/service/product-detail/index.d.ts +1 -1
- package/dist-server/service/product-detail-bizplace-setting/index.d.ts +1 -1
- package/dist-server/service/product-set/index.d.ts +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/product/product-query.ts +2 -0
- package/server/service/product/product-types.ts +12 -0
- package/server/service/product/product.ts +15 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/product-base",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.5",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/biz-base": "^8.0.
|
|
27
|
+
"@things-factory/biz-base": "^8.0.5",
|
|
28
28
|
"@things-factory/env": "^8.0.2",
|
|
29
|
-
"@things-factory/routing-base": "^8.0.
|
|
29
|
+
"@things-factory/routing-base": "^8.0.5"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "9ab6fca18eeb58b9d2f3411661508a39d0ab6aee"
|
|
32
32
|
}
|
|
@@ -119,6 +119,8 @@ export class ProductQuery {
|
|
|
119
119
|
let [items, total] = await qb
|
|
120
120
|
.leftJoinAndSelect('Product.productDetails', 'ProductDetails')
|
|
121
121
|
.leftJoinAndSelect('Product.routing', 'Routing')
|
|
122
|
+
.leftJoinAndSelect('Product.deliverTo', 'deliverTo')
|
|
123
|
+
.leftJoinAndSelect('Product.manufacturedBy', 'manufacturedBy')
|
|
122
124
|
.getManyAndCount()
|
|
123
125
|
|
|
124
126
|
items = items.map(itm => {
|
|
@@ -220,6 +220,12 @@ export class NewProduct {
|
|
|
220
220
|
// 바코드
|
|
221
221
|
@Field({ nullable: true })
|
|
222
222
|
barcode?: string
|
|
223
|
+
|
|
224
|
+
@Field(type => ObjectRef, { nullable: true })
|
|
225
|
+
deliverTo?: ObjectRef
|
|
226
|
+
|
|
227
|
+
@Field(type => ObjectRef, { nullable: true })
|
|
228
|
+
manufacturedBy?: ObjectRef
|
|
223
229
|
}
|
|
224
230
|
|
|
225
231
|
@ObjectType()
|
|
@@ -453,6 +459,12 @@ export class ProductPatch {
|
|
|
453
459
|
@Field({ nullable: true })
|
|
454
460
|
barcode?: string
|
|
455
461
|
|
|
462
|
+
@Field(type => ObjectRef, { nullable: true })
|
|
463
|
+
deliverTo?: ObjectRef
|
|
464
|
+
|
|
465
|
+
@Field(type => ObjectRef, { nullable: true })
|
|
466
|
+
manufacturedBy?: ObjectRef
|
|
467
|
+
|
|
456
468
|
@Field({ nullable: true })
|
|
457
469
|
cuFlag?: string
|
|
458
470
|
}
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from 'typeorm'
|
|
13
13
|
|
|
14
14
|
import { User } from '@things-factory/auth-base'
|
|
15
|
-
import { Bizplace } from '@things-factory/biz-base'
|
|
15
|
+
import { Bizplace, ContactPoint } from '@things-factory/biz-base'
|
|
16
16
|
import { config } from '@things-factory/env'
|
|
17
17
|
import { Routing } from '@things-factory/routing-base'
|
|
18
18
|
import { Domain, roundTransformer } from '@things-factory/shell'
|
|
@@ -159,6 +159,20 @@ export class Product {
|
|
|
159
159
|
@Field(type => [Product], { nullable: true })
|
|
160
160
|
childProducts: Product[]
|
|
161
161
|
|
|
162
|
+
@ManyToOne(type => ContactPoint, { nullable: true })
|
|
163
|
+
@Field({ nullable: true })
|
|
164
|
+
deliverTo: ContactPoint
|
|
165
|
+
|
|
166
|
+
@RelationId((product: Product) => product.deliverTo)
|
|
167
|
+
deliverToId: string
|
|
168
|
+
|
|
169
|
+
@ManyToOne(type => ContactPoint, { nullable: true })
|
|
170
|
+
@Field({ nullable: true })
|
|
171
|
+
manufacturedBy: ContactPoint
|
|
172
|
+
|
|
173
|
+
@RelationId((product: Product) => product.manufacturedBy)
|
|
174
|
+
manufacturedById: string
|
|
175
|
+
|
|
162
176
|
//// To be removed ////
|
|
163
177
|
@Column('float', { nullable: true, transformer: roundTransformer })
|
|
164
178
|
@Field({ nullable: true })
|