import { z } from "zod"; import type { PageableParams, PageableList } from "@/shared/model"; export interface LwpoCodeParams extends PageableParams { upCd?: string; lwpoCd?: string; lwpoCdNm?: string; useYn?: string; } export interface LwpoCode { lwpoCd: string; upCd: string; lwpoCdNm: string; lwpoCdExpln: string; unit: string; prntLwpoCd: string; useYn: string; sortSeq: number; regDt: string; rgTr: string; rgTrNm: string; mdfcnDt: string; mdFr: string; } export interface LwpoCodeDetail extends LwpoCodeFormData { lwpoCd: string; upCd: string; lwpoCdNm: string; lwpoCdExpln: string; unit: string; prntLwpoCd: string; useYn: string; sortSeq: 0; } export const LwpoCodeFormSchema = z.object({ lwpoCd: z.string().max(10).nonempty(), upCd: z.string().max(10).nonempty(), lwpoCdNm: z.string().max(100).nonempty(), lwpoCdExpln: z.string().max(1000).nullish(), unit: z.string().max(20).nullish(), prntLwpoCd: z.string().max(10).nullish(), useYn: z.string(), sortSeq: z.number(), delYn: z.string(), }); export type LwpoCodeFormData = z.infer; export type LwpoCodeList = PageableList; export interface LwpoCodeService { getLwpoCodeList(params: LwpoCodeParams): Promise; getUpCodeLwpoCodeList(upCd: string): Promise; lwpoCodeDetail(upCd: string, lwpoCd: string): Promise; updateLwpoCode( upCd: string, lwpoCd: string, data: LwpoCodeFormData, ): Promise; createLwpoCode(data: LwpoCodeFormData): Promise; deleteLwpoCode( upCd: string, lwpoCd: string, data: LwpoCodeFormData, ): Promise; codeRefreshAll(): Promise; }