"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.metadata=void 0;const db_1=require("@b/db"),query_1=require("@b/utils/query");exports.metadata={summary:"Bulk deletes transactions by IDs",operationId:"bulkDeleteTransactions",tags:["Admin","Transaction"],parameters:(0,query_1.commonBulkDeleteParams)("Transactions"),requestBody:{required:!0,content:{"application/json":{schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Array of transaction IDs to delete"}},required:["ids"]}}}},responses:(0,query_1.commonBulkDeleteResponses)("Transactions"),requiresAuth:!0,permission:"delete.transaction",logModule:"ADMIN_FIN",logTitle:"Bulk Delete Transactions"};exports.default=async e=>{const{body:t,query:r,ctx:s}=e,{ids:a}=t;await db_1.models.adminProfit.destroy({where:{transactionId:a}});return(0,query_1.handleBulkDelete)({model:"transaction",ids:a,query:r})};