diff options
Diffstat (limited to 'db/schema/techVendors.ts')
| -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 |
