Added Backend

This commit is contained in:
2026-01-06 12:07:43 +01:00
parent b013ef8f4b
commit 6f3d4c0bff
165 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import {
pgTable,
uuid,
text,
} from "drizzle-orm/pg-core"
import { helpdesk_conversations } from "./helpdesk_conversations"
import { authUsers } from "./auth_users"
export const helpdesk_conversation_participants = pgTable(
"helpdesk_conversation_participants",
{
conversationId: uuid("conversation_id")
.notNull()
.references(() => helpdesk_conversations.id, { onDelete: "cascade" }),
userId: uuid("user_id")
.notNull()
.references(() => authUsers.id, { onDelete: "cascade" }),
role: text("role"),
},
(table) => ({
pk: {
name: "helpdesk_conversation_participants_pkey",
columns: [table.conversationId, table.userId],
},
})
)
export type HelpdeskConversationParticipant =
typeof helpdesk_conversation_participants.$inferSelect
export type NewHelpdeskConversationParticipant =
typeof helpdesk_conversation_participants.$inferInsert