修改部分规则模块删除无用前端 新增前端界面
This commit is contained in:
36
modeler/src/types/core.ts
Normal file
36
modeler/src/types/core.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
|
||||
export type NullableString = null | string
|
||||
|
||||
// 定义后端响应数据的通用接口
|
||||
export interface BasicResponse {
|
||||
code: number;
|
||||
msg: NullableString;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface ApiDataResponse<T = any> extends BasicResponse {
|
||||
code: number;
|
||||
msg: NullableString;
|
||||
data: T;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
|
||||
export interface PageableResponse<T = any> extends BasicResponse {
|
||||
code: number;
|
||||
msg: NullableString;
|
||||
total: number;
|
||||
rows: T[];
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
11
modeler/src/types/index.ts
Normal file
11
modeler/src/types/index.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
|
||||
export * from './core'
|
||||
export * from './user'
|
||||
39
modeler/src/types/user.ts
Normal file
39
modeler/src/types/user.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* This file is part of the kernelstudio package.
|
||||
*
|
||||
* (c) 2014-2025 zlin <admin@kernelstudio.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE file
|
||||
* that was distributed with this source code.
|
||||
*/
|
||||
import type { BasicResponse } from './core';
|
||||
|
||||
export interface UserLoginForm {
|
||||
username: string;
|
||||
password: string;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface UserLoginResult extends BasicResponse {
|
||||
token: string;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface SessionUser {
|
||||
userId: number;
|
||||
userName: string | null;
|
||||
avatar: string | null;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
export interface UserSessionResult extends BasicResponse {
|
||||
|
||||
user: SessionUser;
|
||||
roles: string[];
|
||||
permissions: string[];
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
Reference in New Issue
Block a user