import * as drizzle_orm from 'drizzle-orm';
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';

/**
 * ShowMasterpiece 模块 - 数据库表结构定义
 *
 * 这个文件定义了ShowMasterpiece模块的完整数据库表结构，使用Drizzle ORM框架。
 * 包含了所有相关的表定义、索引优化和关系映射。
 *
 * 表结构概览：
 * - comicUniverseConfigs: 系统配置表
 * - comicUniverseCategories: 画集分类表
 * - comicUniverseTags: 标签表
 * - comicUniverseCollections: 画集主表
 * - comicUniverseCollectionTags: 画集标签关联表（多对多）
 * - comicUniverseArtworks: 作品页面表
 *
 * 设计特点：
 * - 完整的外键约束和级联删除
 * - 针对查询场景的索引优化
 * - 支持软删除和发布状态控制
 * - 灵活的分类和标签系统
 *
 * @fileoverview 数据库表结构 - ShowMasterpiece模块
 */
/**
 * 系统配置表 (comic_universe_configs)
 *
 * 存储ShowMasterpiece模块的全局配置信息，包括网站设置、显示选项等。
 * 通常只有一条记录，用于控制整个模块的行为和外观。
 *
 * 主要功能：
 * - 网站标题和描述配置
 * - 显示选项和分页设置
 * - 主题和语言设置
 * - 功能开关控制
 */
