From b7f5af1f4b6691052bb3e77968a478ff27696095 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Wed, 28 May 2025 00:33:50 +0000 Subject: (대표님 / 최겸) 스키마 변경사항 및 마이그레이션 커밋 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema/techVendors.ts | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'db/schema/techVendors.ts') diff --git a/db/schema/techVendors.ts b/db/schema/techVendors.ts index 55060adf..dcf73611 100644 --- a/db/schema/techVendors.ts +++ b/db/schema/techVendors.ts @@ -11,29 +11,28 @@ export const techVendors = pgTable("tech_vendors", { id: serial("id").primaryKey(), vendorName: varchar("vendor_name", { length: 255 }).notNull(), vendorCode: varchar("vendor_code", { length: 100 }), - taxId: varchar("tax_id", { length: 100 }).notNull(), - address: text("address"), + taxId: varchar("tax_id", { length: 100 }), country: varchar("country", { length: 100 }), + countryEng: varchar("country_eng", { length: 100 }), + countryFab: varchar("country_fab", { length: 100 }), + agentName: varchar("agent_name", { length: 255 }), + agentPhone: varchar("agent_phone", { length: 50 }), + agentEmail: varchar("agent_email", { length: 255 }), + address: varchar("address", { length: 255 }), phone: varchar("phone", { length: 50 }), email: varchar("email", { length: 255 }), website: varchar("website", { length: 255 }), - // 벤더 타입 추가 - techVendorType: varchar("tech_vendor_type", { - length: 20, - enum: VENDOR_TYPES - }).notNull(), - // 상태 필드 추가 + // 벤더 타입을 다중 선택 가능하도록 text 타입으로 변경 (JSON 배열 저장) + techVendorType: text("tech_vendor_type").notNull(), + // 상태 필드 - 더 많은 상태 추가 status: varchar("status", { length: 30, enum: [ - "PENDING_REVIEW", - "IN_REVIEW", - "REJECTED", "ACTIVE", "INACTIVE", "BLACKLISTED" ] - }).default("PENDING_REVIEW").notNull(), + }).default("ACTIVE").notNull(), // 대표자 정보 representativeName: varchar("representative_name", { length: 255 }), representativeEmail: varchar("representative_email", { length: 255 }), @@ -108,6 +107,11 @@ export const techVendorDetailView = pgView("tech_vendor_detail_view").as((qb) => taxId: techVendors.taxId, address: techVendors.address, country: techVendors.country, + countryEng: techVendors.countryEng, + countryFab: techVendors.countryFab, + agentName: techVendors.agentName, + agentPhone: techVendors.agentPhone, + agentEmail: techVendors.agentEmail, phone: techVendors.phone, email: techVendors.email, website: techVendors.website, @@ -203,7 +207,7 @@ export const techVendorCandidates = pgTable("tech_vendor_candidates", { contactEmail: varchar("contact_email", { length: 255 }), contactPhone: varchar("contact_phone", { length: 50 }), - taxId: varchar("tax_id", { length: 100 }).notNull(), + taxId: varchar("tax_id", { length: 100 }), address: text("address"), country: varchar("country", { length: 100 }), -- cgit v1.2.3