Files
FEDEO/backend/db/schema/communication_hidden_rooms.ts
flfeders 7e6c2fbac5
All checks were successful
Build and Release FEDEO / verify (push) Successful in 57s
Build and Release FEDEO / build-and-release (push) Successful in 6m27s
feat(communication): add room visibility and project chat controls
2026-10-02 18:27:02 +02:00

11 lines
663 B
TypeScript

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] }) }))