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/repository.ts | |
| parent | 2caa8093ac616f14d48430ce2f485f805d6faa53 (diff) | |
(최겸) 기술영업 해양 rfq 개발v1
Diffstat (limited to 'lib/items-tech/repository.ts')
| -rw-r--r-- | lib/items-tech/repository.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/items-tech/repository.ts b/lib/items-tech/repository.ts index 43e88866..1f4f7933 100644 --- a/lib/items-tech/repository.ts +++ b/lib/items-tech/repository.ts @@ -1,6 +1,6 @@ // src/lib/items/repository.ts import db from "@/db/db"; -import { Item, items } from "@/db/schema/items"; +import { Item, ItemOffshoreTop, ItemOffshoreHull, itemOffshoreHull, itemOffshoreTop, items } from "@/db/schema/items"; import { eq, inArray, @@ -117,3 +117,8 @@ export async function updateItems( export async function findAllItems(): Promise<Item[]> { return db.select().from(items).orderBy(asc(items.itemCode)); } +export async function findAllOffshoreItems(): Promise<(ItemOffshoreHull | ItemOffshoreTop)[]> { + const hullItems = await db.select().from(itemOffshoreHull); + const topItems = await db.select().from(itemOffshoreTop); + return [...hullItems, ...topItems]; +} |
