summaryrefslogtreecommitdiff
path: root/db/schema/users.ts
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-06-19 09:44:28 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-06-19 09:44:28 +0000
commit95bbe9c583ff841220da1267630e7b2025fc36dc (patch)
tree5e3d5bb3302530bbaa7f7abbe8c9cf8193ccbd4c /db/schema/users.ts
parent0eb030580b5cbe5f03d570c3c9d8c519bac3b783 (diff)
(대표님) 20250619 1844 KST 작업사항
Diffstat (limited to 'db/schema/users.ts')
-rw-r--r--db/schema/users.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/db/schema/users.ts b/db/schema/users.ts
index 2a1e45d6..f6a66a8f 100644
--- a/db/schema/users.ts
+++ b/db/schema/users.ts
@@ -1,4 +1,4 @@
-import { integer, pgTable, varchar,timestamp,pgEnum ,pgView, text, primaryKey} from "drizzle-orm/pg-core";
+import { integer, boolean,serial, pgTable, varchar,timestamp,pgEnum ,pgView, text, primaryKey} from "drizzle-orm/pg-core";
import { eq , sql} from "drizzle-orm";
import { vendors } from "./vendors";
import { techVendors } from "./techVendors";
@@ -24,6 +24,20 @@ export const users = pgTable("users", {
});
+
+ // 부서 정의 테이블
+ export const departments = pgTable("departments", {
+ id: serial("id").primaryKey(),
+ departmentCode: varchar("department_code", { length: 50 }).notNull().unique(),
+ departmentName: varchar("department_name", { length: 100 }).notNull(),
+ description: text("description"),
+ isActive: boolean("is_active").notNull().default(true),
+
+ createdAt: timestamp("created_at").defaultNow().notNull(),
+ updatedAt: timestamp("updated_at").defaultNow().notNull(),
+ });
+
+
export const otps = pgTable('otps', {
email: varchar('email', { length: 256 }).notNull().primaryKey(),
code: varchar('code', { length: 6 }).notNull(),