<?php
require_once __DIR__ . '/config.php';
require_once __DIR__ . '/includes/db.php';
$db = DB();
try {
    $db->insert('affiliation_applications', [
        'application_number'         => 'AFF12345678',
        'institution_name'           => 'Test Inst',
        'institution_type'           => 'Trust',
        'established_year'           => 2020,
        'registration_number'        => 'REG123',
        'total_staff'                => 10,
        'director_name'              => 'John Doe',
        'director_mobile'            => '1234567890',
        'director_email'             => 'test@test.com',
        'director_photo'             => '',
        'landline'                   => '',
        'address'                    => 'Test addr',
        'city'                       => 'Test city',
        'district'                   => 'Test dist',
        'state'                      => 'Test state',
        'pincode'                    => '123456',
        'building_type'              => 'owned',
        'total_area'                 => '1000',
        'number_of_classrooms'       => 5,
        'library_facility'           => 1,
        'computer_lab'               => 1,
        'internet_facility'          => 1,
        'courses_applied'            => '[]',
        'affiliation_fee_transaction_id' => 'TXN123',
        'application_status'         => 'submitted',
        'submitted_at'               => date('Y-m-d H:i:s'),
        'ip_address'                 => '127.0.0.1',
        
        'father_guardian_name'       => '',
        'registered_address'         => '',
        'communication_address'      => '',
        'whatsapp_no'                => '',
        'registration_date'          => '2020-01-01',
        'pan_gst_no'                 => '',
        'identity_proof_no'          => '',
        'bank_name'                  => '',
        'bank_account_no'            => '',
        'bank_ifsc'                  => '',
        'applied_for'                => 'Vocational',
        'proposed_center_name'       => '',
        'practical_lab_facility'     => 1,
        'computer_systems_available' => 1,
        'total_computers'            => 10,
        'power_backup_facility'      => 1,
        'clean_drinking_water'       => 1,
        'furniture_available'        => 1,
        'washroom_facility'          => 1,
        'safety_fire_extinguisher'   => 1,
        'faculty_details'            => '[]',
        'courses_applied_details'    => '[]',
        'documents_attached'         => '',
        'uploaded_documents'         => '[]'
    ]);
    echo "SUCCESS";
} catch (Exception $e) {
    echo "ERROR: " . $e->getMessage();
}
