mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-25 08:00:56 +00:00
feat: first-commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
// * 请求响应参数(不包含data)
|
||||
export interface Result {
|
||||
code: number;
|
||||
message: string;
|
||||
}
|
||||
|
||||
// * 请求响应参数(包含data)
|
||||
export interface ResultData<T> {
|
||||
code: number;
|
||||
message: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
// * 分页响应参数
|
||||
export interface ResPage<T> {
|
||||
items: T[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
// * 分页请求参数
|
||||
export interface ReqPage {
|
||||
page: number;
|
||||
pageSize: number;
|
||||
}
|
||||
export interface CommonModel {
|
||||
id: number;
|
||||
CreatedAt?: string;
|
||||
UpdatedAt?: string;
|
||||
}
|
||||
|
||||
// * 登录模块
|
||||
export namespace Login {
|
||||
export interface ReqLoginForm {
|
||||
name: string;
|
||||
password: string;
|
||||
captcha: string;
|
||||
captchaID: string;
|
||||
authMethod: string;
|
||||
}
|
||||
export interface ResLogin {
|
||||
name: string;
|
||||
token: string;
|
||||
}
|
||||
export interface ResCaptcha {
|
||||
imagePath: string;
|
||||
captchaID: string;
|
||||
captchaLength: number;
|
||||
}
|
||||
export interface ResAuthButtons {
|
||||
[propName: string]: any;
|
||||
}
|
||||
}
|
||||
// * 文件上传模块
|
||||
export namespace Upload {
|
||||
export interface ResFileUrl {
|
||||
fileUrl: string;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { DateTimeFormats } from '@intlify/core-base';
|
||||
|
||||
export interface ResOperationLog {
|
||||
id: number;
|
||||
group: string;
|
||||
source: string;
|
||||
action: string;
|
||||
ip: string;
|
||||
path: string;
|
||||
method: string;
|
||||
userAgent: string;
|
||||
body: string;
|
||||
resp: string;
|
||||
|
||||
status: number;
|
||||
latency: number;
|
||||
errorMessage: string;
|
||||
|
||||
detail: string;
|
||||
createdAt: DateTimeFormats;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { CommonModel, ReqPage } from '.';
|
||||
|
||||
export namespace User {
|
||||
export interface User extends CommonModel {
|
||||
name: string;
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
export interface UserCreate {
|
||||
username: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
export interface ReqGetUserParams extends ReqPage {
|
||||
name?: string;
|
||||
email?: string;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user