diff options
Diffstat (limited to 'lib/items/validations.ts')
| -rw-r--r-- | lib/items/validations.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/items/validations.ts b/lib/items/validations.ts index 14fc27b1..bb90e931 100644 --- a/lib/items/validations.ts +++ b/lib/items/validations.ts @@ -37,6 +37,7 @@ export const searchParamsCache = createSearchParamsCache({ search: parseAsString.withDefault(""), }) +export type GetItemsSchema = Awaited<ReturnType<typeof searchParamsCache.parse>> export const createItemSchema = z.object({ itemCode: z.string().min(1, "아이템 코드는 필수입니다"), @@ -51,6 +52,8 @@ export const createItemSchema = z.object({ changeDate: z.string().max(8).nullable().optional(), baseUnitOfMeasure: z.string().max(3).nullable().optional(), }) +export type CreateItemSchema = z.infer<typeof createItemSchema> + export const updateItemSchema = z.object({ itemCode: z.string().optional(), @@ -65,7 +68,4 @@ export const updateItemSchema = z.object({ changeDate: z.string().max(8).nullable().optional(), baseUnitOfMeasure: z.string().max(3).nullable().optional(), }) - -export type GetItemsSchema = Awaited<ReturnType<typeof searchParamsCache.parse>> -export type CreateItemSchema = z.infer<typeof createItemSchema> export type UpdateItemSchema = z.infer<typeof updateItemSchema> |
