summaryrefslogtreecommitdiff
path: root/db/schema
diff options
context:
space:
mode:
Diffstat (limited to 'db/schema')
-rw-r--r--db/schema/index.ts2
-rw-r--r--db/schema/user-custom-data/userCustomData.ts16
2 files changed, 18 insertions, 0 deletions
diff --git a/db/schema/index.ts b/db/schema/index.ts
index 7d433f7c..6463e0ec 100644
--- a/db/schema/index.ts
+++ b/db/schema/index.ts
@@ -55,6 +55,8 @@ export * from './permissions';
export * from './fileSystem';
+export * from './user-custom-data/userCustomData';
+
// 부서별 도메인 할당 관리
export * from './departmentDomainAssignments';
diff --git a/db/schema/user-custom-data/userCustomData.ts b/db/schema/user-custom-data/userCustomData.ts
new file mode 100644
index 00000000..bf529679
--- /dev/null
+++ b/db/schema/user-custom-data/userCustomData.ts
@@ -0,0 +1,16 @@
+/**
+ * user custom data
+ *
+ * */
+import { integer, json, pgTable, timestamp, uuid, varchar } from "drizzle-orm/pg-core";
+import { users } from "../users";
+
+export const userCustomData = pgTable("user_custom_data", {
+ id: uuid("id").primaryKey().defaultRandom(),
+ userId: integer("user_id").references(() => users.id),
+ tableKey: varchar("table_key", { length: 255 }).notNull(),
+ customSettingName: varchar("custom_setting_name", { length: 255 }).notNull(),
+ customSetting: json("custom_setting"),
+ createdDate: timestamp("created_date", { withTimezone: true }).defaultNow().notNull(),
+ updatedDate: timestamp("updated_date", { withTimezone: true }).defaultNow().notNull(),
+});