diff options
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]; +} |
