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