@lemoncloud/clipbiz-goods-api 0.25.1125 → 0.25.1127

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.
@@ -10,7 +10,7 @@
10
10
  * Copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
11
11
  */
12
12
  import { CoreModel } from 'lemon-model';
13
- import $LUT, { ContractStereo, ContractState, DeliveryStereo, DeliveryState, ContractAgreement } from './types';
13
+ import $LUT, { ContractStereo, ContractState, DeliveryStereo, DeliveryState, ContractStateSet, DeliveryStateSet, Agreement } from './types';
14
14
  import { DealHead, DealModel } from '../deals/model';
15
15
  import { Cores } from 'lemon-core';
16
16
  /**
@@ -50,6 +50,8 @@ export interface ContractModel extends ContractHead, Model {
50
50
  stereo?: ContractStereo;
51
51
  /** state of model */
52
52
  state?: ContractState;
53
+ /** complex state */
54
+ state$?: ContractStateSet;
53
55
  /** (linked) id of deal */
54
56
  dealId?: string;
55
57
  /** (linked) parital of deal */
@@ -85,11 +87,10 @@ export interface ContractModel extends ContractHead, Model {
85
87
  parentId?: string;
86
88
  /** (optional) partial of parent */
87
89
  parent$?: ContractHead;
88
- /**
89
- * 약관 동의 기록
90
- * - 기업, 표준사업장 동의 기록 관리
91
- */
92
- agreed$?: ContractAgreement;
90
+ /** 구매업체(기업) 약관 기록 */
91
+ sellerAgreed$?: Agreement;
92
+ /** 판매업체(표준사업장) 약관 기록 */
93
+ buyerAgreed$?: Agreement;
93
94
  /**
94
95
  * (internal) detail info of deal
95
96
  */
@@ -116,10 +117,16 @@ export interface DeliveryModel extends DeliveryHead, Model {
116
117
  stereo?: DeliveryStereo;
117
118
  /** state of model */
118
119
  state?: DeliveryState;
120
+ /** complex state */
121
+ state$?: DeliveryStateSet;
119
122
  /** (linked) id of contract */
120
123
  contractId?: string;
121
124
  /** (linked) partial of contract */
122
125
  contract$?: ContractHead;
126
+ /** (linked) id of deal */
127
+ dealId?: string;
128
+ /** (linked) partial of deal */
129
+ deal$?: DealHead;
123
130
  /** (internal) 납기 번호 (:= Contract.deliveryNo) */
124
131
  no?: number;
125
132
  /** 납기 수량 */
@@ -9,6 +9,7 @@
9
9
  *
10
10
  * @copyright (C) 2022 LemonCloud Co Ltd. - All Rights Reserved.
11
11
  */
12
+ import { StateActor } from '../../service/backend-types';
12
13
  declare const $LUT: {
13
14
  ModelType: {
14
15
  contract: string;
@@ -23,14 +24,14 @@ declare const $LUT: {
23
24
  /** ContractState */
24
25
  ContractState: {
25
26
  '': string;
26
- draft: string;
27
+ /** pending: 검토 */
27
28
  pending: string;
28
- approved: string;
29
- active: string;
29
+ /** confirmed: 승인 */
30
+ confirmed: string;
31
+ /** completed: 완료 */
30
32
  completed: string;
31
- expired: string;
33
+ /** rejected: 반려 */
32
34
  rejected: string;
33
- cancelled: string;
34
35
  };
35
36
  /** DeliveryStereo */
36
37
  DeliveryStereo: {
@@ -39,6 +40,10 @@ declare const $LUT: {
39
40
  /** DeliveryState */
40
41
  DeliveryState: {
41
42
  '': string;
43
+ /** pending: 대기 */
44
+ pending: string;
45
+ /** confirmed: 입고 */
46
+ confirmed: string;
42
47
  };
43
48
  };
44
49
  /**
@@ -76,13 +81,43 @@ export interface Agreement {
76
81
  };
77
82
  }
78
83
  /**
79
- * type: `ContractAgreement`
80
- * - 계약서별 약관 동의 기록
84
+ * type: `ContractStateSet`
85
+ * - 계약서의 세부 상태 및 행위자 정보를 관리함.
86
+ */
87
+ export interface ContractStateSet {
88
+ /**
89
+ * 계약서 생성 및 요청자 (기업회원)
90
+ */
91
+ created?: StateActor;
92
+ /**
93
+ * 계약서 승인자 (표준사업장)
94
+ */
95
+ approved?: StateActor;
96
+ /**
97
+ * 계약서 반려자 (표준사업장)
98
+ */
99
+ rejected?: StateActor;
100
+ /** (internal) updated count */
101
+ ticks?: number;
102
+ /** (internal) last updated time */
103
+ updatedAt?: number;
104
+ }
105
+ /**
106
+ * type: `DeliveryStateSet`
107
+ * - 납기(Delivery)의 세부 상태 및 행위자 정보를 관리함.
81
108
  */
82
- export interface ContractAgreement {
83
- /** 구매업체(기업) 약관 기록 */
84
- seller?: Agreement;
85
- /** 판매업체(표준사업장) 약관 기록 */
86
- buyer?: Agreement;
109
+ export interface DeliveryStateSet {
110
+ /**
111
+ * 납기 생성 및 요청자 (표준사업장)
112
+ */
113
+ created?: StateActor;
114
+ /**
115
+ * 입고 승인자 (기업)
116
+ */
117
+ approved?: StateActor;
118
+ /** (internal) updated count */
119
+ ticks?: number;
120
+ /** (internal) last updated time */
121
+ updatedAt?: number;
87
122
  }
88
123
  export default $LUT;
@@ -32,11 +32,15 @@ export interface ContractBody extends Body, Partial<ContractView> {
32
32
  * type: `DeliveryView`
33
33
  * - usually same as post's body.
34
34
  */
35
- export interface DeliveryView extends View, Omit<Partial<DeliveryModel>, 'contract$'> {
35
+ export interface DeliveryView extends View, Omit<Partial<DeliveryModel>, 'contract$' | 'deal$'> {
36
36
  /**
37
37
  * (readonly) 계약서 정보
38
38
  */
39
39
  readonly contract$?: ContractView;
40
+ /**
41
+ * (readonly) 매칭 정보
42
+ */
43
+ readonly deal$?: DealView;
40
44
  }
41
45
  /**
42
46
  * type: `DeliveryBody`
@@ -87,6 +87,10 @@ export interface DealModel extends DealHead, Model {
87
87
  */
88
88
  sellerSiteId?: string;
89
89
  sellerSite$?: SiteHead;
90
+ /**
91
+ * (optional) 계약서(contract) ID
92
+ */
93
+ contractId?: string;
90
94
  /** 전체 상태 */
91
95
  status?: DealStatus;
92
96
  /** 상태 순서 (1-7) */
@@ -71,6 +71,8 @@ export interface ItemModel extends ItemHead, Model {
71
71
  images?: string[];
72
72
  /** tags string */
73
73
  tags?: string[];
74
+ /** keywords string */
75
+ keywords?: string[];
74
76
  /** description string */
75
77
  desc?: string;
76
78
  /** memo string */
@@ -60,5 +60,24 @@ export declare type ModelType = keyof typeof $LUT.ModelType;
60
60
  * type: `LanguageType`
61
61
  */
62
62
  export declare type LanguageType = keyof typeof $LUT.Languages;
63
+ /**
64
+ * type: `StateActor`
65
+ * - 모델의 상태(State)를 변경한 행위자 (Actor) 정보
66
+ * - 세션으로부터 초기화됨
67
+ */
68
+ export interface StateActor {
69
+ /** id of actor (:= uid) */
70
+ uid?: string;
71
+ /** name of actor */
72
+ userName?: string;
73
+ /** name of dept */
74
+ deptName?: string;
75
+ /** id of site (!= sid) */
76
+ sid?: string;
77
+ /** name of site */
78
+ siteName?: string;
79
+ /** 처리 시각 (requestedAt, approvedAt, rejectedAt...) */
80
+ processedAt?: number;
81
+ }
63
82
  /** must export $LUT as default */
64
83
  export default $LUT;