@things-factory/product-base 8.0.2 → 8.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/product-base",
3
- "version": "8.0.2",
3
+ "version": "8.0.6",
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.2",
27
+ "@things-factory/biz-base": "^8.0.6",
28
28
  "@things-factory/env": "^8.0.2",
29
- "@things-factory/routing-base": "^8.0.2"
29
+ "@things-factory/routing-base": "^8.0.5"
30
30
  },
31
- "gitHead": "39d60f56e142561233ddf6d47b539c637971357c"
31
+ "gitHead": "89abb01bba2376bc5f074e0bc0088e32188d0396"
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 })