// src/db/schema/index.ts
import {
    sqliteTable,
    integer,
    text,
    blob,
    primaryKey,
} from 'drizzle-orm/sqlite-core';
import { sql } from 'drizzle-orm';

// Landing pages table
export const landingPages = sqliteTable('landing_pages', {
    id: integer('id').primaryKey({ autoIncrement: true }),
    slug: text('slug').notNull().unique(),
    title: text('title').notNull(),
    description: text('description'),
    createdAt: text('created_at').default(sql`CURRENT_TIMESTAMP`),
    updatedAt: text('updated_at').default(sql`CURRENT_TIMESTAMP`),
    isActive: integer('is_active', { mode: 'boolean' }).default(true),
    fluxPrompt: text('flux_prompt'),
    samplePrompts: text('sample_prompts').notNull().default('[]'), // Stored as JSON string
    sampleSongs: text('sample_songs').notNull().default('[]'), // Stored as JSON string
    relevantKBLinks: text('relevant_kb_links').notNull().default('[]'), // Stored as JSON string
    headline: text('headline'),
    cta: text('cta'),
});