diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-28 12:26:28 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-05-28 12:26:28 +0000 |
| commit | 36dd60ca6fce7712b35e6d7c1b9602710f442ada (patch) | |
| tree | 32c3f6e2eef53b565d545535b10b7980ad184883 /lib/items-tech/service.ts | |
| parent | 2caa8093ac616f14d48430ce2f485f805d6faa53 (diff) | |
(최겸) 기술영업 해양 rfq 개발v1
Diffstat (limited to 'lib/items-tech/service.ts')
| -rw-r--r-- | lib/items-tech/service.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/items-tech/service.ts b/lib/items-tech/service.ts index 62a66aaa..70c664f3 100644 --- a/lib/items-tech/service.ts +++ b/lib/items-tech/service.ts @@ -10,8 +10,9 @@ import { getErrorMessage } from "@/lib/handle-error"; import { asc, desc, ilike, and, or, eq, count, inArray, sql } from "drizzle-orm";
import { GetItemsSchema, UpdateItemSchema, ShipbuildingItemCreateData, TypedItemCreateData, OffshoreTopItemCreateData, OffshoreHullItemCreateData } from "./validations";
-import { Item, items, itemShipbuilding, itemOffshoreTop, itemOffshoreHull } from "@/db/schema/items";
+import { Item, items, itemShipbuilding, itemOffshoreTop, itemOffshoreHull, ItemOffshoreTop, ItemOffshoreHull } from "@/db/schema/items";
import { findAllItems } from "./repository";
+import { findAllOffshoreItems } from "./repository";
/* -----------------------------------------------------
1) 조회 관련
@@ -1000,3 +1001,10 @@ export async function getAllShipbuildingItems(): Promise<Item[]> { throw new Error("Failed to get items");
}
}
+export async function getAllOffshoreItems(): Promise<(ItemOffshoreHull | ItemOffshoreTop)[]> {
+ try {
+ return await findAllOffshoreItems();
+ } catch (err) {
+ throw new Error("Failed to get items");
+ }
+}
|
