chatMessagesTable (db/schema.ts)

airi · integrations/telegram-bot/src/db/schema.ts · typescript · MIT
database, tag:embed-classified

Drizzle ORM schema defining chat messages, stickers, and related tables for a Telegram bot.

// Source: https://github.com/moeru-ai/airi | License: MIT | Copyright 2024-PRESENT Neko Ayaka
// Provided via justclaw.it.com; keep this notice with the code.
import { bigint, boolean, index, integer, jsonb, pgTable, text, uniqueIndex, uuid, vector } from 'drizzle-orm/pg-core'

export const chatMessagesTable = pgTable('chat_messages', {
  id: uuid().primaryKey().defaultRandom(),
  platform: text().notNull().default(''),
  platform_message_id: text().notNull().default(''),
  from_id: text().notNull().default(''),
  from_name: text().notNull().default(''),
  in_chat_id: text().notNull().default(''),
  content: text().notNull().default(''),
  is_reply: boolean().notNull().default(false),
  reply_to_name: text().notNull().default(''),
  reply_to_id: text().notNull().default(''),
  created_at:

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key