blob: 22026739ebb917d31443f572fb1c5d9d18ee810d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
'use server'
import db from "@/db/db"
import { placeOfShipping } from "@/db/schema"
import { eq } from "drizzle-orm"
/**
* @returns 활성화된 모든 선적지/하역지 코드 및 장소명
*/
export async function getPlaceOfShippingForSelection(): Promise<{ code: string; description: string }[]> {
const data = await db.select().from(placeOfShipping).where(eq(placeOfShipping.isActive, true)).orderBy(placeOfShipping.code)
return data.map((item) => ({
code: item.code,
description: item.description
}))
}
|