KI-AGENT: Matrix durch nativen FEDEO-Chat ersetzen

This commit is contained in:
2026-09-08 22:42:40 +02:00
parent 47bd8e80e4
commit 358e40d749
47 changed files with 1027 additions and 9766 deletions

View File

@@ -0,0 +1,26 @@
import { index, pgTable, primaryKey, timestamp, uuid } from "drizzle-orm/pg-core"
import { authUsers } from "./auth_users"
import { communicationRooms } from "./communication_rooms"
export const communicationRoomMembers = pgTable(
"communication_room_members",
{
roomId: uuid("room_id")
.notNull()
.references(() => communicationRooms.id, { onDelete: "cascade" }),
userId: uuid("user_id")
.notNull()
.references(() => authUsers.id, { onDelete: "cascade" }),
joinedAt: timestamp("joined_at", { withTimezone: true })
.notNull()
.defaultNow(),
},
(table) => ({
pk: primaryKey({ columns: [table.roomId, table.userId] }),
userIdx: index("communication_room_members_user_idx").on(table.userId),
})
)
export type CommunicationRoomMember = typeof communicationRoomMembers.$inferSelect
export type NewCommunicationRoomMember = typeof communicationRoomMembers.$inferInsert