From 542398c8c7b24cf1a364d9cff6743f6708c5dc24 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 9 May 2025 07:15:46 +0000 Subject: [김준회] S-ERP SOAP 연결 (BIDDING PROJECT) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema/projects.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'db/schema/projects.ts') diff --git a/db/schema/projects.ts b/db/schema/projects.ts index 1b989d23..8401709a 100644 --- a/db/schema/projects.ts +++ b/db/schema/projects.ts @@ -1,4 +1,4 @@ -import { pgTable, varchar, text, timestamp,char, decimal, serial,uniqueIndex } from "drizzle-orm/pg-core" +import { pgTable, varchar, text, timestamp, char, decimal, serial, uniqueIndex } from "drizzle-orm/pg-core" export const projects = pgTable("projects", { id: serial("id").primaryKey(), @@ -40,8 +40,6 @@ export const biddingProjects = pgTable("bidding_projects", { export const projectSeries = pgTable('project_series', { pspid: char('pspid', { length: 24 }).notNull().references(() => biddingProjects.pspid), // 견적프로젝트번호 sersNo: char('sers_no', { length: 3 }).notNull(), // 시리즈번호 - // 받은 인터페이스 정의서에 따라 수정 - // klQtr: char('kl_qtr', { length: 10 }), // K/L 연도분기(YYYY_nQ) scDt: char('sc_dt', {length: 8}), // Steel Cutting Date klDt: char('kl_dt', {length: 8}), // Keel Laying Date lcDt: char('lc_dt', {length: 8}), // Launching Date @@ -52,7 +50,7 @@ export const projectSeries = pgTable('project_series', { post1: varchar('post1', { length: 40 }), // SN공사명(계약후) }, (table) => { return { - uniqueIdx: uniqueIndex("project_sersNo_unique").on( + pk: uniqueIndex("project_sersNo_unique").on( table.pspid, table.sersNo ) @@ -60,4 +58,7 @@ export const projectSeries = pgTable('project_series', { }); export type BiddingProjects = typeof biddingProjects.$inferSelect -export type ProjectSeries = typeof projectSeries.$inferSelect \ No newline at end of file +export type ProjectSeries = typeof projectSeries.$inferSelect +// 새로 데이터 수신 시 구분을 위해 사용 +export type NewBiddingProject = typeof biddingProjects.$inferInsert +export type NewProjectSeries = typeof projectSeries.$inferInsert \ No newline at end of file -- cgit v1.2.3