update permission

This commit is contained in:
Timi
2026-08-11 12:02:38 +08:00
parent e5473eb499
commit bb1fdb5547
4 changed files with 100 additions and 4 deletions
+7
View File
@@ -7,11 +7,18 @@ export interface Permission {
nameLangId?: string;
name?: string;
description?: string;
builtin?: boolean;
protectedPermission?: boolean;
ownerType?: AuthOwnerType;
ownerId?: string;
createdBy?: string;
createdAt?: number;
updatedAt?: number;
deletedAt?: number;
}
export type AuthOwnerType = "SYSTEM" | "MODULE" | "TENANT" | "STORE" | "USER";
export type PermissionPayload = Pick<Permission, "moduleCode" | "code" | "nameLangId" | "name" | "description"> & {
id?: string;
};
+15 -2
View File
@@ -1,4 +1,4 @@
import type { ModuleCode, Permission } from "./Permission";
import type { AuthOwnerType, ModuleCode, Permission } from "./Permission";
import { Model } from "./Model";
export type Role = {
@@ -7,18 +7,31 @@ export type Role = {
nameLangId?: string;
name?: string;
description?: string;
builtin?: boolean;
protectedRole?: boolean;
parentRoleId?: string;
ownerType?: AuthOwnerType;
ownerId?: string;
createdBy?: string;
permissionList?: Permission[];
allPermissionList?: Permission[];
childRoleList?: Role[];
parentRole?: Role;
delegationPermissionList?: Permission[];
permissionIdList?: string[];
childRoleIdList?: string[];
delegationPermissionIdList?: string[];
} & Model;
export type RolePayload = Pick<Role, "moduleCode" | "code" | "nameLangId" | "name" | "description"> & {
export type RolePayload = Partial<Pick<Role, "moduleCode" | "code" | "nameLangId" | "name" | "description">> & {
id?: string;
parentRoleId?: string;
ownerType?: AuthOwnerType;
ownerId?: string;
permissionIdList?: string[];
childRoleIdList?: string[];
delegationPermissionIdList?: string[];
};
export interface AuthorizeUserRole {