"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CreateBulkLog = void 0;
class CreateBulkLog {
    logRepository;
    constructor(logRepository) {
        this.logRepository = logRepository;
    }
    async execute(logsData) {
        if (!logsData || logsData.length === 0) {
            throw new Error('No log data provided');
        }
        // Validate each log data
        for (const logData of logsData) {
            if (!logData.projectId || !logData.level || !logData.message || !logData.timestamp) {
                throw new Error('Missing required fields in log data: projectId, level, message, timestamp');
            }
        }
        return await this.logRepository.createBulkLog(logsData);
    }
}
exports.CreateBulkLog = CreateBulkLog;
//# sourceMappingURL=createBulkLog.js.map