summaryrefslogtreecommitdiff
path: root/db/schema/knox/approvals.ts
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema/knox/approvals.ts')
-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