@axboot-mcp/mcp-server 1.0.0 → 1.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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.6",
|
|
7
7
|
"description": "Axboot MCP Server - Store 생성 및 다른 기능 확장 가능",
|
|
8
8
|
"main": "./dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@axboot-mcp/mcp-server": "^1.0.1",
|
|
30
31
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
31
32
|
"chokidar": "^5.0.0",
|
|
32
33
|
"glob": "^13.0.0",
|
|
@@ -0,0 +1,570 @@
|
|
|
1
|
+
# MCP 명령어 사용 가이드
|
|
2
|
+
|
|
3
|
+
이 문서는 NH-FE-B 프로젝트에서 MCP(Model Context Protocol)를 사용하여 SearchParams와 ListDataGrid를 자동 생성하는 방법을 안내합니다.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 목차
|
|
8
|
+
|
|
9
|
+
1. [케이스 1: SearchParams 생성 (검색 영역)](#케이스-1-searchparams-생성-검색-영역)
|
|
10
|
+
2. [케이스 2: ListDataGrid 생성 (목록 테이블)](#케이스-2-listdatagrid-생성-목록-테이블)
|
|
11
|
+
3. [케이스 3: 완전한 화면 생성 (검색 + 목록)](#케이스-3-완전한-화면-생성-검색-목록)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 케이스 1: SearchParams 생성 (검색 영역)
|
|
16
|
+
|
|
17
|
+
### 개요
|
|
18
|
+
|
|
19
|
+
페이지 상단의 **검색 조건 영역**을 자동 생성합니다. App.tsx 파일을 수정하여 `<PageSearchBar>` 컴포넌트를 추가합니다.
|
|
20
|
+
|
|
21
|
+
### 명령어
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
axboot_generate_search_params
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 파라미터
|
|
28
|
+
|
|
29
|
+
| 파라미터 | 타입 | 필수 | 설명 |
|
|
30
|
+
|---------|------|:----:|------|
|
|
31
|
+
| `searchDtoPath` | string | ✓ | 검색용 DTO 파일 경로 (절대 경로) |
|
|
32
|
+
| `appPath` | string | ✗ | App.tsx 경로 (자동 감지됨) |
|
|
33
|
+
| `searchParams` | object | ✗ | 수동 설정 (DTO 사용 시 불필요) |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### 예시 1: 기본 검색 (날짜 범위)
|
|
38
|
+
|
|
39
|
+
**DTO:** `BannerSearch.ts`
|
|
40
|
+
```typescript
|
|
41
|
+
export interface BannerSearch extends Request {
|
|
42
|
+
fromDate?: string; // 등록일 시작
|
|
43
|
+
toDate?: string; // 등록일 종료
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**요청:**
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BannerSearch.ts"
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**결과:** App.tsx에 날짜 범위 검색이 추가됨
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### 예시 2: 코드 선택 포함
|
|
59
|
+
|
|
60
|
+
**DTO:** `ProductSearch.ts`
|
|
61
|
+
```typescript
|
|
62
|
+
export interface ProductSearch extends Request {
|
|
63
|
+
categoryCd?: string; // 카테고리 코드
|
|
64
|
+
useYn?: string; // 사용여부
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**요청:**
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/ProductSearch.ts"
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**결과:**
|
|
76
|
+
- 카테고리 셀렉트박스 추가
|
|
77
|
+
- 사용여부 라디오 버튼 추가
|
|
78
|
+
- CodeModel에 `CATEGORYCD` 자동 추가
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### 예시 3: 복합 검색 조건
|
|
83
|
+
|
|
84
|
+
**DTO:** `OrderSearch.ts`
|
|
85
|
+
```typescript
|
|
86
|
+
export interface OrderSearch extends Request {
|
|
87
|
+
orderDateFrom?: string; // 주문일 시작
|
|
88
|
+
orderDateTo?: string; // 주문일 종료
|
|
89
|
+
orderStatusCd?: string; // 주문상태 코드
|
|
90
|
+
paymentTypeCd?: string; // 결제수단 코드
|
|
91
|
+
useYn?: string; // 사용여부
|
|
92
|
+
searchText?: string; // 검색어
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**요청:**
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/OrderSearch.ts"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**결과:**
|
|
104
|
+
- 날짜 범위 (주문일)
|
|
105
|
+
- 코드 선택 (주문상태, 결제수단)
|
|
106
|
+
- Y/N 라디오 (사용여부)
|
|
107
|
+
- 검색어 입력
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
### 예시 4: 수동 설정
|
|
112
|
+
|
|
113
|
+
**요청:**
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"appPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/banner/App.tsx",
|
|
117
|
+
"searchParams": {
|
|
118
|
+
"dateRange": {
|
|
119
|
+
"label": "등록일",
|
|
120
|
+
"presetType": "all"
|
|
121
|
+
},
|
|
122
|
+
"codes": [
|
|
123
|
+
{
|
|
124
|
+
"name": "statusCd",
|
|
125
|
+
"label": "상태",
|
|
126
|
+
"codeVar": "STATUS_CODE",
|
|
127
|
+
"width": 150
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"search": {
|
|
131
|
+
"withSearchType": false,
|
|
132
|
+
"textName": "searchText"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
### 자동 감지 필드 규칙
|
|
141
|
+
|
|
142
|
+
| 필드 패턴 | 감지 결과 |
|
|
143
|
+
|-----------|----------|
|
|
144
|
+
| `fromDate`, `toDate`, `regDtFrom`, `regDtTo` | 날짜 범위 |
|
|
145
|
+
| `xxxTpcd`, `xxxClcd`, `xxxCd` (2글자 이상) | 코드 선택 |
|
|
146
|
+
| `xxxYn` | Y/N 라디오 |
|
|
147
|
+
| `searchText`, `keyword`, `xxxText` | 검색어 입력 |
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## 케이스 2: ListDataGrid 생성 (목록 테이블)
|
|
152
|
+
|
|
153
|
+
### 개요
|
|
154
|
+
|
|
155
|
+
목록 **테이블 컬럼**을 자동 생성합니다. `ListDataGrid.tsx` 파일을 새로 생성합니다.
|
|
156
|
+
|
|
157
|
+
### 명령어
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
axboot_generate_listdatagrid
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### 파라미터
|
|
164
|
+
|
|
165
|
+
| 파라미터 | 타입 | 필수 | 설명 |
|
|
166
|
+
|---------|------|:----:|------|
|
|
167
|
+
| `outputPath` | string | ✓ | 생성할 파일 경로 (절대 경로) |
|
|
168
|
+
| `responseDtoPath` | string | ✓ | 목록용 DTO 파일 경로 |
|
|
169
|
+
| `storeName` | string | ✓ | Zustand Store 이름 |
|
|
170
|
+
| `rowKey` | string | ✓ | 행 키 (예: uuid, id) |
|
|
171
|
+
| `config` | object | ✗ | 수동 설정 (DTO 사용 시 불필요) |
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
### 예시 1: 기본 목록
|
|
176
|
+
|
|
177
|
+
**DTO:** `BannerRes.ts`
|
|
178
|
+
```typescript
|
|
179
|
+
export interface BannerRes extends Response {
|
|
180
|
+
uuid: string;
|
|
181
|
+
title: string;
|
|
182
|
+
statusCd: string;
|
|
183
|
+
useYn: string;
|
|
184
|
+
regDt: string;
|
|
185
|
+
regUser: string;
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**요청:**
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/banner/ListDataGrid.tsx",
|
|
193
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BannerRes.ts",
|
|
194
|
+
"storeName": "useBannerStore",
|
|
195
|
+
"rowKey": "uuid"
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
**결과:**
|
|
200
|
+
```typescript
|
|
201
|
+
// 자동 생성된 컬럼
|
|
202
|
+
{ key: "uuid", label: t("번호"), type: "rowNo" }
|
|
203
|
+
{ key: "title", label: t("Title"), type: "title", align: "left", width: 200 }
|
|
204
|
+
{ key: "statusCd", label: t("Status"), type: "custom", codeVar: "STATUSCD", width: 120 }
|
|
205
|
+
{ key: "useYn", label: t("Use"), type: "selectable", align: "center", width: 80 }
|
|
206
|
+
{ key: "regDt", label: t("Reg"), type: "date", align: "center", width: 100 }
|
|
207
|
+
{ key: "regUser", label: t("RegUser"), type: "user", align: "left", width: 100 }
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
### 예시 2: 금액/날짜 포함 목록
|
|
213
|
+
|
|
214
|
+
**DTO:** `OrderRes.ts`
|
|
215
|
+
```typescript
|
|
216
|
+
export interface OrderRes extends Response {
|
|
217
|
+
orderNo: string;
|
|
218
|
+
orderDate: string;
|
|
219
|
+
customerName: string;
|
|
220
|
+
orderAmt: number;
|
|
221
|
+
paymentTypeCd: string;
|
|
222
|
+
orderStatusCd: string;
|
|
223
|
+
regDttm: string;
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**요청:**
|
|
228
|
+
```json
|
|
229
|
+
{
|
|
230
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/order/ListDataGrid.tsx",
|
|
231
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/OrderRes.ts",
|
|
232
|
+
"storeName": "useOrderStore",
|
|
233
|
+
"rowKey": "orderNo"
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**결과:**
|
|
238
|
+
- `orderDate` → `date` 타입 (날짜)
|
|
239
|
+
- `orderAmt` → `money` 타입 (금액, 우측 정렬)
|
|
240
|
+
- `regDttm` → `dateTime` 타입 (날짜시간)
|
|
241
|
+
- `paymentTypeCd`, `orderStatusCd` → 코드 변환
|
|
242
|
+
- `customerName` → `user` 타입
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### 예시 3: 이미지 포함 목록
|
|
247
|
+
|
|
248
|
+
**DTO:** `ProductRes.ts`
|
|
249
|
+
```typescript
|
|
250
|
+
export interface ProductRes extends Response {
|
|
251
|
+
prdCd: string;
|
|
252
|
+
prdName: string;
|
|
253
|
+
thumbImage: string;
|
|
254
|
+
listImage: string;
|
|
255
|
+
price: number;
|
|
256
|
+
displayYn: string;
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**요청:**
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/product/ListDataGrid.tsx",
|
|
264
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/ProductRes.ts",
|
|
265
|
+
"storeName": "useProductStore",
|
|
266
|
+
"rowKey": "prdCd"
|
|
267
|
+
}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**결과:**
|
|
271
|
+
- `thumbImage` → `ThumbPreview` (썸네일)
|
|
272
|
+
- `listImage` → `ImagePreview` (이미지 프리뷰)
|
|
273
|
+
- `price` → `money` 타입
|
|
274
|
+
- `displayYn` → `selectable` 타입
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
### 예시 4: 게시판 스타일
|
|
279
|
+
|
|
280
|
+
**DTO:** `BoardRes.ts`
|
|
281
|
+
```typescript
|
|
282
|
+
export interface BoardRes extends Response {
|
|
283
|
+
bbsNo: string;
|
|
284
|
+
bbsTitle: string;
|
|
285
|
+
bbsTypeCd: string;
|
|
286
|
+
noticeYn: string;
|
|
287
|
+
fileCount: number;
|
|
288
|
+
readCount: number;
|
|
289
|
+
regDt: string;
|
|
290
|
+
regUser: string;
|
|
291
|
+
}
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**요청:**
|
|
295
|
+
```json
|
|
296
|
+
{
|
|
297
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/board/ListDataGrid.tsx",
|
|
298
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BoardRes.ts",
|
|
299
|
+
"storeName": "useBoardStore",
|
|
300
|
+
"rowKey": "bbsNo"
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**결과:**
|
|
305
|
+
- `bbsTitle` → `bbsTitle` 타입 (제목 + 파일 유형 표시)
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
### 예시 5: 옵션 추가 (엑셀, 삭제, 복사)
|
|
310
|
+
|
|
311
|
+
**요청:**
|
|
312
|
+
```json
|
|
313
|
+
{
|
|
314
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/banner/ListDataGrid.tsx",
|
|
315
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BannerRes.ts",
|
|
316
|
+
"storeName": "useBannerStore",
|
|
317
|
+
"rowKey": "uuid",
|
|
318
|
+
"config": {
|
|
319
|
+
"withFormHeader": true,
|
|
320
|
+
"withExcel": true,
|
|
321
|
+
"withDelete": true,
|
|
322
|
+
"withCopy": true,
|
|
323
|
+
"selectionMode": "single",
|
|
324
|
+
"onClickType": "modal"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
### 자동 감지 컬럼 타입
|
|
332
|
+
|
|
333
|
+
| 필드 패턴 | 컬럼 타입 | 정렬 | 너비 |
|
|
334
|
+
|-----------|----------|------|------|
|
|
335
|
+
| `xxxDt`, `xxxDate` | `date` | center | 100 |
|
|
336
|
+
| `xxxDttm`, `xxxDateTime` | `dateTime` | center | 140 |
|
|
337
|
+
| `xxxAmt`, `xxxPrice`, `xxxCost` | `money` | right | 120 |
|
|
338
|
+
| `xxxYn` | `selectable` | center | 80 |
|
|
339
|
+
| `xxxNm`, `xxxName`, `xxxUser` | `user` | left | 100 |
|
|
340
|
+
| `xxxTpcd`, `xxxClcd`, `xxxCd` | `custom` (코드) | - | 120 |
|
|
341
|
+
| `title`, `subject`, `bbsTitle` | `title`/`bbsTitle` | left | 200 |
|
|
342
|
+
| `xxxImg`, `xxxThumb` | `image` | center | 100 |
|
|
343
|
+
| `content`, `description`, `remark` | `custom` | left | 300 |
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## 케이스 3: 완전한 화면 생성 (검색 + 목록)
|
|
348
|
+
|
|
349
|
+
### 개요
|
|
350
|
+
|
|
351
|
+
검색 영역과 목록 테이블을 모두 생성하여 **완전한 화면**을 만듭니다. 두 명령어를 순서대로 실행합니다.
|
|
352
|
+
|
|
353
|
+
---
|
|
354
|
+
|
|
355
|
+
### 예시 1: 배너 관리 화면
|
|
356
|
+
|
|
357
|
+
**Step 1: SearchParams 생성**
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BannerSearch.ts"
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Step 2: ListDataGrid 생성**
|
|
365
|
+
```json
|
|
366
|
+
{
|
|
367
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/banner/ListDataGrid.tsx",
|
|
368
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BannerRes.ts",
|
|
369
|
+
"storeName": "useBannerStore",
|
|
370
|
+
"rowKey": "uuid"
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
**Step 3: App.tsx에 import 추가**
|
|
375
|
+
```typescript
|
|
376
|
+
import { ListDataGrid } from "./ListDataGrid";
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**결과:** 검색 + 목록 화면 완성
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
### 예시 2: 상품 관리 화면
|
|
384
|
+
|
|
385
|
+
**DTO:**
|
|
386
|
+
- `ProductSearch.ts` (검색용)
|
|
387
|
+
- `ProductRes.ts` (목록용)
|
|
388
|
+
|
|
389
|
+
**Step 1: SearchParams**
|
|
390
|
+
```json
|
|
391
|
+
{
|
|
392
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/ProductSearch.ts"
|
|
393
|
+
}
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
**Step 2: ListDataGrid**
|
|
397
|
+
```json
|
|
398
|
+
{
|
|
399
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/product/ListDataGrid.tsx",
|
|
400
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/ProductRes.ts",
|
|
401
|
+
"storeName": "useProductStore",
|
|
402
|
+
"rowKey": "prdCd",
|
|
403
|
+
"config": {
|
|
404
|
+
"withFormHeader": true,
|
|
405
|
+
"withExcel": true,
|
|
406
|
+
"selectionMode": "single",
|
|
407
|
+
"onClickType": "modal"
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
### 예시 3: 주문 관리 화면
|
|
415
|
+
|
|
416
|
+
**DTO:**
|
|
417
|
+
- `OrderSearch.ts`
|
|
418
|
+
- `OrderRes.ts`
|
|
419
|
+
|
|
420
|
+
**Step 1: SearchParams**
|
|
421
|
+
```json
|
|
422
|
+
{
|
|
423
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/OrderSearch.ts"
|
|
424
|
+
}
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
**Step 2: ListDataGrid**
|
|
428
|
+
```json
|
|
429
|
+
{
|
|
430
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/order/ListDataGrid.tsx",
|
|
431
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/OrderRes.ts",
|
|
432
|
+
"storeName": "useOrderStore",
|
|
433
|
+
"rowKey": "orderNo",
|
|
434
|
+
"config": {
|
|
435
|
+
"selectionMode": "multi",
|
|
436
|
+
"onClickType": "link"
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
---
|
|
442
|
+
|
|
443
|
+
### 예시 4: 게시판 화면
|
|
444
|
+
|
|
445
|
+
**DTO:**
|
|
446
|
+
- `BbsSearch.ts`
|
|
447
|
+
- `BbsRes.ts`
|
|
448
|
+
|
|
449
|
+
**Step 1: SearchParams**
|
|
450
|
+
```json
|
|
451
|
+
{
|
|
452
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BbsSearch.ts"
|
|
453
|
+
}
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
**Step 2: ListDataGrid**
|
|
457
|
+
```json
|
|
458
|
+
{
|
|
459
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/bbs/ListDataGrid.tsx",
|
|
460
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BbsRes.ts",
|
|
461
|
+
"storeName": "useBbsStore",
|
|
462
|
+
"rowKey": "bbsNo",
|
|
463
|
+
"config": {
|
|
464
|
+
"withFormHeader": true,
|
|
465
|
+
"withExcel": true,
|
|
466
|
+
"onClickType": "modal"
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
### 예시 5: 코드 관리 화면
|
|
474
|
+
|
|
475
|
+
**DTO:**
|
|
476
|
+
- `CodeSearch.ts`
|
|
477
|
+
- `CodeRes.ts`
|
|
478
|
+
|
|
479
|
+
**Step 1: SearchParams**
|
|
480
|
+
```json
|
|
481
|
+
{
|
|
482
|
+
"searchDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/CodeSearch.ts"
|
|
483
|
+
}
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
**Step 2: ListDataGrid**
|
|
487
|
+
```json
|
|
488
|
+
{
|
|
489
|
+
"outputPath": "/Users/kyle/Desktop/nh-fe-bo/src/pages/resources/code/ListDataGrid.tsx",
|
|
490
|
+
"responseDtoPath": "/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/CodeRes.ts",
|
|
491
|
+
"storeName": "useCodeStore",
|
|
492
|
+
"rowKey": "cd",
|
|
493
|
+
"config": {
|
|
494
|
+
"withFormHeader": true,
|
|
495
|
+
"withDelete": true,
|
|
496
|
+
"selectionMode": "single",
|
|
497
|
+
"onClickType": "modal"
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## 파라미터 이름 구분
|
|
505
|
+
|
|
506
|
+
| 핸들러 | 파라미터 | 용도 | DTO 예시 |
|
|
507
|
+
|--------|---------|------|----------|
|
|
508
|
+
| `axboot_generate_search_params` | `searchDtoPath` | 검색 조건 생성 | `BannerSearch` |
|
|
509
|
+
| `axboot_generate_listdatagrid` | `responseDtoPath` | 목록 테이블 생성 | `BannerRes` |
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
## 추가 기능
|
|
514
|
+
|
|
515
|
+
### ESLint 자동 실행
|
|
516
|
+
|
|
517
|
+
모든 생성/수정 작업 후 ESLint가 자동으로 실행됩니다.
|
|
518
|
+
|
|
519
|
+
### CodeModel 자동 업데이트
|
|
520
|
+
|
|
521
|
+
코드 필드가 감지되면 `useCodeStore.ts`의 `CodeModel` 인터페이스에 자동 추가됩니다.
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
## 팁
|
|
526
|
+
|
|
527
|
+
1. **DTO 네이밍 컨벤션 따르기**
|
|
528
|
+
- 검색용: `xxxSearch.ts` → `xxxSearch` 인터페이스
|
|
529
|
+
- 목록용: `xxxRes.ts` → `xxxRes` 인터페이스
|
|
530
|
+
|
|
531
|
+
2. **주석 활용**
|
|
532
|
+
- DTO 필드에 주석을 달면 라벨로 사용됩니다
|
|
533
|
+
```typescript
|
|
534
|
+
export interface BannerRes extends Response {
|
|
535
|
+
uuid: string; // UUID
|
|
536
|
+
title: string; // 배너 제목
|
|
537
|
+
statusCd?: string; // 상태
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
3. **rowKey 선택**
|
|
542
|
+
- 주로 `uuid`, `id`, `code` 등 고유값 사용
|
|
543
|
+
- DB 기본키와 일치시키기
|
|
544
|
+
|
|
545
|
+
4. **Store 생성 먼저**
|
|
546
|
+
- `axboot_generate_store_and_hook_interactive`로 Store 생성 후 사용
|
|
547
|
+
|
|
548
|
+
---
|
|
549
|
+
|
|
550
|
+
## 문제 해결
|
|
551
|
+
|
|
552
|
+
### 문제: DTO를 찾을 수 없음
|
|
553
|
+
**해결:** 절대 경로를 사용하세요
|
|
554
|
+
```
|
|
555
|
+
/Users/kyle/Desktop/nh-fe-bo/src/services/@interface/dto/BannerSearch.ts
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### 문제: CodeModel 이미 존재
|
|
559
|
+
**해결:** 이미 존재하는 코드는 건너뜁니다. 안심하세요.
|
|
560
|
+
|
|
561
|
+
### 문제: App.tsx 경로 자동 감지 실패
|
|
562
|
+
**해결:** `appPath` 파라미터로 직접 지정하세요.
|
|
563
|
+
|
|
564
|
+
---
|
|
565
|
+
|
|
566
|
+
## 참고
|
|
567
|
+
|
|
568
|
+
- Store 생성: `axboot_generate_store_and_hook_interactive`
|
|
569
|
+
- SearchParams 패턴: `src/prompts/search-params.md`
|
|
570
|
+
- ListDataGrid 패턴: `src/prompts/listdatagrid-usage.md`
|