summaryrefslogtreecommitdiff
path: root/db/schema/projects.ts
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema/projects.ts')
-rw-r--r--db/schema/projects.ts11
1 files changed, 6 insertions, 5 deletions
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