summaryrefslogtreecommitdiff
path: root/lib/pq/validations.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pq/validations.ts')
-rw-r--r--lib/pq/validations.ts16
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/pq/validations.ts b/lib/pq/validations.ts
index 93daf460..c8a9d8e5 100644
--- a/lib/pq/validations.ts
+++ b/lib/pq/validations.ts
@@ -107,9 +107,7 @@ export const copyPqListSchema = z.object({
sourcePqListId: z.number({
required_error: "복사할 PQ 목록을 선택해주세요"
}),
- targetProjectId: z.number({
- required_error: "대상 프로젝트를 선택해주세요"
- }),
+ targetProjectId: z.number().optional(),
newName: z.string().min(1, "새 PQ 목록 명을 입력해주세요").optional(),
validTo: z.date().optional().nullable(),
});
@@ -124,4 +122,14 @@ export type CreatePqListInput = z.infer<typeof createPqListSchema>;
export type CopyPqListInput = z.infer<typeof copyPqListSchema>;
export type GetPqListsSchema = z.infer<typeof getPqListsSchema>;
-export type GetPQSubmissionsSchema = Awaited<ReturnType<typeof searchParamsPQReviewCache.parse>> \ No newline at end of file
+export type GetPQSubmissionsSchema = Awaited<ReturnType<typeof searchParamsPQReviewCache.parse>>
+
+// PQ 유효일 수정
+export const updatePqValidToSchema = z.object({
+ pqListId: z.number({
+ required_error: "PQ 목록 ID가 필요합니다"
+ }),
+ validTo: z.date().nullable(),
+});
+
+export type UpdatePqValidToInput = z.infer<typeof updatePqValidToSchema>; \ No newline at end of file