summaryrefslogtreecommitdiff
path: root/lib/bidding/service.ts
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-11-17 10:00:07 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-11-17 10:00:07 +0000
commit213b995271edfbe7604d07ba4b71fcc20038a894 (patch)
tree41540fafa74d18755bccd00d4368e5652d8f6092 /lib/bidding/service.ts
parentf1676f41e6edadd5841bff6a097dc93fbd195b92 (diff)
(최겸) 구매 입찰 수정
Diffstat (limited to 'lib/bidding/service.ts')
-rw-r--r--lib/bidding/service.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bidding/service.ts b/lib/bidding/service.ts
index b60fc73d..cbeeb24a 100644
--- a/lib/bidding/service.ts
+++ b/lib/bidding/service.ts
@@ -35,7 +35,7 @@ import {
} from 'drizzle-orm'
import { revalidatePath } from 'next/cache'
import { filterColumns } from '@/lib/filter-columns'
-import { GetBiddingsSchema } from './validation'
+import { GetBiddingsSchema, CreateBiddingSchema } from './validation'
@@ -865,6 +865,9 @@ export interface CreateBiddingInput extends CreateBiddingSchema {
meetingFiles: File[]
} | null
+ // noticeType 필드 명시적 추가 (CreateBiddingSchema에 포함되어 있지만 타입 추론 문제 해결)
+ noticeType?: 'standard' | 'facility' | 'unit_price'
+
// PR 아이템들 (선택사항)
prItems?: Array<{
id: string
@@ -1174,6 +1177,7 @@ export async function createBidding(input: CreateBiddingInput, userId: string) {
description: input.description,
contractType: input.contractType,
+ noticeType: input.noticeType || 'standard',
biddingType: input.biddingType,
awardCount: input.awardCount,
contractStartDate: input.contractStartDate ? parseDate(input.contractStartDate) : new Date(),
@@ -1494,6 +1498,7 @@ export async function updateBidding(input: UpdateBiddingInput, userId: string) {
if (input.content !== undefined) updateData.content = input.content
if (input.contractType !== undefined) updateData.contractType = input.contractType
+ if (input.noticeType !== undefined) updateData.noticeType = input.noticeType
if (input.biddingType !== undefined) updateData.biddingType = input.biddingType
if (input.awardCount !== undefined) updateData.awardCount = input.awardCount
if (input.contractStartDate !== undefined) updateData.contractStartDate = parseDate(input.contractStartDate)