import { z } from "zod"; import type { PageableList, PageableParams } from "@/shared/model"; export interface RoleAuthorizationsParams extends PageableParams { keywordType?: string; keyword?: string; authorizationNo?: string; } export interface RoleAuthorizations { roleId: string; roleName: string; roleContent: string; useYn: string; authorizationNo: number; authYn: string; } export const roleAuthorizationsSchema = z.object({ roleId: z.string(), authorizationNo: z.number(), authYn: z.string(), }); export const roleAuthorizationsFormSchema = z.object({ roleAuthorizations: z.array(roleAuthorizationsSchema), }); export type RoleAuthorizationsList = PageableList; export type RoleAuthorizationsData = z.infer[]; export type RoleAuthorizationsFormData = z.infer< typeof roleAuthorizationsFormSchema >; export interface RoleAuthorizationsService { getRoleAuthorizationsList: ( params: RoleAuthorizationsParams, ) => Promise; createRoleAuthorizations: ( data: RoleAuthorizationsData, ) => Promise; updateRoleAuthorizations: ( data: RoleAuthorizationsData, ) => Promise; }