diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-03 01:59:36 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-07-03 01:59:36 +0000 |
| commit | de4c8a6a6b7c918a7a16fc34423d1143209c295f (patch) | |
| tree | 9fbf0b93e5cbe9c3a8ca18c8bcd4dda5bf9640c5 /db | |
| parent | deb2d31dba913a3b831523f41b9bf2e286c53af1 (diff) | |
(최겸) 기술영업 벤더 공종 조회 기능 추가
Diffstat (limited to 'db')
| -rw-r--r-- | db/schema/techVendors.ts | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/db/schema/techVendors.ts b/db/schema/techVendors.ts index 9cb15ad8..113a5a1a 100644 --- a/db/schema/techVendors.ts +++ b/db/schema/techVendors.ts @@ -30,7 +30,8 @@ export const techVendors = pgTable("tech_vendors", { enum: [
"ACTIVE",
"INACTIVE",
- "BLACKLISTED"
+ "BLACKLISTED",
+ "PENDING_REVIEW"
]
}).default("ACTIVE").notNull(),
// 대표자 정보
@@ -57,10 +58,7 @@ export const techVendorPossibleItems = pgTable("tech_vendor_possible_items", { id: serial("id").primaryKey(),
vendorId: integer("vendor_id").notNull().references(() => techVendors.id),
// itemId: integer("item_id"), // 별도 item 테이블 연동시
- itemCode: varchar("item_code", { length: 100 })
- .notNull()
- .references(() => items.itemCode, { onDelete: "cascade" }),
- itemName: varchar("item_name", { length: 255 }).notNull(),
+ itemCode: varchar("item_code", { length: 100 }).notNull(),
createdAt: timestamp("created_at").defaultNow().notNull(),
updatedAt: timestamp("updated_at").defaultNow().notNull(),
});
@@ -83,7 +81,6 @@ export const techVendorItemsView = pgView("tech_vendor_items_view").as((qb) => { vendorItemId: techVendorPossibleItems.id,
vendorId: techVendorPossibleItems.vendorId,
itemCode: items.itemCode,
- itemName: items.itemName,
createdAt: techVendorPossibleItems.createdAt,
updatedAt: techVendorPossibleItems.updatedAt,
})
@@ -173,8 +170,7 @@ export const techVendorDetailView = pgView("tech_vendor_detail_view").as((qb) => (SELECT COALESCE(
json_agg(
json_build_object(
- 'itemCode', i.item_code,
- 'itemName', it.item_name
+ 'itemCode', i.item_code
)
),
'[]'::json
@@ -266,4 +262,5 @@ export type TechVendorCandidate = typeof techVendorCandidates.$inferSelect export type TechVendorWithAttachments = TechVendor & {
hasAttachments?: boolean;
attachmentsList?: TechVendorAttach[];
+ workTypes?: string;
}
\ No newline at end of file |
