diff options
| author | joonhoekim <26rote@gmail.com> | 2025-07-28 12:10:39 +0000 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-07-28 12:10:39 +0000 |
| commit | 75249e6fa46864f49d4eb91bd755171b6b65eaae (patch) | |
| tree | f2c021f0fe10b3513d29f05ca15b82e460d79d20 /db/schema | |
| parent | c228a89c2834ee63b209bad608837c39643f350e (diff) | |
(김준회) 공통모듈 - Knox 결재 모듈 구현, 유저 선택기 구현, 상신 결재 저장을 위한 DB 스키마 및 서비스 추가, spreadjs 라이센스 환경변수 통일, 유저 테이블에 epId 컬럼 추가
Diffstat (limited to 'db/schema')
| -rw-r--r-- | db/schema/index.ts | 9 | ||||
| -rw-r--r-- | db/schema/knox/approvals.ts | 16 | ||||
| -rw-r--r-- | db/schema/users.ts | 1 |
3 files changed, 22 insertions, 4 deletions
diff --git a/db/schema/index.ts b/db/schema/index.ts index c48f0a8b..87ea224a 100644 --- a/db/schema/index.ts +++ b/db/schema/index.ts @@ -47,7 +47,8 @@ export * from './NONSAP/nonsap'; // ECC SOAP 수신용 (RFQ, PO, PR 데이터) export * from './ECC/ecc'; -// Knox 임직원, 조직도, 직급 -export * from './knox/employee'; -export * from './knox/organization'; -export * from './knox/titles';
\ No newline at end of file +// === Knox 스키마 === +export * from './knox/employee'; // 임직원 +export * from './knox/organization'; // 조직도 +export * from './knox/titles'; // 직급 +export * from './knox/approvals'; // Knox 결재 - eVCP 에서 상신한 결재를 저장
\ No newline at end of file diff --git a/db/schema/knox/approvals.ts b/db/schema/knox/approvals.ts new file mode 100644 index 00000000..27332ed6 --- /dev/null +++ b/db/schema/knox/approvals.ts @@ -0,0 +1,16 @@ +import { boolean, jsonb, text, timestamp, } from "drizzle-orm/pg-core"; +import { knoxSchema } from "./employee"; + +export const approval = knoxSchema.table("approval", { + apInfId: text("ap_inf_id").primaryKey(), + userId: text("user_id").notNull(), + epId: text("ep_id").notNull(), + emailAddress: text("email_address").notNull(), + subject: text("subject").notNull(), + content: text("content").notNull(), + status: text("status").notNull(), + aplns: jsonb("aplns").notNull(), + isDeleted: boolean("is_deleted").notNull().default(false), + createdAt: timestamp("created_at").notNull().defaultNow(), + updatedAt: timestamp("updated_at").notNull().defaultNow(), +});
\ No newline at end of file diff --git a/db/schema/users.ts b/db/schema/users.ts index bf5d41de..5ea399b4 100644 --- a/db/schema/users.ts +++ b/db/schema/users.ts @@ -13,6 +13,7 @@ export const users = pgTable("users", { id: integer("id").primaryKey().generatedAlwaysAsIdentity(), name: varchar("name", { length: 255 }).notNull(), email: varchar("email", { length: 255 }).notNull().unique(), + epId: varchar("epId", { length: 50 }), // Knox Unique Id (PK) deptCode: varchar("deptCode", { length: 50 }), deptName: varchar("deptName", { length: 255 }), |
