@lemoncloud/clipbiz-goods-api 0.25.1125 → 0.25.1126

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, ContractAgreement, ContractStateSet, DeliveryStateSet } 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 */
@@ -116,10 +118,16 @@ export interface DeliveryModel extends DeliveryHead, Model {
116
118
  stereo?: DeliveryStereo;
117
119
  /** state of model */
118
120
  state?: DeliveryState;
121
+ /** complex state */
122
+ state$?: DeliveryStateSet;
119
123
  /** (linked) id of contract */
120
124
  contractId?: string;
121
125
  /** (linked) partial of contract */
122
126
  contract$?: ContractHead;
127
+ /** (linked) id of deal */
128
+ dealId?: string;
129
+ /** (linked) partial of deal */
130
+ deal$?: DealHead;
123
131
  /** (internal) 납기 번호 (:= Contract.deliveryNo) */
124
132
  no?: number;
125
133
  /** 납기 수량 */
@@ -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,16 @@ declare const $LUT: {
23
24
  /** ContractState */
24
25
  ContractState: {
25
26
  '': string;
27
+ /** draft: 임시저장 */
26
28
  draft: string;
29
+ /** pending: 대기 */
27
30
  pending: string;
28
- approved: string;
29
- active: string;
31
+ /** confirmed: 확정 */
32
+ confirmed: string;
33
+ /** completed: 완료 */
30
34
  completed: string;
31
- expired: string;
35
+ /** rejected: 반려 */
32
36
  rejected: string;
33
- cancelled: string;
34
37
  };
35
38
  /** DeliveryStereo */
36
39
  DeliveryStereo: {
@@ -39,6 +42,10 @@ declare const $LUT: {
39
42
  /** DeliveryState */
40
43
  DeliveryState: {
41
44
  '': string;
45
+ /** pending: 대기 */
46
+ pending: string;
47
+ /** confirmed: 입고 */
48
+ confirmed: string;
42
49
  };
43
50
  };
44
51
  /**
@@ -85,4 +92,44 @@ export interface ContractAgreement {
85
92
  /** 판매업체(표준사업장) 약관 기록 */
86
93
  buyer?: Agreement;
87
94
  }
95
+ /**
96
+ * type: `ContractStateSet`
97
+ * - 계약서의 세부 상태 및 행위자 정보를 관리함.
98
+ */
99
+ export interface ContractStateSet {
100
+ /**
101
+ * 계약서 생성 및 요청자 (기업회원)
102
+ */
103
+ created?: StateActor;
104
+ /**
105
+ * 계약서 승인자 (표준사업장)
106
+ */
107
+ approved?: StateActor;
108
+ /**
109
+ * 계약서 반려자 (표준사업장)
110
+ */
111
+ rejected?: StateActor;
112
+ /** (internal) updated count */
113
+ ticks?: number;
114
+ /** (internal) last updated time */
115
+ updatedAt?: number;
116
+ }
117
+ /**
118
+ * type: `DeliveryStateSet`
119
+ * - 납기(Delivery)의 세부 상태 및 행위자 정보를 관리함.
120
+ */
121
+ export interface DeliveryStateSet {
122
+ /**
123
+ * 납기 생성 및 요청자 (표준사업장)
124
+ */
125
+ created?: StateActor;
126
+ /**
127
+ * 입고 승인자 (기업)
128
+ */
129
+ approved?: StateActor;
130
+ /** (internal) updated count */
131
+ ticks?: number;
132
+ /** (internal) last updated time */
133
+ updatedAt?: number;
134
+ }
88
135
  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) */
@@ -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;