"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.AgentEvent = void 0;
const openapi = require("@nestjs/swagger");
const typeorm_1 = require("typeorm");
const common_entity_1 = require("./common.entity");
const typeorm_db_helper_1 = require("../helpers/typeorm-db-helper");
let AgentEvent = class AgentEvent extends common_entity_1.CommonEntity {
    static _OPENAPI_METADATA_FACTORY() {
        return { sessionId: { required: true, type: () => String }, turnNumber: { required: true, type: () => Number }, stepNumber: { required: true, type: () => Number }, eventType: { required: true, type: () => String }, eventData: { required: true, type: () => Object }, content: { required: true, type: () => String }, toolName: { required: true, type: () => String }, toolArguments: { required: true, type: () => String }, toolOutput: { required: true, type: () => String }, toolReturncode: { required: true, type: () => Number }, durationMs: { required: true, type: () => Number }, cost: { required: true, type: () => Number }, inputTokens: { required: true, type: () => Number }, outputTokens: { required: true, type: () => Number }, modelUsed: { required: true, type: () => String } };
    }
};
exports.AgentEvent = AgentEvent;
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({}),
    __metadata("design:type", String)
], AgentEvent.prototype, "sessionId", void 0);
__decorate([
    (0, typeorm_1.Column)({}),
    __metadata("design:type", Number)
], AgentEvent.prototype, "turnNumber", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], AgentEvent.prototype, "stepNumber", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({}),
    __metadata("design:type", String)
], AgentEvent.prototype, "eventType", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
    __metadata("design:type", Object)
], AgentEvent.prototype, "eventData", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
    __metadata("design:type", String)
], AgentEvent.prototype, "content", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", String)
], AgentEvent.prototype, "toolName", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
    __metadata("design:type", String)
], AgentEvent.prototype, "toolArguments", void 0);
__decorate([
    (0, typeorm_1.Column)({ type: "simple-json", nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('simpleJsonLargeText') }),
    __metadata("design:type", String)
], AgentEvent.prototype, "toolOutput", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], AgentEvent.prototype, "toolReturncode", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
    __metadata("design:type", Number)
], AgentEvent.prototype, "durationMs", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
    __metadata("design:type", Number)
], AgentEvent.prototype, "cost", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], AgentEvent.prototype, "inputTokens", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], AgentEvent.prototype, "outputTokens", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", String)
], AgentEvent.prototype, "modelUsed", void 0);
exports.AgentEvent = AgentEvent = __decorate([
    (0, typeorm_1.Entity)({ name: 'ss_agent_events' })
], AgentEvent);
//# sourceMappingURL=agent-event.entity.js.map