ruoyi-plus-soybean/src/typings/api/system.api.d.ts

251 lines
6.3 KiB
TypeScript
Raw Normal View History

2024-08-16 16:33:11 +08:00
/**
* Namespace Api
*
* All backend api type
*/
declare namespace Api {
/**
* namespace System
*
* backend api module: "system"
*/
namespace System {
type CommonSearchParams = Pick<Common.PaginatingCommonParams, 'pageNum' | 'pageSize'>;
/** role */
type Role = Common.CommonRecord<{
2024-09-04 09:11:04 +08:00
/** 数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限 */
dataScope?: string;
/** 部门树选择项是否关联显示 */
deptCheckStrictly?: boolean;
/** 用户是否存在此角色标识 默认不存在 */
flag?: boolean;
/** 菜单树选择项是否关联显示 */
menuCheckStrictly?: boolean;
/** 备注 */
remark?: string;
/** 角色ID */
roleId?: number;
/** 角色权限字符串 */
roleKey?: string;
/** 角色名称 */
roleName?: string;
/** 显示顺序 */
roleSort?: number;
/** 角色状态0正常 1停用 */
status?: string;
/** 是否管理员 */
superAdmin?: boolean;
2024-08-16 16:33:11 +08:00
}>;
/** role search params */
type RoleSearchParams = CommonType.RecordNullable<
Pick<Role, 'roleName' | 'roleKey' | 'status'> & CommonSearchParams
>;
/** role list */
type RoleList = Common.PaginatingQueryRecord<Role>;
/** all role */
type AllRole = Pick<Role, 'roleId' | 'roleName' | 'roleKey'>;
/**
* user gender
*
* - "1": "male"
* - "2": "female"
*/
type UserGender = '1' | '2';
/** user */
2024-09-03 12:19:57 +08:00
type User = Common.CommonTenantRecord<{
/** 用户ID */
userId?: CommonType.IdType;
/** 部门ID */
deptId?: CommonType.IdType;
/** 用户账号 */
userName?: string;
/** 用户昵称 */
nickName?: string;
/** 用户类型sys_user系统用户 */
userType?: string;
/** 用户邮箱 */
email?: string;
/** 手机号码 */
phonenumber?: string;
/** 用户性别0男 1女 2未知 */
sex?: string;
/** 头像地址 */
avatar?: number;
/** 密码 */
password?: string;
/** 帐号状态0正常 1停用 */
status?: string;
/** 删除标志0代表存在 2代表删除 */
delFlag?: string;
/** 最后登录IP */
loginIp?: string;
/** 最后登录时间 */
loginDate?: Date;
/** 备注 */
remark?: string;
2024-08-16 16:33:11 +08:00
}>;
/** user search params */
type UserSearchParams = CommonType.RecordNullable<
Pick<User, 'userName' | 'sex' | 'nickName' | 'phonenumber' | 'email' | 'status'> & CommonSearchParams
>;
/** user list */
type UserList = Common.PaginatingQueryRecord<User>;
2024-09-03 12:19:57 +08:00
/** tenant */
interface Tenant {
/** id */
id?: CommonType.IdType;
/** 租户编号 */
tenantId?: string;
/** 联系人 */
contactUserName?: string;
/** 联系电话 */
contactPhone?: string;
/** 企业名称 */
companyName?: string;
/** 统一社会信用代码 */
licenseNumber?: string;
/** 地址 */
address?: string;
/** 域名 */
domain?: string;
/** 企业简介 */
intro?: string;
/** 备注 */
remark?: string;
/** 租户套餐编号 */
packageId?: number;
/** 过期时间 */
expireTime?: Date;
/** 用户数量(-1不限制 */
accountCount?: number;
/** 租户状态0正常 1停用 */
status?: string;
/** 删除标志0代表存在 2代表删除 */
delFlag: string;
}
/**
* icon type
*
* - "1": iconify icon
* - "2": local icon
*/
type IconType = '1' | '2';
2024-08-16 16:33:11 +08:00
/**
* menu type
*
* - "M": "目录"
* - "C": "菜单"
* - "F": "按钮"
*/
type MenuType = 'M' | 'C' | 'F';
2024-09-03 12:19:57 +08:00
type Menu = Common.CommonRecord<{
/** 菜单 ID */
menuId?: CommonType.IdType;
/** 父菜单 ID */
parentId?: CommonType.IdType;
/** 菜单名称 */
menuName?: string;
/** 显示顺序 */
orderNum?: number;
/** 路由地址 */
path?: string;
/** 组件路径 */
component?: string;
/** 路由参数 */
queryParam?: string;
/** 是否为外链0是 1否 */
isFrame?: Common.YesOrNoStatus;
/** 是否缓存0缓存 1不缓存 */
isCache?: Common.YesOrNoStatus;
/** 菜单类型M目录 C菜单 F按钮 */
menuType?: MenuType;
/** 显示状态0显示 1隐藏 */
visible?: Common.VisibleStatus;
/** 菜单状态0正常 1停用 */
status?: Common.EnableStatus;
/** 权限标识 */
perms?: string;
/** 菜单图标 */
icon?: string;
/** 备注 */
remark?: string;
/** 父菜单名称 */
parentName?: string;
/** 子菜单 */
2024-09-04 09:11:04 +08:00
children?: MenuList;
2024-09-03 12:19:57 +08:00
}>;
2024-08-16 16:33:11 +08:00
/** menu list */
2024-09-04 15:50:09 +08:00
type MenuList = Menu[];
2024-09-03 12:19:57 +08:00
/** menu search params */
type MenuSearchParams = CommonType.RecordNullable<Pick<Menu, 'menuName' | 'status' | 'menuType' | 'parentId'>>;
2024-08-16 16:33:11 +08:00
2024-09-03 12:19:57 +08:00
/** menu operate params */
type MenuOperateParams = Pick<
Menu,
| 'menuId'
| 'menuName'
| 'parentId'
| 'orderNum'
| 'path'
| 'component'
| 'queryParam'
| 'isFrame'
| 'isCache'
| 'menuType'
| 'visible'
| 'status'
| 'perms'
| 'icon'
| 'remark'
>;
2024-09-04 09:11:04 +08:00
2024-09-04 15:50:09 +08:00
/** 字典类型 */
type DictType = Common.CommonRecord<{
/** 字典主键 */
dictId?: number;
/** 字典名称 */
dictName?: string;
/** 字典类型 */
dictType?: string;
/** 备注 */
remark?: string;
}>;
2024-09-04 09:11:04 +08:00
/** 字典数据 */
2024-09-04 15:50:09 +08:00
type DictData = Common.CommonRecord<{
2024-09-04 09:11:04 +08:00
/** 样式属性(其他样式扩展) */
cssClass?: string;
/** 字典编码 */
dictCode?: number;
/** 字典标签 */
dictLabel?: string;
/** 字典排序 */
dictSort?: number;
/** 字典类型 */
dictType?: string;
/** 字典键值 */
dictValue?: string;
/** 是否默认Y是 N否 */
isDefault?: string;
/** 表格回显样式 */
listClass?: string;
/** 备注 */
remark?: string;
}>;
2024-08-16 16:33:11 +08:00
}
}