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[];
}