Defines SQLite schema for plugin configuration entries, mapping plugin IDs to key-value settings.
import { sqliteTable, text, integer, real, primaryKey } from 'drizzle-orm/sqlite-core';
export const pluginConfig = sqliteTable('plugin_config', {
teamId: text('team_id').notNull(),
key: text('key').notNull(),
value: text('value').notNull(),
updatedAt: text('updated_at').notNull(),
}, (t) => ({
pk: primaryKey({ columns: [t.teamId, t.key] }),
}));
export const clients = sqliteTable('clients', {
id: text('id').primaryKey(),
teamId: text('team_id').notNull(),
firstName: text('first_name'),
lastName: text('last_name'),
email: text('email'),
phone: text('phone'),
address: text('address'),
tags: text('tags'),
lastVisitAt: text('last_visit_at'),
totalVisits: integer('total_visits'),
totalSpend: real('total_spend'),
raw: text('raw'),
syncedAt: text('synced_at'
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key