refactor: 补全类型定义

This commit is contained in:
AN 2025-06-05 11:16:58 +08:00
parent aa0fe7f056
commit 9cdbf81467
3 changed files with 36 additions and 24 deletions

View File

@ -10,6 +10,9 @@ declare namespace Api {
* backend api module: "monitor"
*/
namespace Monitor {
/** 业务操作类型 */
type BusinessType = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
/** oper log */
type OperLog = Common.CommonRecord<{
/** 日志主键 */
@ -19,13 +22,13 @@ declare namespace Api {
/** 系统模块 */
title: string;
/** 操作类型 */
businessType: number;
businessType: Monitor.BusinessType;
/** 方法名称 */
method: string;
/** 请求方式 */
requestMethod: string;
/** 操作类别 */
operatorType: number;
operatorType: string;
/** 操作人员 */
operName: string;
/** 部门名称 */
@ -41,7 +44,7 @@ declare namespace Api {
/** 返回参数 */
jsonResult: string;
/** 操作状态 */
status: number;
status: Common.EnableStatus;
/** 错误消息 */
errorMsg: string;
/** 操作时间 */
@ -70,7 +73,7 @@ declare namespace Api {
/** 客户端 */
clientKey: string;
/** 设备类型 */
deviceType: string;
deviceType: System.DeviceType;
/** 登录IP地址 */
ipaddr: string;
/** 登录地点 */
@ -80,7 +83,7 @@ declare namespace Api {
/** 操作系统 */
os: string;
/** 登录状态0成功 1失败 */
status: string;
status: Common.EnableStatus;
/** 提示消息 */
msg: string;
/** 访问时间 */
@ -149,7 +152,7 @@ declare namespace Api {
/** 所在部门 */
deptName: string;
/** 设备类型 */
deviceType: string;
deviceType: System.DeviceType;
/** 登录时间 */
loginTime: number;
/** 令牌ID */

View File

@ -34,7 +34,7 @@ declare namespace Api {
/** 显示顺序 */
roleSort: number;
/** 角色状态0正常 1停用 */
status: string;
status: Common.EnableStatus;
/** 是否管理员 */
superAdmin: boolean;
}>;
@ -115,7 +115,7 @@ declare namespace Api {
/** 密码 */
password: string;
/** 帐号状态0正常 1停用 */
status: string;
status: Common.EnableStatus;
/** 最后登录IP */
loginIp: string;
/** 最后登录时间 */
@ -356,7 +356,7 @@ declare namespace Api {
/** 字典键值 */
dictValue: string;
/** 是否默认Y是 N否 */
isDefault: string;
isDefault: Common.YesOrNoStatus;
/** 表格回显样式 */
listClass: NaiveUI.ThemeColor;
/** 备注 */
@ -402,7 +402,7 @@ declare namespace Api {
/** 邮箱 */
email: string;
/** 部门状态0正常 1停用 */
status: string;
status: Common.EnableStatus;
/** 子部门 */
children: Dept[];
}>;
@ -440,7 +440,7 @@ declare namespace Api {
/** 显示顺序 */
postSort: number;
/** 状态0正常 1停用 */
status: string;
status: Common.EnableStatus;
/** 备注 */
remark: string;
}>;
@ -476,7 +476,7 @@ declare namespace Api {
/** 参数键值 */
configValue: string;
/** 是否内置 */
configType: string;
configType: Common.YesOrNoStatus;
/** 备注 */
remark: string;
}>;
@ -523,7 +523,7 @@ declare namespace Api {
/** 用户数量(-1不限制 */
accountCount: number;
/** 租户状态0正常 1停用 */
status: string;
status: Common.EnableStatus;
/** 删除标志0代表存在 1代表删除 */
delFlag: string;
}>;
@ -577,7 +577,7 @@ declare namespace Api {
/** 菜单树选择项是否关联显示 */
menuCheckStrictly: boolean;
/** 状态0正常 1停用 */
status: string;
status: Common.EnableStatus;
/** 删除标志0代表存在 1代表删除 */
delFlag: string;
}>;
@ -602,6 +602,9 @@ declare namespace Api {
/** tenant package select list */
type TenantPackageSelectList = Common.CommonRecord<Pick<TenantPackage, 'packageId' | 'packageName'>>;
/** 通知公告类型 */
type NoticeType = '1' | '2';
/** notice */
type Notice = Common.CommonRecord<{
/** 公告ID */
@ -611,11 +614,11 @@ declare namespace Api {
/** 公告标题 */
noticeTitle: string;
/** 公告类型 */
noticeType: string;
noticeType: System.NoticeType;
/** 公告内容 */
noticeContent: string;
/** 公告状态 */
status: string;
status: Common.EnableStatus;
/** 创建者 */
createByName: string;
/** 备注 */
@ -635,6 +638,12 @@ declare namespace Api {
/** notice list */
type NoticeList = Api.Common.PaginatingQueryRecord<Notice>;
/** 授权类型 */
type GrantType = 'password' | 'sms' | 'password' | 'email' | 'xcx' | 'social';
/** 设备类型 */
type DeviceType = 'pc' | 'android' | 'ios' | 'xcx';
/** client */
type Client = Common.CommonRecord<{
/** id */
@ -646,17 +655,17 @@ declare namespace Api {
/** 客户端秘钥 */
clientSecret: string;
/** 授权类型 */
grantType: string;
grantType: System.GrantType;
/** 授权类型列表 */
grantTypeList: string[];
grantTypeList: System.GrantType[];
/** 设备类型 */
deviceType: string;
deviceType: System.DeviceType;
/** token活跃超时时间 */
activeTimeout: number;
/** token固定超时 */
timeout: number;
/** 状态 */
status: string;
status: Common.EnableStatus;
/** 删除标志0代表存在 1代表删除 */
delFlag: string;
}>;
@ -758,13 +767,13 @@ declare namespace Api {
/** 自定义域名 */
domain: string;
/** 是否httpsY=是,N=否) */
isHttps: Api.Common.YesOrNoStatus;
isHttps: Common.YesOrNoStatus;
/** 域 */
region: string;
/** 桶权限类型 */
accessPolicy: Api.System.OssAccessPolicy;
accessPolicy: System.OssAccessPolicy;
/** 是否默认0=是,1=否) */
status: Api.Common.EnableStatus;
status: Common.EnableStatus;
/** 扩展字段 */
ext1: string;
/** 备注 */

View File

@ -47,7 +47,7 @@ function createDefaultModel(): Model {
configName: '',
configKey: '',
configValue: '',
configType: '',
configType: 'Y',
remark: ''
};
}