feat(communication): add room visibility and project chat controls
All checks were successful
Build and Release FEDEO / verify (push) Successful in 57s
Build and Release FEDEO / build-and-release (push) Successful in 6m27s

This commit is contained in:
2026-10-02 18:27:02 +02:00
parent 0887863981
commit 7e6c2fbac5
14 changed files with 364 additions and 21 deletions

View File

@@ -0,0 +1,10 @@
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] }) }))

View File

@@ -19,6 +19,7 @@ export * from "./communication_rooms"
export * from "./communication_room_members"
export * from "./communication_messages"
export * from "./communication_room_reads"
export * from "./communication_hidden_rooms"
export * from "./contacts"
export * from "./contracts"
export * from "./contracttypes"

View File

@@ -66,6 +66,8 @@ export const projects = pgTable("projects", {
archived: boolean("archived").notNull().default(false),
chatEnabled: boolean("chat_enabled").notNull().default(true),
customerRef: text("customerRef"),
updatedAt: timestamp("updated_at", { withTimezone: true }),