rename: authorizations 엔티티 생성
This commit is contained in:
@@ -1,62 +0,0 @@
|
||||
import { z } from "zod";
|
||||
import type { PageableList, PageableParams } from "@/shared/model";
|
||||
|
||||
export interface AuthorizationsParams extends PageableParams {
|
||||
keywordType?: string;
|
||||
keyword?: string;
|
||||
authorizationName?: string;
|
||||
httpMethodCode?: string;
|
||||
useYn?: string;
|
||||
}
|
||||
|
||||
export interface Authorizations {
|
||||
authorizationNo: number;
|
||||
authorizationName: string;
|
||||
urlPatternValue: string;
|
||||
httpMethodCode: string;
|
||||
sortSeq: number;
|
||||
useYn: string;
|
||||
mdfr: string;
|
||||
mdfcnDt: string;
|
||||
}
|
||||
|
||||
export interface RoleAuthorizations {
|
||||
roleId: string;
|
||||
authorizationNo: number;
|
||||
authorizationName: string;
|
||||
urlPatternValue: string;
|
||||
httpMethodCode: string;
|
||||
sortSeq: number;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export interface WithRoleAuthorizations extends Authorizations {
|
||||
roleAuthorizations: RoleAuthorizations[];
|
||||
}
|
||||
|
||||
export const authorizationFormSchema = z.object({
|
||||
authorizationName: z.string(),
|
||||
urlPatternValue: z.string(),
|
||||
httpMethodCode: z.string(),
|
||||
sortSeq: z.number(),
|
||||
useYn: z.string(),
|
||||
});
|
||||
|
||||
export type AuthorizationsList = PageableList<Authorizations>;
|
||||
export type AuthorizationFormData = z.infer<typeof authorizationFormSchema>;
|
||||
|
||||
export interface AuthorizationsService {
|
||||
getAuthorizationsList: (
|
||||
params: AuthorizationsParams,
|
||||
) => Promise<AuthorizationsList>;
|
||||
getAuthorizationInfo: (
|
||||
authorizationNo: string,
|
||||
) => Promise<WithRoleAuthorizations>;
|
||||
createAuthorization: (
|
||||
data: AuthorizationFormData,
|
||||
) => Promise<WithRoleAuthorizations>;
|
||||
updateAuthorization: (
|
||||
authorizationNo: string,
|
||||
data: AuthorizationFormData,
|
||||
) => Promise<WithRoleAuthorizations>;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import dayjs from "dayjs";
|
||||
import { type ColumnDef } from "@tanstack/react-table";
|
||||
import type { Authorizations } from "./authorizations-interface";
|
||||
import type { Authorizations } from "@/entities/authorizations";
|
||||
import { ManagementAuthorityDialog } from "../ui/management-authority-dialog";
|
||||
|
||||
export const columns: ColumnDef<Authorizations>[] = [
|
||||
|
||||
Reference in New Issue
Block a user