diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-15 12:52:11 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-10-15 12:52:11 +0000 |
| commit | b54f6f03150dd78d86db62201b6386bf14b72394 (patch) | |
| tree | b3092bb34805fdc65eee5282e86a9fb90ba20d6e /db/schema/users.ts | |
| parent | c1bd1a2f499ee2f0742170021b37dab410983ab7 (diff) | |
(대표님) 커버, 데이터룸, 파일매니저, 담당자할당 등
Diffstat (limited to 'db/schema/users.ts')
| -rw-r--r-- | db/schema/users.ts | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/db/schema/users.ts b/db/schema/users.ts index 1d963228..278bc7ab 100644 --- a/db/schema/users.ts +++ b/db/schema/users.ts @@ -5,6 +5,7 @@ import { import { eq, sql } from "drizzle-orm"; import { vendors } from "./vendors"; import { techVendors } from "./techVendors"; +import { ownerCompanies } from "./companies"; export const userDomainEnum = pgEnum("user_domain", ["pending", "evcp", "procurement", "sales", "engineering", "partners"]); @@ -17,6 +18,8 @@ export const users = pgTable("users", { deptCode: varchar("deptCode", { length: 50 }), deptName: varchar("deptName", { length: 255 }), + ownerCompanyId: integer("owner_company_id") + .references(() => ownerCompanies.id, { onDelete: "set null" }), companyId: integer("company_id") .references(() => vendors.id, { onDelete: "set null" }), techCompanyId: integer("tech_company_id") @@ -49,12 +52,12 @@ export const users = pgTable("users", { deactivatedAt: timestamp("deactivated_at", { withTimezone: true }), deactivationReason: varchar("deactivation_reason", { length: 50 }), // 'INACTIVE', 'ADMIN', 'GDPR' 등 - // ✨ 새로 추가: 동의 관련 필드들 - lastConsentUpdate: timestamp("last_consent_update", { withTimezone: true }), - consentVersion: varchar("consent_version", { length: 20 }), // 마지막 동의한 정책 버전 - requiresConsentUpdate: boolean("requires_consent_update").default(false).notNull(), - - // ✨ 새로 추가: 회원가입 관련 + // ✨ 새로 추가: 동의 관련 필드들 + lastConsentUpdate: timestamp("last_consent_update", { withTimezone: true }), + consentVersion: varchar("consent_version", { length: 20 }), // 마지막 동의한 정책 버전 + requiresConsentUpdate: boolean("requires_consent_update").default(false).notNull(), + + // ✨ 새로 추가: 회원가입 관련 // emailVerified: boolean("email_verified").default(false).notNull(), // emailVerifiedAt: timestamp("email_verified_at", { withTimezone: true }), // registrationCompleted: boolean("registration_completed").default(false).notNull(), |
