update api
This commit is contained in:
+5
-8
@@ -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
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user