diff options
| author | joonhoekim <26rote@gmail.com> | 2025-10-15 21:38:21 +0900 |
|---|---|---|
| committer | joonhoekim <26rote@gmail.com> | 2025-10-15 21:38:21 +0900 |
| commit | a070f833d132e6370311c0bbdad03beb51d595df (patch) | |
| tree | 9184292e4c2631ee0c7a7247f9728fc26de790f1 /db/schema | |
| parent | 280a2628df810dc157357e0e4d2ed8076d020a2c (diff) | |
(김준회) 이메일 화이트리스트 (SMS 우회) 기능 추가 및 기존 로그인 과정 통합
Diffstat (limited to 'db/schema')
| -rw-r--r-- | db/schema/emailWhitelist.ts | 27 | ||||
| -rw-r--r-- | db/schema/index.ts | 3 |
2 files changed, 29 insertions, 1 deletions
diff --git a/db/schema/emailWhitelist.ts b/db/schema/emailWhitelist.ts new file mode 100644 index 00000000..485246ee --- /dev/null +++ b/db/schema/emailWhitelist.ts @@ -0,0 +1,27 @@ +/** + * 이메일 화이트리스트 관리 + * + * 도메인(domain) 또는 개별 이메일(email) + * - domain: 도메인 전체 화이트리스트용 (예: company.com) + * - email: 개별 이메일 화이트리스트용 (예: user@company.com) + * 설명(description) + * 생성일(createdAt) + * 생성자(createdBy) + * 수정일(updatedAt) + * 수정자(updatedBy) + * + */ + +import { pgTable, text, integer, serial, varchar, timestamp } from 'drizzle-orm/pg-core'; +import { users } from './users'; + +export const emailWhitelist = pgTable("email_whitelist", { + id: serial("id").primaryKey(), + domain: varchar("domain", { length: 255 }), // 도메인 전체용 (nullable) + email: varchar("email", { length: 255 }), // 개별 이메일용 (nullable) + description: text("description"), + createdAt: timestamp("created_at").defaultNow().notNull(), + createdBy: integer("created_by").references(() => users.id), + updatedAt: timestamp("updated_at").defaultNow().notNull(), + updatedBy: integer("updated_by").references(() => users.id), +}); diff --git a/db/schema/index.ts b/db/schema/index.ts index 384c6e9c..0e3daf80 100644 --- a/db/schema/index.ts +++ b/db/schema/index.ts @@ -81,4 +81,5 @@ export * from './S_ERP/s_erp'; export * from './avl/avl'; export * from './avl/vendor-pool'; // === Email Logs 스키마 === -export * from './emailLogs';
\ No newline at end of file +export * from './emailLogs'; +export * from './emailWhitelist';
\ No newline at end of file |
