import { bigint, pgTable, primaryKey, text, uuid } from "drizzle-orm/pg-core" import { authUsers } from "./auth_users" import { tenants } from "./tenants" // Room keys also cover collaboration bindings and not-yet-provisioned chats. export const communicationHiddenRooms = pgTable("communication_hidden_rooms", { tenantId: bigint("tenant_id", { mode: "number" }).notNull().references(() => tenants.id, { onDelete: "cascade" }), userId: uuid("user_id").notNull().references(() => authUsers.id, { onDelete: "cascade" }), roomKey: text("room_key").notNull(), }, table => ({ pk: primaryKey({ columns: [table.tenantId, table.userId, table.roomKey] }) }))