Files
frontend/apps/cs/src/entities/ip/model/ip-interface.ts
T

30 lines
698 B
TypeScript

import { z } from "zod";
import type { PageableParams, PageableList } from "@/shared/model";
export interface IpParams extends PageableParams {
siteId: string;
ipAddr?: string;
prmYn?: string;
}
export const ipSchema = z.object({
mngNo: z.number().nullish(),
siteId: z.string(),
ipAddr: z.string().nonempty(),
prmYn: z.string(),
mode: z.string(),
});
export const ipFormSchema = z.object({
ips: z.array(ipSchema),
});
export type IP = z.infer<typeof ipSchema>;
export type IPFormData = z.infer<typeof ipFormSchema>;
export type IpList = PageableList<IP>;
export interface IpService {
getIpList(params: IpParams): Promise<IpList>;
saveIpList(body: IP[]): Promise<void>;
}