diff options
Diffstat (limited to 'db/schema/users.ts')
| -rw-r--r-- | db/schema/users.ts | 16 |
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(), |
