"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.McpAuditLog = 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 McpAuditLog = class McpAuditLog extends common_entity_1.CommonEntity {
    static _OPENAPI_METADATA_FACTORY() {
        return { userId: { required: true, type: () => Number }, apiKeyId: { required: true, type: () => Number }, username: { required: true, type: () => String }, transport: { required: true, type: () => String }, mcpSessionId: { required: true, type: () => String }, clientAddr: { required: true, type: () => String }, method: { required: true, type: () => String }, requestId: { required: true, type: () => String }, toolName: { required: true, type: () => String }, requestParams: { required: true, type: () => String }, status: { required: true, type: () => String }, responseResult: { required: true, type: () => String }, errorCode: { required: true, type: () => Number }, errorMessage: { required: true, type: () => String }, durationMs: { required: true, type: () => Number } };
    }
};
exports.McpAuditLog = McpAuditLog;
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], McpAuditLog.prototype, "userId", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], McpAuditLog.prototype, "apiKeyId", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, length: 128 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "username", void 0);
__decorate([
    (0, typeorm_1.Column)({ length: 32 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "transport", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({ nullable: true, length: 64 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "mcpSessionId", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, length: 64 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "clientAddr", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({ length: 64 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "method", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, length: 64 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "requestId", void 0);
__decorate([
    (0, typeorm_1.Index)(),
    (0, typeorm_1.Column)({ nullable: true, length: 128 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "toolName", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "requestParams", void 0);
__decorate([
    (0, typeorm_1.Column)({ length: 16 }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "status", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "responseResult", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true }),
    __metadata("design:type", Number)
], McpAuditLog.prototype, "errorCode", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('longText') }),
    __metadata("design:type", String)
], McpAuditLog.prototype, "errorMessage", void 0);
__decorate([
    (0, typeorm_1.Column)({ nullable: true, ...(0, typeorm_db_helper_1.getColumnType)('decimal') }),
    __metadata("design:type", Number)
], McpAuditLog.prototype, "durationMs", void 0);
exports.McpAuditLog = McpAuditLog = __decorate([
    (0, typeorm_1.Entity)({ name: 'ss_mcp_audit_log' })
], McpAuditLog);
//# sourceMappingURL=mcp-audit-log.entity.js.map