import { z } from "zod" // 공지사항 생성 스키마 export const createNoticeSchema = z.object({ pagePath: z.string().min(1, "페이지 경로를 입력해주세요"), title: z.string().min(1, "제목을 입력해주세요"), content: z.string().min(1, "내용을 입력해주세요"), authorId: z.number().min(1, "작성자를 선택해주세요"), isActive: z.boolean().default(true), }) // 공지사항 수정 스키마 export const updateNoticeSchema = z.object({ id: z.number(), pagePath: z.string().min(1, "페이지 경로를 입력해주세요"), title: z.string().min(1, "제목을 입력해주세요"), content: z.string().min(1, "내용을 입력해주세요"), isActive: z.boolean().default(true), }) // 페이지 경로별 공지사항 조회 스키마 export const getPageNoticeSchema = z.object({ pagePath: z.string().min(1, "페이지 경로를 입력해주세요"), }) // 타입 추출 export type CreateNoticeSchema = z.infer export type UpdateNoticeSchema = z.infer export type GetPageNoticeSchema = z.infer