declare const comicUniverseConfigs: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_configs";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "comic_universe_configs";
            dataType: "number";
            columnType: "PgSerial";
            data: number;
            driverParam: number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        siteName: drizzle_orm_pg_core.PgColumn<{
            name: "site_name";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        siteDescription: drizzle_orm_pg_core.PgColumn<{
            name: "site_description";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        heroTitle: drizzle_orm_pg_core.PgColumn<{
            name: "hero_title";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        heroSubtitle: drizzle_orm_pg_core.PgColumn<{
            name: "hero_subtitle";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        maxCollectionsPerPage: drizzle_orm_pg_core.PgColumn<{
            name: "max_collections_per_page";
            tableName: "comic_universe_configs";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        enableSearch: drizzle_orm_pg_core.PgColumn<{
            name: "enable_search";
            tableName: "comic_universe_configs";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        enableCategories: drizzle_orm_pg_core.PgColumn<{
            name: "enable_categories";
            tableName: "comic_universe_configs";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        homeTabConfig: drizzle_orm_pg_core.PgColumn<{
            name: "home_tab_config";
            tableName: "comic_universe_configs";
            dataType: "json";
            columnType: "PgJson";
            data: unknown;
            driverParam: unknown;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        defaultCategory: drizzle_orm_pg_core.PgColumn<{
            name: "default_category";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 100;
        }>;
        theme: drizzle_orm_pg_core.PgColumn<{
            name: "theme";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 20;
        }>;
        language: drizzle_orm_pg_core.PgColumn<{
            name: "language";
            tableName: "comic_universe_configs";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 10;
        }>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "comic_universe_configs";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "comic_universe_configs";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 画集分类表 (comic_universe_categories)
 *
 * 管理画集的分类信息，支持层级结构和排序。
 * 用于组织和筛选画集，提供更好的浏览体验。
 *
 * 主要功能：
 * - 分类名称和描述管理
 * - 显示顺序控制
 * - 启用/禁用状态控制
 * - 支持未来的层级分类扩展
 */
declare const comicUniverseCategories: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_categories";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "comic_universe_categories";
            dataType: "number";
            columnType: "PgSerial";
            data: number;
            driverParam: number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        name: drizzle_orm_pg_core.PgColumn<{
            name: "name";
            tableName: "comic_universe_categories";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 100;
        }>;
        description: drizzle_orm_pg_core.PgColumn<{
            name: "description";
            tableName: "comic_universe_categories";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        displayOrder: drizzle_orm_pg_core.PgColumn<{
            name: "display_order";
            tableName: "comic_universe_categories";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isActive: drizzle_orm_pg_core.PgColumn<{
            name: "is_active";
            tableName: "comic_universe_categories";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "comic_universe_categories";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "comic_universe_categories";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 标签表 (comic_universe_tags)
 *
 * 管理画集的标签信息，支持颜色标识和状态控制。
 * 通过多对多关系与画集关联，实现灵活的标签系统。
 *
 * 主要功能：
 * - 标签名称管理（唯一性约束）
 * - 颜色标识（用于UI显示）
 * - 启用/禁用状态控制
 * - 支持标签的增删改查
 */
declare const comicUniverseTags: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_tags";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "comic_universe_tags";
            dataType: "number";
            columnType: "PgSerial";
            data: number;
            driverParam: number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        name: drizzle_orm_pg_core.PgColumn<{
            name: "name";
            tableName: "comic_universe_tags";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 50;
        }>;
        color: drizzle_orm_pg_core.PgColumn<{
            name: "color";
            tableName: "comic_universe_tags";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 7;
        }>;
        isActive: drizzle_orm_pg_core.PgColumn<{
            name: "is_active";
            tableName: "comic_universe_tags";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "comic_universe_tags";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 画集主表 (comic_universe_collections)
 *
 * 存储画集的基本信息和元数据，是系统的核心表之一。
 * 每个画集包含多个作品页面，支持分类、发布状态和访问统计。
 *
 * 主要功能：
 * - 画集基本信息（标题、作者、封面、描述）
 * - 分类关联（外键引用）
 * - 发布状态和时间控制
 * - 显示顺序和访问统计
 * - 支持软删除和草稿功能
 */
declare const comicUniverseCollections: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_collections";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "comic_universe_collections";
            dataType: "number";
            columnType: "PgSerial";
            data: number;
            driverParam: number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        title: drizzle_orm_pg_core.PgColumn<{
            name: "title";
            tableName: "comic_universe_collections";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        number: drizzle_orm_pg_core.PgColumn<{
            name: "number";
            tableName: "comic_universe_collections";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        coverImage: drizzle_orm_pg_core.PgColumn<{
            name: "cover_image";
            tableName: "comic_universe_collections";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        coverImageFileId: drizzle_orm_pg_core.PgColumn<{
            name: "cover_image_file_id";
            tableName: "comic_universe_collections";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        description: drizzle_orm_pg_core.PgColumn<{
            name: "description";
            tableName: "comic_universe_collections";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        categoryId: drizzle_orm_pg_core.PgColumn<{
            name: "category_id";
            tableName: "comic_universe_collections";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isPublished: drizzle_orm_pg_core.PgColumn<{
            name: "is_published";
            tableName: "comic_universe_collections";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        publishedAt: drizzle_orm_pg_core.PgColumn<{
            name: "published_at";
            tableName: "comic_universe_collections";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        displayOrder: drizzle_orm_pg_core.PgColumn<{
            name: "display_order";
            tableName: "comic_universe_collections";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        price: drizzle_orm_pg_core.PgColumn<{
            name: "price";
            tableName: "comic_universe_collections";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        viewCount: drizzle_orm_pg_core.PgColumn<{
            name: "view_count";
            tableName: "comic_universe_collections";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "comic_universe_collections";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "comic_universe_collections";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 画集标签关联表 (comic_universe_collection_tags)
 *
 * 实现画集和标签之间的多对多关系。
 * 每个画集可以有多个标签，每个标签也可以关联多个画集。
 *
 * 主要功能：
 * - 画集与标签的多对多关联
 * - 支持级联删除（删除画集或标签时自动清理关联）
 * - 复合主键确保关联的唯一性
 * - 针对查询场景的索引优化
 */
declare const comicUniverseCollectionTags: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_collection_tags";
    schema: undefined;
    columns: {
        collectionId: drizzle_orm_pg_core.PgColumn<{
            name: "collection_id";
            tableName: "comic_universe_collection_tags";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        tagId: drizzle_orm_pg_core.PgColumn<{
            name: "tag_id";
            tableName: "comic_universe_collection_tags";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 作品页面表 (comic_universe_artworks)
 *
 * 存储画集中的具体作品信息，每个画集包含多个作品页面。
 * 支持详细的作品元数据和页面排序功能。
 *
 * 主要功能：
 * - 作品详细信息（标题、作者、图片、描述等）
 * - 艺术作品元数据（创作时间、主题、尺寸等）
 * - 在画集中的页面顺序控制
 * - 启用/禁用状态（软删除）
 * - 支持富文本描述和多媒体内容
 */
declare const comicUniverseArtworks: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_artworks";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "comic_universe_artworks";
            dataType: "number";
            columnType: "PgSerial";
            data: number;
            driverParam: number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        collectionId: drizzle_orm_pg_core.PgColumn<{
            name: "collection_id";
            tableName: "comic_universe_artworks";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        title: drizzle_orm_pg_core.PgColumn<{
            name: "title";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        number: drizzle_orm_pg_core.PgColumn<{
            name: "number";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        image: drizzle_orm_pg_core.PgColumn<{
            name: "image";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        fileId: drizzle_orm_pg_core.PgColumn<{
            name: "file_id";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgUUID";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        migrationStatus: drizzle_orm_pg_core.PgColumn<{
            name: "migration_status";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 20;
        }>;
        description: drizzle_orm_pg_core.PgColumn<{
            name: "description";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdTime: drizzle_orm_pg_core.PgColumn<{
            name: "created_time";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 20;
        }>;
        theme: drizzle_orm_pg_core.PgColumn<{
            name: "theme";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 255;
        }>;
        dimensions: drizzle_orm_pg_core.PgColumn<{
            name: "dimensions";
            tableName: "comic_universe_artworks";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 100;
        }>;
        pageOrder: drizzle_orm_pg_core.PgColumn<{
            name: "page_order";
            tableName: "comic_universe_artworks";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isActive: drizzle_orm_pg_core.PgColumn<{
            name: "is_active";
            tableName: "comic_universe_artworks";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "comic_universe_artworks";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "comic_universe_artworks";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 系统配置表关系
 * 配置表通常只有一条记录，不需要复杂的关系定义
 */
declare const comicUniverseConfigsRelations: drizzle_orm.Relations<"comic_universe_configs", {}>;
/**
 * 分类表关系
 * 一个分类可以包含多个画集，并属于一个活动
 */
declare const comicUniverseCategoriesRelations: drizzle_orm.Relations<"comic_universe_categories", {
    /** 该分类下的所有画集 */
    collections: drizzle_orm.Many<"comic_universe_collections">;
}>;
/**
 * 标签表关系
 * 一个标签可以关联多个画集（通过关联表），并属于一个活动
 */
declare const comicUniverseTagsRelations: drizzle_orm.Relations<"comic_universe_tags", {
    /** 该标签的所有关联记录 */
    collectionTags: drizzle_orm.Many<"comic_universe_collection_tags">;
}>;
/**
 * 画集表关系
 * 画集属于一个分类，包含多个作品，可以有多个标签，并属于一个活动
 */
declare const comicUniverseCollectionsRelations: drizzle_orm.Relations<"comic_universe_collections", {
    /** 所属分类 */
    category: drizzle_orm.One<"comic_universe_categories", false>;
    /** 包含的所有作品页面 */
    artworks: drizzle_orm.Many<"comic_universe_artworks">;
    /** 关联的所有标签记录 */
    collectionTags: drizzle_orm.Many<"comic_universe_collection_tags">;
}>;
/**
 * 画集标签关联表关系
 * 连接画集和标签的中间表
 */
declare const comicUniverseCollectionTagsRelations: drizzle_orm.Relations<"comic_universe_collection_tags", {
    /** 关联的画集 */
    collection: drizzle_orm.One<"comic_universe_collections", true>;
    /** 关联的标签 */
    tag: drizzle_orm.One<"comic_universe_tags", true>;
}>;
/**
 * 作品表关系
 * 作品属于一个画集
 */
declare const comicUniverseArtworksRelations: drizzle_orm.Relations<"comic_universe_artworks", {
    /** 所属画集 */
    collection: drizzle_orm.One<"comic_universe_collections", true>;
}>;

/**
 * ShowMasterpiece 模块 - 预订表结构定义
 *
 * 这个文件定义了画集预订功能的数据库表结构，使用Drizzle ORM框架。
 * 包含了预订表和相关的关系映射。
 *
 * 表结构概览：
 * - comicUniverseBookings: 画集预订表
 *
 * 设计特点：
 * - 完整的外键约束和级联删除
 * - 针对查询场景的索引优化
 * - 支持预订状态管理
 * - 记录用户联系信息和预订详情
 * - 支持用户对同一画集进行多次预订
 *
 * @fileoverview 数据库表结构 - 画集预订功能
 */
/**
 * 画集预订表 (comic_universe_bookings)
 *
 * 存储用户对画集的预订信息，包括联系方式和预订详情。
 * 支持预订状态管理和历史记录查询。
 *
 * 主要功能：
 * - 记录用户预订的画集和数量
 * - 存储用户联系方式（QQ号+手机号）
 * - 预订状态管理（待确认、已确认、已完成、已取消）
 * - 预订时间记录和备注信息
 * - 支持管理员处理预订
 * - 支持对同一画集的多次预订
 */
declare const comicUniverseBookings: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "comic_universe_bookings";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "comic_universe_bookings";
            dataType: "number";
            columnType: "PgSerial";
            data: number;
            driverParam: number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        collectionId: drizzle_orm_pg_core.PgColumn<{
            name: "collection_id";
            tableName: "comic_universe_bookings";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        qqNumber: drizzle_orm_pg_core.PgColumn<{
            name: "qq_number";
            tableName: "comic_universe_bookings";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 20;
        }>;
        phoneNumber: drizzle_orm_pg_core.PgColumn<{
            name: "phone_number";
            tableName: "comic_universe_bookings";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 20;
        }>;
        quantity: drizzle_orm_pg_core.PgColumn<{
            name: "quantity";
            tableName: "comic_universe_bookings";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        status: drizzle_orm_pg_core.PgColumn<{
            name: "status";
            tableName: "comic_universe_bookings";
            dataType: "string";
            columnType: "PgVarchar";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            length: 20;
        }>;
        notes: drizzle_orm_pg_core.PgColumn<{
            name: "notes";
            tableName: "comic_universe_bookings";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        pickupMethod: drizzle_orm_pg_core.PgColumn<{
            name: "pickup_method";
            tableName: "comic_universe_bookings";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        adminNotes: drizzle_orm_pg_core.PgColumn<{
            name: "admin_notes";
            tableName: "comic_universe_bookings";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "comic_universe_bookings";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "comic_universe_bookings";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        confirmedAt: drizzle_orm_pg_core.PgColumn<{
            name: "confirmed_at";
            tableName: "comic_universe_bookings";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        completedAt: drizzle_orm_pg_core.PgColumn<{
            name: "completed_at";
            tableName: "comic_universe_bookings";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        cancelledAt: drizzle_orm_pg_core.PgColumn<{
            name: "cancelled_at";
            tableName: "comic_universe_bookings";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 预订表关系
 * 预订属于一个画集
 */
declare const comicUniverseBookingsRelations: drizzle_orm.Relations<"comic_universe_bookings", {
    /** 预订的画集 */
    collection: drizzle_orm.One<"comic_universe_collections", true>;
}>;

/**
 * ShowMasterpiece 模块 - 弹窗配置表结构
 *
 * 管理限时弹窗的配置信息
 *
 * @fileoverview 弹窗配置数据库schema
 */
/**
 * 弹窗配置表
 */
declare const popupConfigs: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "popup_configs";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: true;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        name: drizzle_orm_pg_core.PgColumn<{
            name: "name";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        description: drizzle_orm_pg_core.PgColumn<{
            name: "description";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        type: drizzle_orm_pg_core.PgColumn<{
            name: "type";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        enabled: drizzle_orm_pg_core.PgColumn<{
            name: "enabled";
            tableName: "popup_configs";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        triggerConfig: drizzle_orm_pg_core.PgColumn<{
            name: "trigger_config";
            tableName: "popup_configs";
            dataType: "json";
            columnType: "PgJsonb";
            data: {
                /** 截止时间 ISO 字符串 */
                deadlineTime?: string;
                /** 提前提醒时间（分钟） */
                advanceMinutes?: number;
                /** 触发条件类型 */
                triggerType: "after_deadline" | "before_deadline" | "always";
            };
            driverParam: unknown;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: {
                /** 截止时间 ISO 字符串 */
                deadlineTime?: string;
                /** 提前提醒时间（分钟） */
                advanceMinutes?: number;
                /** 触发条件类型 */
                triggerType: "after_deadline" | "before_deadline" | "always";
            };
        }>;
        contentConfig: drizzle_orm_pg_core.PgColumn<{
            name: "content_config";
            tableName: "popup_configs";
            dataType: "json";
            columnType: "PgJsonb";
            data: {
                /** 弹窗标题 */
                title: string;
                /** 弹窗内容 */
                message: string;
                /** 确认按钮文本 */
                confirmText?: string;
                /** 取消按钮文本 */
                cancelText?: string;
                /** 是否显示取消按钮 */
                showCancel?: boolean;
                /** 弹窗主题 */
                theme?: "warning" | "info" | "error" | "success";
            };
            driverParam: unknown;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: {
                /** 弹窗标题 */
                title: string;
                /** 弹窗内容 */
                message: string;
                /** 确认按钮文本 */
                confirmText?: string;
                /** 取消按钮文本 */
                cancelText?: string;
                /** 是否显示取消按钮 */
                showCancel?: boolean;
                /** 弹窗主题 */
                theme?: "warning" | "info" | "error" | "success";
            };
        }>;
        displayConfig: drizzle_orm_pg_core.PgColumn<{
            name: "display_config";
            tableName: "popup_configs";
            dataType: "json";
            columnType: "PgJsonb";
            data: {
                /** 弹窗宽度 */
                width?: number;
                /** 弹窗高度 */
                height?: number | string;
                /** 是否可点击遮罩关闭 */
                maskClosable?: boolean;
                /** 自动关闭时间（秒，0表示不自动关闭） */
                autoCloseSeconds?: number;
            };
            driverParam: unknown;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: {
                /** 弹窗宽度 */
                width?: number;
                /** 弹窗高度 */
                height?: number | string;
                /** 是否可点击遮罩关闭 */
                maskClosable?: boolean;
                /** 自动关闭时间（秒，0表示不自动关闭） */
                autoCloseSeconds?: number;
            };
        }>;
        blockProcess: drizzle_orm_pg_core.PgColumn<{
            name: "block_process";
            tableName: "popup_configs";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        businessModule: drizzle_orm_pg_core.PgColumn<{
            name: "business_module";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        businessScene: drizzle_orm_pg_core.PgColumn<{
            name: "business_scene";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        sortOrder: drizzle_orm_pg_core.PgColumn<{
            name: "sort_order";
            tableName: "popup_configs";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "popup_configs";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "popup_configs";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * 弹窗配置表关系
 */
declare const popupConfigsRelations: drizzle_orm.Relations<"popup_configs", {}>;
type PopupConfig = typeof popupConfigs.$inferSelect;
type NewPopupConfig = typeof popupConfigs.$inferInsert;

/**
 * ShowMasterpiece模块 - 配置管理数据库表结构
 *
 * 独立的配置管理表，不依赖全局配置表
 * 用于模块独立化部署
 */
/**
 * ShowMasterPieces配置分类表
 * 表名：showmaster_config_categories
 */
declare const showmasterConfigCategories: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "showmaster_config_categories";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "showmaster_config_categories";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: true;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        name: drizzle_orm_pg_core.PgColumn<{
            name: "name";
            tableName: "showmaster_config_categories";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        displayName: drizzle_orm_pg_core.PgColumn<{
            name: "display_name";
            tableName: "showmaster_config_categories";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        description: drizzle_orm_pg_core.PgColumn<{
            name: "description";
            tableName: "showmaster_config_categories";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        icon: drizzle_orm_pg_core.PgColumn<{
            name: "icon";
            tableName: "showmaster_config_categories";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        sortOrder: drizzle_orm_pg_core.PgColumn<{
            name: "sort_order";
            tableName: "showmaster_config_categories";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isActive: drizzle_orm_pg_core.PgColumn<{
            name: "is_active";
            tableName: "showmaster_config_categories";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "showmaster_config_categories";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "showmaster_config_categories";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * ShowMasterPieces配置项表
 * 表名：showmaster_config_items
 */
declare const showmasterConfigItems: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "showmaster_config_items";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: true;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        categoryId: drizzle_orm_pg_core.PgColumn<{
            name: "category_id";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        key: drizzle_orm_pg_core.PgColumn<{
            name: "key";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        displayName: drizzle_orm_pg_core.PgColumn<{
            name: "display_name";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        description: drizzle_orm_pg_core.PgColumn<{
            name: "description";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        value: drizzle_orm_pg_core.PgColumn<{
            name: "value";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        defaultValue: drizzle_orm_pg_core.PgColumn<{
            name: "default_value";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        type: drizzle_orm_pg_core.PgColumn<{
            name: "type";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isRequired: drizzle_orm_pg_core.PgColumn<{
            name: "is_required";
            tableName: "showmaster_config_items";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isSensitive: drizzle_orm_pg_core.PgColumn<{
            name: "is_sensitive";
            tableName: "showmaster_config_items";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        validation: drizzle_orm_pg_core.PgColumn<{
            name: "validation";
            tableName: "showmaster_config_items";
            dataType: "json";
            columnType: "PgJsonb";
            data: unknown;
            driverParam: unknown;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        sortOrder: drizzle_orm_pg_core.PgColumn<{
            name: "sort_order";
            tableName: "showmaster_config_items";
            dataType: "number";
            columnType: "PgInteger";
            data: number;
            driverParam: string | number;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        isActive: drizzle_orm_pg_core.PgColumn<{
            name: "is_active";
            tableName: "showmaster_config_items";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        environment: drizzle_orm_pg_core.PgColumn<{
            name: "environment";
            tableName: "showmaster_config_items";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "showmaster_config_items";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "showmaster_config_items";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * ShowMasterPieces配置历史表
 * 表名：showmaster_config_history
 */
declare const showmasterConfigHistory: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "showmaster_config_history";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: true;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        configItemId: drizzle_orm_pg_core.PgColumn<{
            name: "config_item_id";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        oldValue: drizzle_orm_pg_core.PgColumn<{
            name: "old_value";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        newValue: drizzle_orm_pg_core.PgColumn<{
            name: "new_value";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        changedBy: drizzle_orm_pg_core.PgColumn<{
            name: "changed_by";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        changeReason: drizzle_orm_pg_core.PgColumn<{
            name: "change_reason";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        operationType: drizzle_orm_pg_core.PgColumn<{
            name: "operation_type";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        environment: drizzle_orm_pg_core.PgColumn<{
            name: "environment";
            tableName: "showmaster_config_history";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "showmaster_config_history";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
/**
 * ShowMasterPieces配置权限表（可选，用于细粒度权限控制）
 * 表名：showmaster_config_permissions
 */
declare const showmasterConfigPermissions: drizzle_orm_pg_core.PgTableWithColumns<{
    name: "showmaster_config_permissions";
    schema: undefined;
    columns: {
        id: drizzle_orm_pg_core.PgColumn<{
            name: "id";
            tableName: "showmaster_config_permissions";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: true;
            isPrimaryKey: true;
            isAutoincrement: false;
            hasRuntimeDefault: true;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        userId: drizzle_orm_pg_core.PgColumn<{
            name: "user_id";
            tableName: "showmaster_config_permissions";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: true;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        categoryId: drizzle_orm_pg_core.PgColumn<{
            name: "category_id";
            tableName: "showmaster_config_permissions";
            dataType: "string";
            columnType: "PgText";
            data: string;
            driverParam: string;
            notNull: false;
            hasDefault: false;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: [string, ...string[]];
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        canRead: drizzle_orm_pg_core.PgColumn<{
            name: "can_read";
            tableName: "showmaster_config_permissions";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        canWrite: drizzle_orm_pg_core.PgColumn<{
            name: "can_write";
            tableName: "showmaster_config_permissions";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        canDelete: drizzle_orm_pg_core.PgColumn<{
            name: "can_delete";
            tableName: "showmaster_config_permissions";
            dataType: "boolean";
            columnType: "PgBoolean";
            data: boolean;
            driverParam: boolean;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        allowedEnvironments: drizzle_orm_pg_core.PgColumn<{
            name: "allowed_environments";
            tableName: "showmaster_config_permissions";
            dataType: "json";
            columnType: "PgJsonb";
            data: string[];
            driverParam: unknown;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {
            $type: string[];
        }>;
        createdAt: drizzle_orm_pg_core.PgColumn<{
            name: "created_at";
            tableName: "showmaster_config_permissions";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
        updatedAt: drizzle_orm_pg_core.PgColumn<{
            name: "updated_at";
            tableName: "showmaster_config_permissions";
            dataType: "date";
            columnType: "PgTimestamp";
            data: Date;
            driverParam: string;
            notNull: false;
            hasDefault: true;
            isPrimaryKey: false;
            isAutoincrement: false;
            hasRuntimeDefault: false;
            enumValues: undefined;
            baseColumn: never;
            identity: undefined;
            generated: undefined;
        }, {}, {}>;
    };
    dialect: "pg";
}>;
type ShowmasterConfigCategory = typeof showmasterConfigCategories.$inferSelect;
type NewShowmasterConfigCategory = typeof showmasterConfigCategories.$inferInsert;
type ShowmasterConfigItem = typeof showmasterConfigItems.$inferSelect;
type NewShowmasterConfigItem = typeof showmasterConfigItems.$inferInsert;
type ShowmasterConfigHistory = typeof showmasterConfigHistory.$inferSelect;
type NewShowmasterConfigHistory = typeof showmasterConfigHistory.$inferInsert;
type ShowmasterConfigPermission = typeof showmasterConfigPermissions.$inferSelect;
type NewShowmasterConfigPermission = typeof showmasterConfigPermissions.$inferInsert;

/**
 * ShowMasterpiece模块 - 配置管理数据库服务
 *
 * 独立的配置管理服务，不依赖全局配置服务
 */

/**
 * 配置搜索参数
 */
interface ConfigSearchParams {
    categoryId?: string;
    search?: string;
    type?: 'string' | 'number' | 'boolean' | 'json' | 'password';
    environment?: string;
    isActive?: boolean;
    page?: number;
    pageSize?: number;
}
/**
 * 分页响应
 */
interface PaginatedResponse<T> {
    items: T[];
    total: number;
    page: number;
    pageSize: number;
    totalPages: number;
}
/**
 * ShowMasterPieces配置管理服务
 */
declare class ShowmasterConfigService {
    private readonly db;
    constructor(db: any);
    /**
     * 获取所有配置分类
     */
    getAllCategories(): Promise<ShowmasterConfigCategory[]>;
    /**
     * 根据ID获取配置分类
     */
    getCategoryById(id: string): Promise<ShowmasterConfigCategory | null>;
    /**
     * 根据名称获取配置分类
     */
    getCategoryByName(name: string): Promise<ShowmasterConfigCategory | null>;
    /**
     * 创建配置分类
     */
    createCategory(data: Omit<NewShowmasterConfigCategory, 'id' | 'createdAt' | 'updatedAt'>): Promise<ShowmasterConfigCategory>;
    /**
     * 更新配置分类
     */
    updateCategory(id: string, data: Partial<Omit<ShowmasterConfigCategory, 'id' | 'createdAt'>>): Promise<ShowmasterConfigCategory>;
    /**
     * 删除配置分类
     */
    deleteCategory(id: string): Promise<void>;
    /**
     * 获取配置项列表（支持分页和搜索）
     */
    getConfigItems(params?: ConfigSearchParams): Promise<PaginatedResponse<ShowmasterConfigItem>>;
    /**
     * 根据ID获取配置项
     */
    getConfigItemById(id: string): Promise<ShowmasterConfigItem | null>;
    /**
     * 根据key获取配置项
     */
    getConfigItemByKey(key: string, environment?: string): Promise<ShowmasterConfigItem | null>;
    /**
     * 创建配置项
     */
    createConfigItem(data: Omit<NewShowmasterConfigItem, 'id' | 'createdAt' | 'updatedAt'>): Promise<ShowmasterConfigItem>;
    /**
     * 更新配置项
     */
    updateConfigItem(id: string, data: Partial<Omit<ShowmasterConfigItem, 'id' | 'createdAt'>>, changedBy?: string): Promise<ShowmasterConfigItem>;
    /**
     * 删除配置项
     */
    deleteConfigItem(id: string, changedBy?: string): Promise<void>;
    /**
     * 记录配置变更历史
     */
    private recordHistory;
    /**
     * 获取配置项历史记录
     */
    getConfigItemHistory(configItemId: string, limit?: number): Promise<ShowmasterConfigHistory[]>;
    /**
     * 获取配置值（带类型转换）
     */
    getConfigValue<T = string>(key: string, environment?: string): Promise<T | null>;
    /**
     * 设置配置值
     */
    setConfigValue(key: string, value: any, environment?: string, changedBy?: string): Promise<void>;
    /**
     * 初始化默认配置分类
     */
    initializeDefaultCategories(): Promise<void>;
}
declare function createShowmasterConfigService(db: any): ShowmasterConfigService;

/**
 * ShowMasterpiece 模块 - 弹窗配置数据库服务
 *
 * 提供弹窗配置的CRUD操作
 *
 * @fileoverview 弹窗配置数据库服务
 */

declare class PopupConfigService {
    private readonly db;
    constructor(db: any);
    /**
     * 创建弹窗配置
     */
    createPopupConfig(data: Omit<NewPopupConfig, 'id' | 'createdAt' | 'updatedAt'>): Promise<PopupConfig>;
    /**
     * 根据ID获取弹窗配置
     */
    getPopupConfigById(id: string): Promise<PopupConfig | null>;
    /**
     * 获取指定业务场景的启用弹窗配置
     */
    getEnabledPopupConfigs(businessModule?: string, businessScene?: string): Promise<PopupConfig[]>;
    /**
     * 获取所有弹窗配置
     */
    getAllPopupConfigs(): Promise<PopupConfig[]>;
    /**
     * 更新弹窗配置
     */
    updatePopupConfig(id: string, data: Partial<Omit<PopupConfig, 'id' | 'createdAt'>>): Promise<PopupConfig>;
    /**
     * 删除弹窗配置
     */
    deletePopupConfig(id: string): Promise<boolean>;
    /**
     * 切换弹窗配置启用状态
     */
    togglePopupConfig(id: string, enabled: boolean): Promise<PopupConfig>;
    /**
     * 检查是否需要显示弹窗
     */
    shouldShowPopup(businessModule?: string, businessScene?: string, currentTime?: Date): Promise<PopupConfig[]>;
}
declare function createPopupConfigService(db: any): PopupConfigService;

interface MasterpiecesConfig$1 {
    siteName: string;
    siteDescription?: string;
    heroTitle: string;
    heroSubtitle?: string;
    maxCollectionsPerPage: number;
    enableSearch: boolean;
    enableCategories: boolean;
    homeTabConfig: any[];
    defaultCategory: string;
    theme: 'light' | 'dark' | 'auto';
    language: 'zh' | 'en';
}
declare class MasterpiecesConfigDbService$1 {
    private readonly db;
    constructor(db: any);
    getConfig(): Promise<MasterpiecesConfig$1>;
    updateConfig(configData: Partial<MasterpiecesConfig$1>): Promise<MasterpiecesConfig$1>;
    resetConfig(): Promise<MasterpiecesConfig$1>;
    private createDefaultConfig;
    private mapDbConfigToType;
}
declare class CategoriesDbService$1 {
    private readonly db;
    constructor(db: any);
    getCategories(): Promise<Array<{
        name: string;
        description?: string | null;
    }>>;
    createCategory(name: string, description?: string): Promise<void>;
}
declare class TagsDbService$1 {
    private readonly db;
    constructor(db: any);
    getTags(): Promise<string[]>;
    createTag(name: string, color?: string): Promise<void>;
}
declare function createMasterpiecesConfigDbService(db: any): MasterpiecesConfigDbService$1;
declare function createCategoriesDbService(db: any): CategoriesDbService$1;
declare function createTagsDbService(db: any): TagsDbService$1;

declare function initializeShowmasterpieceDb(database: any, resolver?: (fileId: string) => Promise<string | null | undefined>): void;
interface MasterpiecesConfig {
    siteName: string;
    siteDescription?: string;
    heroTitle: string;
    heroSubtitle?: string;
    maxCollectionsPerPage: number;
    enableSearch: boolean;
    enableCategories: boolean;
    homeTabConfig: any[];
    defaultCategory: string;
    theme: 'light' | 'dark' | 'auto';
    language: 'zh' | 'en';
}
type CollectionCategoryType = string;
interface ArtworkPage {
    id: number;
    title: string;
    number: string;
    image: string;
    fileId?: string;
    description: string;
    createdTime?: string;
    theme?: string;
    pageOrder: number;
}
interface ArtCollection {
    id: number;
    title: string;
    number: string;
    coverImage: string;
    coverImageFileId?: string;
    description: string;
    pages: ArtworkPage[];
    category: CollectionCategoryType;
    tags?: string[];
    isPublished?: boolean;
    price?: number;
}
interface CollectionFormData {
    title: string;
    number: string;
    coverImage: string;
    coverImageFileId?: string;
    description: string;
    category: CollectionCategoryType;
    tags: string[];
    isPublished: boolean;
    price?: number;
}
interface ArtworkFormData {
    title: string;
    number: string;
    image?: string;
    fileId?: string;
    description: string;
    createdTime?: string;
    theme?: string;
}
declare class MasterpiecesConfigDbService {
    getConfig(): Promise<MasterpiecesConfig>;
    updateConfig(configData: Partial<MasterpiecesConfig>): Promise<MasterpiecesConfig>;
    resetConfig(): Promise<MasterpiecesConfig>;
    private createDefaultConfig;
    private mapDbConfigToType;
}
declare class CategoriesDbService {
    getCategories(): Promise<Array<{
        name: string;
        description?: string | null;
    }>>;
    createCategory(name: string, description?: string): Promise<void>;
}
declare class TagsDbService {
    getTags(): Promise<string[]>;
    createTag(name: string, color?: string): Promise<void>;
}
declare class CollectionsDbService {
    private collectionsCache;
    private collectionsCacheTime;
    private collectionsOverviewCache;
    private collectionsOverviewCacheTime;
    private readonly CACHE_DURATION;
    private readonly OVERVIEW_CACHE_DURATION;
    private readonly STALE_WHILE_REVALIDATE;
    /**
     * 获取所有画集 - 优化版本
     *
     * 性能问题分析:
     * 1. 复杂的多表关联查询 - 涉及5个表的数据整合
     * 2. 作品数据量大 - 包含所有作品的完整信息（特别是图片数据）
     * 3. N+1查询风险 - 虽然使用并行查询，但仍有优化空间
     * 4. 缓存策略有限 - 2分钟缓存时间较短，首次访问必须全量查询
     *
     * 优化策略:
     * ✅ 并行查询 - 分类、标签、作品数据并行获取
     * ✅ 内存缓存 - 减少重复查询
     * ✅ 字段选择 - 只查询必要字段
     * ✅ 延长缓存时间 - 从2分钟增加到10分钟
     * ⚠️ 需要优化 - 数据库索引、分页加载、图片懒加载
     */
    getAllCollections(useCache?: boolean): Promise<ArtCollection[]>;
    /**
     * 获取画集概览 - 不包含作品详情的轻量版本
     * 适用于首页列表、搜索结果等场景
     */
    getCollectionsOverview(): Promise<Omit<ArtCollection, 'pages'>[]>;
    /**
     * 后台异步刷新完整缓存
     */
    private refreshCacheInBackground;
    /**
     * 后台异步刷新概览缓存
     */
    private refreshOverviewCacheInBackground;
    /**
     * 从数据库获取完整画集数据
     * 优化版本：不再返回Base64图片数据，只返回fileId和imageUrl
     */
    private fetchAllCollectionsFromDb;
    /**
     * 从数据库获取画集概览数据
     */
    private fetchCollectionsOverviewFromDb;
    clearCache(): void;
    createCollection(collectionData: CollectionFormData): Promise<ArtCollection>;
    updateCollection(id: number, collectionData: CollectionFormData): Promise<ArtCollection>;
    deleteCollection(id: number): Promise<void>;
    private updateCollectionTags;
    updateCollectionOrder(collectionOrders: {
        id: number;
        displayOrder: number;
    }[]): Promise<void>;
    moveCollection(collectionId: number, targetOrder: number): Promise<void>;
    moveCollectionUp(collectionId: number): Promise<void>;
    moveCollectionDown(collectionId: number): Promise<void>;
    private normalizeCollectionOrderIfNeeded;
}
declare class ArtworksDbService {
    private collectionsService;
    constructor(collectionsService: CollectionsDbService);
    addArtworkToCollection(collectionId: number, artworkData: ArtworkFormData): Promise<ArtworkPage>;
    updateArtwork(collectionId: number, artworkId: number, artworkData: ArtworkFormData): Promise<ArtworkPage>;
    deleteArtwork(collectionId: number, artworkId: number): Promise<void>;
    updateArtworkOrder(collectionId: number, artworkOrders: {
        id: number;
        pageOrder: number;
    }[]): Promise<void>;
    moveArtwork(collectionId: number, artworkId: number, targetOrder: number): Promise<void>;
    moveArtworkUp(collectionId: number, artworkId: number): Promise<void>;
    moveArtworkDown(collectionId: number, artworkId: number): Promise<void>;
    getArtworksByCollection(collectionId: number): Promise<(ArtworkPage & {
        pageOrder: number;
    })[]>;
    private buildArtworkPagesWithUrls;
}
declare const masterpiecesConfigDbService: MasterpiecesConfigDbService;
declare const categoriesDbService: CategoriesDbService;
declare const tagsDbService: TagsDbService;
declare const collectionsDbService: CollectionsDbService;
declare const artworksDbService: ArtworksDbService;

interface AdminBookingQueryInput {
    qqNumber?: string | null;
    phoneNumber?: string | null;
    status?: string | null;
    applyFiltersToStats?: boolean;
}
interface BookableCollectionsQueryInput {
    categoryId?: number;
    limit?: number;
    orderBy?: 'displayOrder' | 'createdAt' | 'title' | string;
}
interface BookingListQueryInput {
    collectionId?: number;
    qqNumber?: string;
    phoneNumber?: string;
    status?: string;
    page?: number;
    limit?: number;
}
declare class BookingQueryService {
    private readonly db;
    constructor(db: any);
    private buildAdminConditions;
    private formatAdminBooking;
    getAdminBookings(input?: AdminBookingQueryInput): Promise<any>;
    getBookableCollections(input?: BookableCollectionsQueryInput): Promise<any[]>;
    exportBookingsCsv(): Promise<string>;
    getBookingsList(input?: BookingListQueryInput): Promise<any>;
    getBookingById(id: number): Promise<any | null>;
}
declare function createBookingQueryService(db: any): BookingQueryService;

type BookingCommandErrorCode = 'INVALID_BOOKING_ID' | 'BOOKING_NOT_FOUND' | 'INVALID_PAYLOAD' | 'INVALID_PHONE' | 'INVALID_QQ' | 'INVALID_QUANTITY' | 'COLLECTION_NOT_FOUND' | 'INVALID_STATUS';
declare class BookingCommandError extends Error {
    readonly code: BookingCommandErrorCode;
    constructor(code: BookingCommandErrorCode, message: string);
}
declare class BookingCommandService {
    private readonly db;
    constructor(db: any);
    private ensureBookingExists;
    private ensureCollectionExists;
    private validatePhone;
    private validateQq;
    createBooking(body: any): Promise<any>;
    batchCreateBookings(body: any): Promise<any>;
    updateBooking(id: number, body: any): Promise<any>;
    updateBookingStatus(id: number, status: string, adminNotes?: string): Promise<any>;
    deleteBooking(id: number): Promise<void>;
}
declare function createBookingCommandService(db: any): BookingCommandService;

interface ShowMasterpieceFileRuntimeConfig {
    defaultStorage: string;
    storageProviders: Record<string, any>;
    defaultCDN: string;
    cdnProviders: Record<string, any>;
    maxFileSize: number;
    allowedMimeTypes: string[];
    cache: {
        metadataTTL: number;
        urlTTL: number;
    };
}
interface ConfigManager {
    getConfig(): ShowMasterpieceFileRuntimeConfig;
}
declare function getShowMasterpieceFileConfig(): Promise<ConfigManager>;

export { BookingCommandError, BookingCommandService, BookingQueryService, CategoriesDbService$1 as CategoriesDbService, MasterpiecesConfigDbService$1 as MasterpiecesConfigDbService, type NewPopupConfig, type NewShowmasterConfigCategory, type NewShowmasterConfigHistory, type NewShowmasterConfigItem, type NewShowmasterConfigPermission, type PopupConfig, PopupConfigService, type ShowmasterConfigCategory, type ShowmasterConfigHistory, type ShowmasterConfigItem, type ShowmasterConfigPermission, ShowmasterConfigService, TagsDbService$1 as TagsDbService, artworksDbService, categoriesDbService, collectionsDbService, comicUniverseArtworks, comicUniverseArtworksRelations, comicUniverseBookings, comicUniverseBookingsRelations, comicUniverseCategories, comicUniverseCategoriesRelations, comicUniverseCollectionTags, comicUniverseCollectionTagsRelations, comicUniverseCollections, comicUniverseCollectionsRelations, comicUniverseConfigs, comicUniverseConfigsRelations, comicUniverseTags, comicUniverseTagsRelations, createBookingCommandService, createBookingQueryService, createCategoriesDbService, createMasterpiecesConfigDbService, createPopupConfigService, createShowmasterConfigService, createTagsDbService, getShowMasterpieceFileConfig, initializeShowmasterpieceDb, masterpiecesConfigDbService, popupConfigs, popupConfigsRelations, showmasterConfigCategories, showmasterConfigHistory, showmasterConfigItems, showmasterConfigPermissions, tagsDbService };
