feat: 권한관리 권한맵핑 작업

This commit is contained in:
2025-06-10 16:54:21 +09:00
parent 597acfdba7
commit d86f56ed7e
5 changed files with 83 additions and 25 deletions
@@ -7,6 +7,12 @@ export interface RoleAuthorizationsParams extends PageableParams {
authorizationNo?: string;
}
export interface WithRoleIdRoleAuthorizationsParams extends PageableParams {
keywordType?: string;
keyword?: string;
roleId?: string;
}
export interface RoleAuthorizations {
roleId: string;
roleName: string;
@@ -16,6 +22,16 @@ export interface RoleAuthorizations {
authYn: string;
}
export interface RoleAuthorizationsByRoleId {
roleId: string;
authorizationNo: number;
authorizationName: string;
urlPatternValue: string;
httpMethodCode: string;
sortSeq: number;
createdAt: boolean;
}
export const roleAuthorizationsSchema = z.object({
roleId: z.string(),
authorizationNo: z.number(),
@@ -27,6 +43,8 @@ export const roleAuthorizationsFormSchema = z.object({
});
export type RoleAuthorizationsList = PageableList<RoleAuthorizations>;
export type RoleAuthorizationsByRoleIdList =
PageableList<RoleAuthorizationsByRoleId>;
export type RoleAuthorizationsData = z.infer<typeof roleAuthorizationsSchema>[];
export type RoleAuthorizationsFormData = z.infer<
typeof roleAuthorizationsFormSchema
@@ -36,6 +54,9 @@ export interface RoleAuthorizationsService {
getRoleAuthorizationsList: (
params: RoleAuthorizationsParams,
) => Promise<RoleAuthorizationsList>;
getRoleAuthorizationsListByRoleId: (
params: WithRoleIdRoleAuthorizationsParams,
) => Promise<RoleAuthorizationsByRoleIdList>;
createRoleAuthorizations: (
data: RoleAuthorizationsData,
) => Promise<RoleAuthorizations>;