summaryrefslogtreecommitdiff
path: root/lib/items-tech/validations.ts
diff options
context:
space:
mode:
Diffstat (limited to 'lib/items-tech/validations.ts')
-rw-r--r--lib/items-tech/validations.ts39
1 files changed, 15 insertions, 24 deletions
diff --git a/lib/items-tech/validations.ts b/lib/items-tech/validations.ts
index 7c8a58f9..399193b2 100644
--- a/lib/items-tech/validations.ts
+++ b/lib/items-tech/validations.ts
@@ -48,6 +48,7 @@ export const updateShipbuildingItemSchema = z.object({
description: z.string().optional(),
workType: z.string().optional(),
shipTypes: z.string().optional(),
+ itemList: z.string().optional(),
})
export type GetItemsSchema = Awaited<ReturnType<typeof searchParamsCache.parse>>
@@ -62,6 +63,7 @@ export const createShipbuildingItemSchema = z.object({
description: z.string(),
workType: z.string(),
shipTypes: z.string(),
+ itemList: z.string().optional(),
})
export type CreateShipbuildingItemSchema = z.infer<typeof createShipbuildingItemSchema>
@@ -77,6 +79,7 @@ export interface ItemCreateData {
export interface ShipbuildingItemCreateData extends ItemCreateData {
workType: string | null
shipTypes: string | null
+ itemList?: string | null
}
// 아이템 타입에 따른 생성 데이터 타입
@@ -88,10 +91,8 @@ export const createOffshoreTopItemSchema = z.object({
itemName: z.string(),
description: z.string(),
workType: z.enum(["TM", "TS", "TE", "TP"]),
- itemList1: z.string().optional(),
- itemList2: z.string().optional(),
- itemList3: z.string().optional(),
- itemList4: z.string().optional(),
+ itemList: z.string().optional(),
+ subItemList: z.string().optional(),
})
// 해양 HULL 아이템 스키마
@@ -100,10 +101,8 @@ export const createOffshoreHullItemSchema = z.object({
itemName: z.string(),
description: z.string(),
workType: z.enum(["HA", "HE", "HH", "HM", "NC"]),
- itemList1: z.string().optional(),
- itemList2: z.string().optional(),
- itemList3: z.string().optional(),
- itemList4: z.string().optional(),
+ itemList: z.string().optional(),
+ subItemList: z.string().optional(),
})
export type CreateOffshoreTopItemSchema = z.infer<typeof createOffshoreTopItemSchema>
@@ -115,10 +114,8 @@ export const updateOffshoreTopItemSchema = z.object({
itemName: z.string().optional(),
description: z.string().optional(),
workType: z.enum(["TM", "TS", "TE", "TP"]).optional(),
- itemList1: z.string().optional(),
- itemList2: z.string().optional(),
- itemList3: z.string().optional(),
- itemList4: z.string().optional(),
+ itemList: z.string().optional(),
+ subItemList: z.string().optional(),
})
// 해양 HULL 아이템 업데이트 스키마
@@ -127,10 +124,8 @@ export const updateOffshoreHullItemSchema = z.object({
itemName: z.string().optional(),
description: z.string().optional(),
workType: z.enum(["HA", "HE", "HH", "HM", "NC"]).optional(),
- itemList1: z.string().optional(),
- itemList2: z.string().optional(),
- itemList3: z.string().optional(),
- itemList4: z.string().optional(),
+ itemList: z.string().optional(),
+ subItemList: z.string().optional(),
})
export type UpdateOffshoreTopItemSchema = z.infer<typeof updateOffshoreTopItemSchema>
@@ -139,18 +134,14 @@ export type UpdateOffshoreHullItemSchema = z.infer<typeof updateOffshoreHullItem
// 해양 TOP 아이템 생성 데이터 타입
export interface OffshoreTopItemCreateData extends ItemCreateData {
workType: "TM" | "TS" | "TE" | "TP"
- itemList1?: string | null
- itemList2?: string | null
- itemList3?: string | null
- itemList4?: string | null
+ itemList?: string | null
+ subItemList?: string | null
}
// 해양 HULL 아이템 생성 데이터 타입
export interface OffshoreHullItemCreateData extends ItemCreateData {
workType: "HA" | "HE" | "HH" | "HM" | "NC"
- itemList1?: string | null
- itemList2?: string | null
- itemList3?: string | null
- itemList4?: string | null
+ itemList?: string | null
+ subItemList?: string | null
}