update api

This commit is contained in:
Timi
2026-08-07 19:44:42 +08:00
parent f0ba55fe25
commit e5473eb499
4 changed files with 18 additions and 13 deletions
+5 -8
View File
@@ -1,21 +1,19 @@
import type { ModuleCode, Permission } from "./Permission";
import { Model } from "./Model";
export interface Role {
id: string;
export type Role = {
moduleCode: ModuleCode;
code: string;
nameLangId?: string;
name?: string;
description?: string;
permissionList?: Permission[];
allPermissionList?: Permission[];
childRoleList?: Role[];
permissionIdList?: string[];
childRoleIdList?: string[];
createdAt?: number;
updatedAt?: number;
deletedAt?: number;
}
} & Model;
export type RolePayload = Pick<Role, "moduleCode" | "code" | "nameLangId" | "name" | "description"> & {
id?: string;
@@ -23,9 +21,8 @@ export type RolePayload = Pick<Role, "moduleCode" | "code" | "nameLangId" | "nam
childRoleIdList?: string[];
};
export interface UserRoleAuthorizeReq {
export interface AuthorizeUserRole {
userId: string;
moduleCode?: ModuleCode;
roleIdList?: string[];
roleCodeList?: string[];
}
+6 -1
View File
@@ -1,6 +1,9 @@
import { ImageType, Model } from "./Model";
import { Attachment } from "./Attachment";
import type { Setting } from "./Setting";
import { Role } from "./Role";
export type Gender = "MALE" | "FEMALE";
export type User = {
name: string;
@@ -13,7 +16,7 @@ export type User = {
wrapperType?: ImageType;
avatarType?: ImageType;
exp?: number;
sex?: number;
gender?: Gender;
birthdate?: number;
qq?: string;
description?: string;
@@ -21,7 +24,9 @@ export type User = {
lastLoginAt?: number;
unmuteAt?: number;
unbanAt?: number;
roleList?: string[];
roleEntityList?: Role[];
permissionList?: string[];
attachmentList?: Attachment[];
settingList?: Setting[];