-- =====================================================
-- INSERT TEST TRANSACTIONS FOR BATCH NUMBER TESTING
-- Date: 2025-09-29
-- Purpose: Insert sample transactions to test batch increment
-- =====================================================

USE shukria_transactions;

-- Insert test transactions for today (2025-09-29)
INSERT INTO transactions (
    transaction_id, merchant_id, merchant_tag, bank_user_id, provider_id, 
    amount, currency, pay_mode, transaction_status, settlement_status,
    settlement_date_time, batch_number, inserted_at, updated_at
) VALUES 

-- Merchant 1: TEST_MERCHANT_001 with Provider 3 (AANI)
('TXN_20250929_001', 'TEST_MERCHANT_001', 'TEST_TAG_001', 'BANK_USER_001', 3, 
 1500.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 08:00:00', 'BATCH_001', NOW(), NOW()),
 
('TXN_20250929_002', 'TEST_MERCHANT_001', 'TEST_TAG_001', 'BANK_USER_001', 3, 
 2500.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 08:15:00', 'BATCH_001', NOW(), NOW()),

('TXN_20250929_003', 'TEST_MERCHANT_001', 'TEST_TAG_001', 'BANK_USER_001', 3, 
 750.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 08:30:00', 'BATCH_001', NOW(), NOW()),

-- Merchant 2: TEST_MERCHANT_002 with Provider 4 (Different provider)
('TXN_20250929_004', 'TEST_MERCHANT_002', 'TEST_TAG_002', 'BANK_USER_002', 4, 
 3200.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 09:00:00', 'BATCH_002', NOW(), NOW()),

('TXN_20250929_005', 'TEST_MERCHANT_002', 'TEST_TAG_002', 'BANK_USER_002', 4, 
 1800.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 09:20:00', 'BATCH_002', NOW(), NOW()),

-- Merchant 3: TEST_MERCHANT_003 with Provider 3 (Same as Merchant 1)
('TXN_20250929_006', 'TEST_MERCHANT_003', 'TEST_TAG_003', 'BANK_USER_003', 3, 
 4500.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 10:00:00', 'BATCH_003', NOW(), NOW()),

('TXN_20250929_007', 'TEST_MERCHANT_003', 'TEST_TAG_003', 'BANK_USER_003', 3, 
 650.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 10:15:00', 'BATCH_003', NOW(), NOW()),

-- Additional transactions for more realistic testing
('TXN_20250929_008', 'REAL_MERCHANT_ABC', 'REAL_TAG_ABC', 'REAL_BANK_ABC', 3, 
 8750.50, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 11:00:00', 'BATCH_004', NOW(), NOW()),

('TXN_20250929_009', 'REAL_MERCHANT_XYZ', 'REAL_TAG_XYZ', 'REAL_BANK_XYZ', 3, 
 2250.75, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 11:30:00', 'BATCH_005', NOW(), NOW()),

('TXN_20250929_010', 'REAL_MERCHANT_ABC', 'REAL_TAG_ABC', 'REAL_BANK_ABC', 3, 
 4500.00, 'AED', 'QR', 'SUCCESS', 'unmatched', 
 '2025-09-29 12:00:00', 'BATCH_004', NOW(), NOW());
