feat: first-commit

This commit is contained in:
ssongliu
2022-08-17 09:37:30 +08:00
committed by ssongliu
parent c59613cf0e
commit 253015e6ff
241 changed files with 27164 additions and 0 deletions
+58
View File
@@ -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;
}
+18
View File
@@ -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;
}
}