summaryrefslogtreecommitdiff
path: root/db/schema/knox
diff options
context:
space:
mode:
authorjoonhoekim <26rote@gmail.com>2025-09-30 16:48:52 +0900
committerjoonhoekim <26rote@gmail.com>2025-09-30 16:48:52 +0900
commit567baf74e62bb71d44604eb5fe3457f773396678 (patch)
treed917f36c85916e500fb6b3043841dd346235c07f /db/schema/knox
parent0cd76046aa7c5426d42740f9acb06c42e4d7e686 (diff)
(김준회) 결재 카테고리 로직 개선, 미사용 코드 제거
Diffstat (limited to 'db/schema/knox')
-rw-r--r--db/schema/knox/approvals.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/schema/knox/approvals.ts b/db/schema/knox/approvals.ts
index 5cb3519d..622f0be2 100644
--- a/db/schema/knox/approvals.ts
+++ b/db/schema/knox/approvals.ts
@@ -130,3 +130,19 @@ export const approvalTemplateVariables = knoxSchema.table('approval_template_var
updatedAt: timestamp().defaultNow().notNull(),
});
+// 결재 템플릿 카테고리 관리
+export const approvalTemplateCategories = knoxSchema.table('approval_template_categories', {
+ id: uuid().primaryKey().defaultRandom(), // 카테고리 아이디 UUID
+ name: text().notNull(), // 카테고리 이름
+ description: text(), // 카테고리 설명
+ isActive: boolean().default(true).notNull(), // 활성화 여부
+ sortOrder: integer().default(0).notNull(), // 정렬 순서
+ createdBy: integer() // 카테고리 생성자 - eVCP 유저 아이디 기반 참조
+ .notNull()
+ .references(() => users.id, { onDelete: 'set null' }),
+ createdAt: timestamp().defaultNow().notNull(),
+ updatedAt: timestamp().defaultNow().notNull(),
+ updatedBy: integer() // 카테고리 수정자 - eVCP 유저 아이디 기반 참조
+ .notNull()
+ .references(() => users.id, { onDelete: 'set null' }),
+}); \ No newline at end of file