"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArchiveMetadata = void 0;
const uuid_1 = require("@aigne/uuid");
const sqlite_core_1 = require("drizzle-orm/sqlite-core");
exports.ArchiveMetadata = (0, sqlite_core_1.sqliteTable)("ArchiveMetadata", {
    id: (0, sqlite_core_1.text)("id")
        .notNull()
        .primaryKey()
        .$defaultFn(() => (0, uuid_1.v7)()),
    archiveFile: (0, sqlite_core_1.text)("archiveFile").notNull().unique(),
    createdAt: (0, sqlite_core_1.integer)("createdAt").notNull(),
    dateRangeStart: (0, sqlite_core_1.integer)("dateRangeStart").notNull(),
    dateRangeEnd: (0, sqlite_core_1.integer)("dateRangeEnd").notNull(),
    traceCount: (0, sqlite_core_1.integer)("traceCount").notNull(),
    spanCount: (0, sqlite_core_1.integer)("spanCount").notNull(),
    fileSize: (0, sqlite_core_1.integer)("fileSize"),
    checksum: (0, sqlite_core_1.text)("checksum"),
}, (table) => ({
    createdAtIdx: (0, sqlite_core_1.index)("archive_metadata_created_at_idx").on(table.createdAt),
    archiveFileIdx: (0, sqlite_core_1.index)("archive_metadata_archive_file_idx").on(table.archiveFile),
}));
