-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_files.bat
More file actions
45 lines (43 loc) · 968 Bytes
/
setup_files.bat
File metadata and controls
45 lines (43 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
REM Create directories
mkdir "C:\Users\Ni0daunn\Desktop\work\EzMonitor\app\monitor-app\src\types" 2>nul
mkdir "C:\Users\Ni0daunn\Desktop\work\EzMonitor\app\monitor-app\src\api" 2>nul
REM Create api.ts
(
echo /**
echo * API 响应通用结构
echo */
echo export interface ApiResponse^<T = any^> {
echo code: number;
echo message: string;
echo data: T;
echo }
echo.
echo /**
echo * 分页请求参数
echo */
echo export interface PaginationParams {
echo page: number;
echo pageSize: number;
echo }
echo.
echo /**
echo * 分页响应数据
echo */
echo export interface PaginationResponse^<T = any^> {
echo list: T[];
echo total: number;
echo page: number;
echo pageSize: number;
echo }
echo.
echo /**
echo * API 错误响应
echo */
echo export interface ApiError {
echo code: number;
echo message: string;
echo details?: any;
echo }
) > "C:\Users\Ni0daunn\Desktop\work\EzMonitor\app\monitor-app\src\types\api.ts"
echo Done