-- DATE 20-03-2026 Category Documents import DEV[DONE] QA[PENDING]

-- Start Insert Guidelines / Manuals Document 
-- Get category ID
SET @gm_category_id = (
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='guidelines-manuals' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'PAIA manual 2024-25',
    'PAIA_Manual.pdf',
    @gm_category_id,
    '',
    'shortsummary/PAIA_manual_2024-25.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PAIA_Manual.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en', 'audio/en/PAIA_Manual_en.mp3',
        'audio_af', 'audio/af/PAIA_Manual_af.mp3',
        'audio_xh', 'audio/xh/PAIA_Manual_xh.mp3',
        'color', '#ffd258',
        'icon', 'faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    1
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'RENTAL HOUSING TRIBUNAL2',
    'RENTAL HOUSING TRIBUNAL.pdf',
    @gm_category_id,
    '',
    'shortsummary/RENTAL_HOUSING_TRIBUNAL2.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/RENTAL HOUSING TRIBUNAL.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en', 'audio/en/RENTAL HOUSING TRIBUNAL_en.mp3',
        'audio_af', 'audio/af/RENTAL HOUSING TRIBUNAL_af.mp3',
        'audio_xh', 'audio/xh/RENTAL HOUSING TRIBUNAL_xh.mp3',
        'color', '#ffd258',
        'icon', 'faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    1
);

COMMIT;

-- End Insert Guidelines / Manuals Document 


-- Start Insert Legislation Document 

-- Get category ID
SET @le_category_id = (
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='legislation' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Communal Property Associates Act.pdf','communal Property Associates Act.pdf',@le_category_id,'','shortsummary/Communal Property Associations Act.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/communal Property Associates Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/communal Property Associates Act_en.mp3','audio_af','audio/af/communal Property Associates Act_af.mp3','audio_xh','audio/xh/communal Property Associates Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Community Schemes Ombud Service Act 2011','Community_Schemes_Ombud_Service Act.pdf',@le_category_id,'','shortsummary/Community_Schemes_Ombud_Service Act_2011.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Community_Schemes_Ombud_Service Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Community_Schemes_Ombud_Service Act_en.mp3','audio_af','audio/af/Community_Schemes_Ombud_Service Act_af.mp3','audio_xh','audio/xh/Community_Schemes_Ombud_Service Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Deeds Registries Act 47 of 1937','Deeds Registries Act 47 of 1937.pdf',@le_category_id,'','shortsummary/Deeds Registries Act 47 of 1937.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Deeds Registries Act 47 of 1937.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Deeds Registries Act 47 of 1937_en.mp3','audio_af','audio/af/Deeds Registries Act 47 of 1937_af.mp3','audio_xh','audio/xh/Deeds Registries Act 47 of 1937_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 4
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Development Facilitation Act (No. 67)','Development Facilitation Act_.pdf',@le_category_id,'','shortsummary/Development Facilitation Act (No. 67).html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Development Facilitation Act_.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Development Facilitation Act__en.mp3','audio_af','audio/af/Development Facilitation Act__af.mp3','audio_xh','audio/xh/Development Facilitation Act__xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 5
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Extension of Security of Tenure Act (ETSA)','Extension of Security of Tenure Act_.pdf',@le_category_id,'','shortsummary/Extension of Security of Tenure Act (ETSA).html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Extension of Security of Tenure Act_.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Extension of Security of Tenure Act__en.mp3','audio_af','audio/af/Extension of Security of Tenure Act__af.mp3','audio_xh','audio/xh/Extension of Security of Tenure Act__xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Home Loan and Mortgage Act','Home Loan and Mortgage Disclosure Act.pdf',@le_category_id,'','shortsummary/home_loan_and_mortgage_act.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Home Loan and Mortgage Disclosure Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Home Loan and Mortgage Disclosure Act_en.mp3','audio_af','audio/af/Home Loan and Mortgage Disclosure Act_af.mp3','audio_xh','audio/xh/Home Loan and Mortgage Disclosure Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 7
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents  
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'HOUSING ACT 107 OF 1997','Housing Act.pdf',@le_category_id,'','shortsummary/Housing_Act_107_of_1997_0.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Housing Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Housing Act_en.mp3','audio_af','audio/af/Housing Act_af.mp3','audio_xh','audio/xh/Housing Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 8
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Housing Consumer Act.pdf','Housing Consumer Act.pdf',@le_category_id,'','shortsummary/Housing Consumer Act.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Housing Consumer Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Housing_Consumer_Act_en.mp3','audio_af','audio/af/Housing_Consumer_Act_af.mp3','audio_xh','audio/xh/Housing_Consumer_Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 9
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Housing Act 107 of 1997_0','Housing Act.pdf',@le_category_id,'','shortsummary/Housing_Act_107_of_1997_0.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Housing Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Housing Act_en.mp3','audio_af','audio/af/Housing Act_af.mp3','audio_xh','audio/xh/Housing Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 10
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Infrastructure Development Act (No. 23)','Infrastructure development act_.pdf',@le_category_id,'','shortsummary/Infrastructure Development Act (No. 23).html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Infrastructure development act_.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Infrastructure development act__en.mp3','audio_af','audio/af/Infrastructure development act__af.mp3','audio_xh','audio/xh/Infrastructure development act__xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);
-- =========================
-- Document 11
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Prevention of Illegal Eviction from and Unlawful Occupation of Land Act 1998','Prevention of Illegal Eviction from and Unlawful Occupation of Land Act_.pdf',@le_category_id,'','shortsummary/Prevention_of_Illegal_Eviction_from_and_Unlawful_Occupation_.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act_.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act__en.mp3','audio_af','audio/af/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act__af.mp3','audio_xh','audio/xh/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act__xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 12
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents  
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Prevention of illegal eviction','Prevention of Illegal Eviction from and Unlawful Occupation of Land Act_.pdf',@le_category_id,'','shortsummary/Prevention_of_Illegal_Eviction_from_and_Unlawful_Occupation_.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act_.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act__en.mp3','audio_af','audio/af/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act__af.mp3','audio_xh','audio/xh/Prevention of Illegal Eviction from and Unlawful Occupation of Land Act__xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 13
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Rental Housing Amendment No. 35 of 2014','Rental housing Amendment Act No 35 of 2014.pdf',@le_category_id,'','shortsummary/Rental Housing Act.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Rental housing Amendment Act No 35 of 2014.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Rental housing Amendment Act 43 of 2007_en.mp3','audio_af','audio/af/Rental housing Amendment Act 43 of 2007_af.mp3','audio_xh','audio/xh/Rental housing Amendment Act 43 of 2007_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 14
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Rental housing Amendment Act No 35 of 2014','Rental housing Amendment Act No 35 of 2014.pdf',@le_category_id,'','shortsummary/Rental Housing Amendment No. 35 of 2014.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Rental housing Amendment Act No 35 of 2014.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Rental housing Amendment Act No 35 of 2014_en.mp3','audio_af','audio/af/Rental housing Amendment Act No 35 of 2014_af.mp3','audio_xh','audio/xh/Rental housing Amendment Act No 35 of 2014_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 15
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Rental housing Amendment Act 43 of 2007','Rental housing Amendment Act 43 of 2007.pdf',@le_category_id,'','shortsummary/Rental_Housing_Amendment_Act 43 of2007 pdf.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Rental housing Amendment Act 43 of 2007.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Rental housing Amendment Act 43 of 2007_en.mp3','audio_af','audio/af/Rental housing Amendment Act 43 of 2007_af.mp3','audio_xh','audio/xh/Rental housing Amendment Act 43 of 2007_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 16
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Sectional Titles Schemes Management Act, 2011','Sectional titles schemes ACt.pdf',@le_category_id,'','shortsummary/Sectional titles schemes ACt.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Sectional titles schemes ACt.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Sectional titles schemes ACt_en.mp3','audio_af','audio/af/Sectional titles schemes ACt_af.mp3','audio_xh','audio/xh/Sectional titles schemes ACt_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 17
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Social Housing Act','Social housing act.pdf',@le_category_id,'','shortsummary/Social Housing Act.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Social housing act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Social housing act_en.mp3','audio_af','audio/af/Social housing act_af.mp3','audio_xh','audio/xh/Social housing act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

-- =========================
-- Document 18
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents 
(doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,doc_file_path, doc_type, doc_size, doc_level, extra_data,is_active, creation_date, created_by)
VALUES (@document_id,'Upgrading of Land Tenure Rights Act','Upgrading of Land Tenure Rights Act.pdf',@le_category_id,'','shortsummary/Upgrading of Land Tenure Rights Act.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Upgrading of Land Tenure Rights Act.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Upgrading of Land Tenure Rights Act_en.mp3','audio_af','audio/af/Upgrading of Land Tenure Rights Act_af.mp3','audio_xh','audio/xh/Upgrading of Land Tenure Rights Act_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),1);

COMMIT;

-- End Insert Legislation Document


-- Start Insert Policy / Programme Document  

-- Get category ID
SET @ppd_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-programme-documents' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'BNG Housing',
    'BNG Housing.pdf',
    @ppd_category_id,
    '',
    'shortsummary/BNG Housing.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/BNG Housing.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/BNG Housing_en.mp3',
        'audio_af','audio/af/BNG Housing_af.mp3',
        'audio_xh','audio/xh/BNG Housing_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'First Home Finance Brochure (Sep 2023)',
    'First Home Finance_Booklet.pdf',
    @ppd_category_id,
    '',
    'shortsummary/First Home Finance Brochure Sep 2023.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/First Home Finance_Booklet.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/FHF-BROCHURE-Sep-2023_WhatisFHF_en.mp3',
        'audio_af','audio/af/FHF-BROCHURE-Sep-2023_WhatisFHF_af.mp3',
        'audio_xh','audio/xh/FHF-BROCHURE-Sep-2023_WhatisFHF_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'First Home Finance Presentation PPRA 2024',
    'first_home_finance_presentation_ppra_2024_.pdf',
    @ppd_category_id,
    '',
    'shortsummary/first_home_finance_presentation_ppra_2024_.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/first_home_finance_presentation_ppra_2024_.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/First Home Finance_Booklet_en.mp3',
        'audio_af','audio/af/First Home Finance_Booklet_af.mp3',
        'audio_xh','audio/xh/First Home Finance_Booklet_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 4
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'REDBOOK (Part 1)',
    'REDBOOK_Part_1_(Planning & design guidelines).pdf',
    @ppd_category_id,
    '',
    'shortsummary/REDBOOK_Part_1_v1-1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/REDBOOK_Part_1_(Planning & design guidelines).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/REDBOOK_Part_1_(Planning & design guidelines)_en.mp3',
        'audio_af','audio/af/REDBOOK_Part_1_(Planning & design guidelines)_af.mp3',
        'audio_xh','audio/xh/REDBOOK_Part_1_(Planning & design guidelines)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 5
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Report on FLISP',
    'REPORT FLISP.pdf',
    @ppd_category_id,
    '',
    'shortsummary/REPORT FLISP.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/REPORT FLISP.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/REPORT FLISP_en.mp3',
        'audio_af','audio/af/REPORT FLISP_af.mp3',
        'audio_xh','audio/xh/REPORT FLISP_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Policy / Programme Document  

-- Start Insert Reports & Evaluations Document  

-- Get category ID
SET @re_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='reports-evaluations' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Baseline Evaluation of Informal Settlements targeted for upgrading in the 2019-2024 MTSF',
    'BASELINE EVALUATION OF IS TARGETED FOR UPGRADE.pdf',
    @re_category_id,
    '',
    'shortsummary/BASELINE EVALUATION OF IS TARGETED FOR UPGRADE_REPORT 28-01-20221.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/BASELINE EVALUATION OF IS TARGETED FOR UPGRADE.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/BASELINE EVALUATION OF IS TARGETED FOR UPGRADE_en.mp3',
        'audio_af','audio/af/BASELINE EVALUATION OF IS TARGETED FOR UPGRADE_af.mp3',
        'audio_xh','audio/xh/BASELINE EVALUATION OF IS TARGETED FOR UPGRADE_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'DEP Human Settlements Annual Report 2016-17',
    'DEP Human Settlements Annual Report 2016-17.pdf',
    @re_category_id,
    '',
    'shortsummary/DEP Human Settlements Annual Report 2016-17.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/DEP Human Settlements Annual Report 2016-17.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/DEP_Human_Settlements_Annual_Report_2016-17_en.mp3',
        'audio_af','audio/af/DEP_Human_Settlements_Annual_Report_2016-17_af.mp3',
        'audio_xh','audio/xh/DEP_Human_Settlements_Annual_Report_2016-17_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Human Settlement AR2024 Website',
    'Human Setllement AR2024 Website.pdf',
    @re_category_id,
    '',
    'shortsummary/Human Setllement AR2024.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Human Setllement AR2024 Website.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Human_Setllement_AR2024_Website_en.mp3',
        'audio_af','audio/af/Human_Setllement_AR2024_Website_af.mp3',
        'audio_xh','audio/xh/Human_Setllement_AR2024_Website_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 4
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Human Settlements 2016/2017 Yearbook',
    'Alternative and Sustainable Infrastructure Solutions for Human Settlements_Study_2017.pdf',
    @re_category_id,
    '',
    'shortsummary/HumanSettlements2017.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Alternative and Sustainable Infrastructure Solutions for Human Settlements_Study_2017.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Human_Settlements_Yearbook_2016-17_Draft_9th_May_2025_Dave_en.mp3',
        'audio_af','audio/af/Human_Settlements_Yearbook_2016-17_Draft_9th_May_2025_Dave_af.mp3',
        'audio_xh','audio/xh/Human_Settlements_Yearbook_2016-17_Draft_9th_May_2025_Dave_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 5
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'IDP Full Report (09-2022)',
    'IDP_Annual_Report.pdf',
    @re_category_id,
    '',
    'shortsummary/IDP FULL REPORT-09-2022.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/IDP_Annual_Report.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/IDP_Annual_Report_en.mp3',
        'audio_af','audio/af/IDP_Annual_Report_af.mp3',
        'audio_xh','audio/xh/IDP_Annual_Report_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Vote 33 Human Settlements AN',
    'Vote 33 Human Settlements.pdf',
    @re_category_id,
    '',
    'shortsummary/Vote 33 Human Settlements_AN.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Vote 33 Human Settlements.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Vote 33 Human Settlements_en.mp3',
        'audio_af','audio/af/Vote 33 Human Settlements_af.mp3',
        'audio_xh','audio/xh/Vote 33 Human Settlements_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Reports & Evaluations Document  

-- Start Insert Prescripts, Delegation & Case Law Document  

-- Get category ID
SET @pdc_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='prescripts-delegation-case-law' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'MFMA',
    'MFMA.pdf',
    @pdc_category_id,
    '',
    'shortsummary/MFMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/MFMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/MFMA_en.mp3',
        'audio_af','audio/af/MFMA_af.mp3',
        'audio_xh','audio/xh/MFMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'PFMA',
    'PFMA.pdf',
    @pdc_category_id,
    '',
    'shortsummary/PFMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PFMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/PFMA_en.mp3',
        'audio_af','audio/af/PFMA_af.mp3',
        'audio_xh','audio/xh/PFMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NIP 2050',
    'NIP 2050.pdf',
    @pdc_category_id,
    '',
    'shortsummary/NIP 2050.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NIP 2050.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NIP 2050_en.mp3',
        'audio_af','audio/af/NIP 2050_af.mp3',
        'audio_xh','audio/xh/NIP 2050_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 4
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'SPLUMA',
    'SPLUMA.pdf',
    @pdc_category_id,
    '',
    'shortsummary/SPLUMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/SPLUMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/SPLUMA_en.mp3',
        'audio_af','audio/af/SPLUMA_af.mp3',
        'audio_xh','audio/xh/SPLUMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 5
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Western cape_strategic_plan_2019-2024 (PSP)',
    'PSP_western_cape_strategic_plan_2019-2024 (PSP).pdf',
    @pdc_category_id,
    '',
    'shortsummary/western_cape_strategic_plan_2019-2024%20(PSP).html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PSP_western_cape_strategic_plan_2019-2024 (PSP).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/WCCCRS (CCC Response Strategy)_en.mp3',
        'audio_af','audio/af/WCCCRS (CCC Response Strategy)_af.mp3',
        'audio_xh','audio/xh/WCCCRS (CCC Response Strategy)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Growth-for-Jobs-Strategy-2023-Cabinet-Approved',
    'Growth-for-Jobs-Strategy-2023-Cabinet-Approved.pdf',
    @pdc_category_id,
    '',
    'shortsummary/Growth-for-Jobs-Strategy-2023-Cabinet-Approved.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Growth-for-Jobs-Strategy-2023-Cabinet-Approved.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_en.mp3',
        'audio_af','audio/af/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_af.mp3',
        'audio_xh','audio/xh/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 7
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'WCIS2050 V4_Final',
    'V4 FINAL_ WCIIP 2050.pdf',
    @pdc_category_id,
    '',
    'shortsummary/WCIIP_2050_v1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/V4 FINAL_ WCIIP 2050.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/V4_FINAL_WCIIP_2050_en.mp3',
        'audio_af','audio/af/V4_FINAL_WCIIP_2050_af.mp3',
        'audio_xh','audio/xh/V4_FINAL_WCIIP_2050_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 8
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'WCIS2050_v1',
    'WCIS2050 V4_Final.pdf',
    @pdc_category_id,
    '',
    'shortsummary/WCIS2050_v1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/WCIS2050 V4_Final.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/WCIS2050_V4_Final_en.mp3',
        'audio_af','audio/af/WCIS2050_V4_Final_af.mp3',
        'audio_xh','audio/xh/WCIS2050_V4_Final_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 9
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'V10 - WCIF_ 1',
    'V10 - WCIF_ 1.pdf',
    @pdc_category_id,
    '',
    'shortsummary/V10_WCIF_1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/V10 - WCIF_ 1.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/V10_-_WCIF_1_en.mp3',
        'audio_af','audio/af/V10_-_WCIF_1_af.mp3',
        'audio_xh','audio/xh/V10_-_WCIF_1_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Prescripts, Delegation & Case Law Document  

-- Start Insert Climate, Environment & Sustainability Document  

-- Get category ID
SET @ces_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='climate-environment-sustainability' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Climate Change Response Strategy_M&E Report_2015-16',
    'Climate Change Response Strategy_M&E Report_2015-16.pdf',
    @ces_category_id,
    '',
    'shortsummary/Climate Change Response Strategy_M&E Report_2015-16.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Climate Change Response Strategy_M&E Report_2015-16.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Climate Change Response Strategy_M&E Report_2015-16_en.mp3',
        'audio_af','audio/af/Climate Change Response Strategy_M&E Report_2015-16_af.mp3',
        'audio_xh','audio/xh/Climate Change Response Strategy_M&E Report_2015-16_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- Document 2
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (doc_id,doc_name,doc_full_name,doc_cat_id,doc_category,doc_desc,doc_file_path,doc_type,doc_size,doc_level,extra_data,is_active,creation_date,created_by)
VALUES (@document_id,'Climate Science Input into Municipal Plans_Report_2014_0','Climate Science Input into Municipal Plans_Report_2014_0.pdf',@ces_category_id,'','shortsummary/Climate Science Input into Municipal Plans_Report_2014_0.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Climate Science Input into Municipal Plans_Report_2014_0.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Climate Science Input into Municipal Plans_Report_2014_0_en.mp3','audio_af','audio/af/Climate Science Input into Municipal Plans_Report_2014_0_af.mp3','audio_xh','audio/xh/Climate Science Input into Municipal Plans_Report_2014_0_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),171);

-- Document 3
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (doc_id,doc_name,doc_full_name,doc_cat_id,doc_category,doc_desc,doc_file_path,doc_type,doc_size,doc_level,extra_data,is_active,creation_date,created_by)
VALUES (@document_id,'Energy Consumption &CO2e Emissions Database WC - Web','Energy Consumption &CO2e Emissions Database WC - Web.pdf',@ces_category_id,'','shortsummary/Energy Consumption and CO2e Emissions Database WC - Web.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Energy Consumption &CO2e Emissions Database WC - Web.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Energy Consumption &CO2e Emissions Database WC - Web_en.mp3','audio_af','audio/af/Energy Consumption &CO2e Emissions Database WC - Web_af.mp3','audio_xh','audio/xh/Energy Consumption &CO2e Emissions Database WC - Web_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),171);

-- Document 4
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (doc_id,doc_name,doc_full_name,doc_cat_id,doc_category,doc_desc,doc_file_path,doc_type,doc_size,doc_level,extra_data,is_active,creation_date,created_by)
VALUES (@document_id,'GBCSA-Certification-Pricing-Brochure-FA','GBCSA-Certification-Pricing-Brochure-FA.pdf',@ces_category_id,'','shortsummary/GBCSA-Certification-Pricing-Brochure-FA.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/GBCSA-Certification-Pricing-Brochure-FA.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/GBCSA-Certification-Pricing-Brochure-FA_en.mp3','audio_af','audio/af/GBCSA-Certification-Pricing-Brochure-FA_af.mp3','audio_xh','audio/xh/GBCSA-Certification-Pricing-Brochure-FA_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),171);

-- Document 5
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (doc_id,doc_name,doc_full_name,doc_cat_id,doc_category,doc_desc,doc_file_path,doc_type,doc_size,doc_level,extra_data,is_active,creation_date,created_by)
VALUES (@document_id,'Green_Economy_Report 2022_Final','Green_Economy_Report 2022_Final.pdf',@ces_category_id,'','shortsummary/Green_Economy_Report 2022_Final.html','https://gov-api.qadoi.platform.org.za/uploads/app_documents/Green_Economy_Report 2022_Final.pdf','PDF','','eve',JSON_OBJECT('audio_en','audio/en/Green_Economy_Report 2022_Final_en.mp3','audio_af','audio/af/Green_Economy_Report 2022_Final_af.mp3','audio_xh','audio/xh/Green_Economy_Report 2022_Final_xh.mp3','color','#ffd258','icon','faFilePdf'),1,CURRENT_TIMESTAMP(),171);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NDC September 2021',
    'NDC September 2021.pdf',
    @ces_category_id,
    '',
    'shortsummary/NDC_September_2021.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NDC September 2021.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NDC September 2021_en.mp3',
        'audio_af','audio/af/NDC September 2021_af.mp3',
        'audio_xh','audio/xh/NDC September 2021_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 7
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013',
    'STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013.pdf',
    @ces_category_id,
    '',
    'shortsummary/STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013_en.mp3',
        'audio_af','audio/af/STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013_af.mp3',
        'audio_xh','audio/xh/STATE OF ENVIRONMENT OUTLOOK REPORT FOR THE WESTERN CAPE 2013_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 8
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'WC Climate Change Response Strategy Biennial M&E Report (2017-18)_1',
    'WC Climate Change Response Strategy Biennial M&E Report (2017-18)_1 (1).pdf',
    @ces_category_id,
    '',
    'shortsummary/WC_Climate_Change_Response_Strategy_Biennial_M&E_Report_(2017-18)_1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/WC Climate Change Response Strategy Biennial M&E Report (2017-18)_1 (1).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/WC Climate Change Response Strategy Biennial M&E Report (2017-18)_1 (1)_en.mp3',
        'audio_af','audio/af/WC Climate Change Response Strategy Biennial M&E Report (2017-18)_1 (1)_af.mp3',
        'audio_xh','audio/xh/WC Climate Change Response Strategy Biennial M&E Report (2017-18)_1 (1)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 9
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'WC Sustainable Water Management Plan 2018',
    'WC Sustainable Water Management Plan 2018.pdf',
    @ces_category_id,
    '',
    'shortsummary/WC Sustainable Water Management Plan 2018.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/WC Sustainable Water Management Plan 2018.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/WC Sustainable Water Management Plan 2018_en.mp3',
        'audio_af','audio/af/WC Sustainable Water Management Plan 2018_af.mp3',
        'audio_xh','audio/xh/WC Sustainable Water Management Plan 2018_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 10
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Western Cape Climate Change Mitigation Scenarios for the Energy Scenarios_Report_2015',
    'Western Cape Climate Change Mitigation Scenarios for the Energy Scenarios_Report_2015.pdf',
    @ces_category_id,
    '',
    'shortsummary/Western_Cape_Climate_Change_Mitigation_Scenarios_for_the_Energy_Scenarios_Report_2015.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Western Cape Climate Change Mitigation Scenarios for the Energy Scenarios_Report_2015.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Western Cape Climate Change Mitigation Scenarios for the Energy Scenarios_Report_2015_en.mp3',
        'audio_af','audio/af/Western Cape Climate Change Mitigation Scenarios for the Energy Scenarios_Report_2015_af.mp3',
        'audio_xh','audio/xh/Western Cape Climate Change Mitigation Scenarios for the Energy Scenarios_Report_2015_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 11
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'CCA-Africa-Final',
    'CCA-Africa-Final.pdf',
    @ces_category_id,
    '',
    'shortsummary/CCA-Africa-Final.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/CCA-Africa-Final.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/CCA-Africa-Final_en.mp3',
        'audio_af','audio/af/CCA-Africa-Final_af.mp3',
        'audio_xh','audio/xh/CCA-Africa-Final_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 12
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Climate Change Response Strategy_M&E Report_2015-16',
    'Climate Change Response Strategy_M&E Report_2015-16.pdf',
    @ces_category_id,
    '',
    'shortsummary/Climate Change Response Strategy_M&E Report_2015-16.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Climate Change Response Strategy_M&E Report_2015-16.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Climate Change Response Strategy_M&E Report_2015-16_en.mp3',
        'audio_af','audio/af/Climate Change Response Strategy_M&E Report_2015-16_af.mp3',
        'audio_xh','audio/xh/Climate Change Response Strategy_M&E Report_2015-16_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 13
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Green BCSA',
    'Green BCSA.pdf',
    @ces_category_id,
    '',
    'shortsummary/Green BCSA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Green BCSA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Green BCSA_en.mp3',
        'audio_af','audio/af/Green BCSA_af.mp3',
        'audio_xh','audio/xh/Green BCSA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 14
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'WCCCRS (CCC Response Strategy)',
    'WCCCRS (CCC Response Strategy).pdf',
    @ces_category_id,
    '',
    'shortsummary/WCCCRS (CCC Response Strategy).html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/WCCCRS (CCC Response Strategy).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/WCCCRS (CCC Response Strategy)_en.mp3',
        'audio_af','audio/af/WCCCRS (CCC Response Strategy)_af.mp3',
        'audio_xh','audio/xh/WCCCRS (CCC Response Strategy)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Climate, Environment & Sustainability Document  

-- Start Insert Economic, Growth Development & Employment Document  

-- Get category ID
SET @egde_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='economic-growth-development-employment' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Growth-for-Jobs-Strategy-2023-Cabinet-Approved',
    'Growth-for-Jobs-Strategy-2023-Cabinet-Approved.pdf',
    @egde_category_id,
    '',
    'shortsummary/Growth-for-Jobs-Strategy-2023-Cabinet-Approved.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Growth-for-Jobs-Strategy-2023-Cabinet-Approved.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_en.mp3',
        'audio_af','audio/af/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_af.mp3',
        'audio_xh','audio/xh/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NLTF 2023-2038',
    'NLTF 2023-2028.pdf',
    @egde_category_id,
    '',
    'shortsummary/NLTF 2023-2038.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NLTF 2023-2028.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NLTF 2023-2028_en.mp3',
        'audio_af','audio/af/NLTF 2023-2028_af.mp3',
        'audio_xh','audio/xh/NLTF 2023-2028_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NLTF',
    'NLTF.pdf',
    @egde_category_id,
    '',
    'shortsummary/NLTF.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NLTF.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NLTF_en.mp3',
        'audio_af','audio/af/NLTF_af.mp3',
        'audio_xh','audio/xh/NLTF_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Economic, Growth Development & Employment Document  

-- Start Insert Governance & Oversight Document  

-- Get category ID
SET @go_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='governance-oversight' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Building Standards Act',
    'building_standards_act.pdf',
    @go_category_id,
    '',
    'shortsummary/building_standards_act.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/building_standards_act.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/building_standards_act_en.mp3',
        'audio_af','audio/af/building_standards_act_af.mp3',
        'audio_xh','audio/xh/building_standards_act_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'GRPB-framework-250119A',
    'GRPB-framework-250119A.pdf',
    @go_category_id,
    '',
    'shortsummary/GRPB-framework-250119A.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/GRPB-framework-250119A.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/GRPB-framework-250119A_en.mp3',
        'audio_af','audio/af/GRPB-framework-250119A_af.mp3',
        'audio_xh','audio/xh/GRPB-framework-250119A_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'IPDMArt3ValueFormoney',
    'IPDMArt3ValueFormoney.pdf',
    @go_category_id,
    '',
    'shortsummary/IPDMArt3ValueFormoney.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/IPDMArt3ValueFormoney.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/IPDMArt3ValueFormoney_en.mp3',
        'audio_af','audio/af/IPDMArt3ValueFormoney_af.mp3',
        'audio_xh','audio/xh/IPDMArt3ValueFormoney_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 4
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'King-IV-Summary-1-November-2016',
    'King-IV-Summary-1-November-2016.pdf',
    @go_category_id,
    '',
    'shortsummary/King-IV-Summary-1-November-2016.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/King-IV-Summary-1-November-2016.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/King-IV-Summary-1-November-2016_en.mp3',
        'audio_af','audio/af/King-IV-Summary-1-November-2016_af.mp3',
        'audio_xh','audio/xh/King-IV-Summary-1-November-2016_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 5
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'MFMA',
    'MFMA.pdf',
    @go_category_id,
    '',
    'shortsummary/MFMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/MFMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/MFMA_en.mp3',
        'audio_af','audio/af/MFMA_af.mp3',
        'audio_xh','audio/xh/MFMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'PFMA',
    'PFMA.pdf',
    @go_category_id,
    '',
    'shortsummary/PFMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PFMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/PFMA_en.mp3',
        'audio_af','audio/af/PFMA_af.mp3',
        'audio_xh','audio/xh/PFMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 7
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Policy framework for the gwme system',
    'policy framework for the gwme system.pdf',
    @go_category_id,
    '',
    'shortsummary/policy framework for the gwme system.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/policy framework for the gwme system.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/policy_framework_for_the_gwme_system_en.mp3',
        'audio_af','audio/af/policy_framework_for_the_gwme_system_af.mp3',
        'audio_xh','audio/xh/policy_framework_for_the_gwme_system_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 8
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Specification for OHS - Nov draft',
    'Specification for OHS - Nov draft.pdf',
    @go_category_id,
    '',
    'shortsummary/Specification for OHS - Nov draft.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Specification for OHS - Nov draft.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Specification_for_OHS_-_Nov_draft_en.mp3',
        'audio_af','audio/af/Specification_for_OHS_-_Nov_draft_af.mp3',
        'audio_xh','audio/xh/Specification_for_OHS_-_Nov_draft_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Governance & Oversight Document  

-- Start Insert National Strategic Planning & Development Document  

-- Get category ID
SET @nspd_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='national-strategic-planning-development' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'A-Just-Transition-Framework-for-South-Africa-2022',
    'A-Just-Transition-Framework-for-South-Africa-2022.pdf',
    @nspd_category_id,
    '',
    'shortsummary/A-Just-Transition-Framework-for-South-Africa-2022.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/A-Just-Transition-Framework-for-South-Africa-2022.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/A-Just-Transition-Framework-for-South-Africa-2022_en.mp3',
        'audio_af','audio/af/A-Just-Transition-Framework-for-South-Africa-2022_af.mp3',
        'audio_xh','audio/xh/A-Just-Transition-Framework-for-South-Africa-2022_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'BDM Booklet 1',
    'BDM Booklet 1.pdf',
    @nspd_category_id,
    '',
    'shortsummary/BDM Booklet 1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/BDM Booklet 1.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/BDM_Booklet_1_en.mp3',
        'audio_af','audio/af/BDM_Booklet_1_af.mp3',
        'audio_xh','audio/xh/BDM_Booklet_1_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);


-- Document 3
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'IUDF-2016_WEB-min',
    'IUDF-2016_WEB-min.pdf',
    @nspd_category_id,
    '',
    'shortsummary/IUDF-2016_WEB-min.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/IUDF-2016_WEB-min.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/IUDF-2016_WEB-min_en.mp3',
        'audio_af','audio/af/IUDF-2016_WEB-min_af.mp3',
        'audio_xh','audio/xh/IUDF-2016_WEB-min_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- Document 4
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Medium Term Budget Policy Statement 24_25',
    'Medium Term Budget Policy Statement 24_25.pdf',
    @nspd_category_id,
    '',
    'shortsummary/Medium Term Budget Policy Statement 24_25.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Medium Term Budget Policy Statement 24_25.pdf',
    'PDF','','eve',
    JSON_OBJECT(
        'audio_en','audio/en/Medium_Term_Budget_Policy_Statement_24_25_en.mp3',
        'audio_af','audio/af/Medium_Term_Budget_Policy_Statement_24_25_af.mp3',
        'audio_xh','audio/xh/Medium_Term_Budget_Policy_Statement_24_25_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- Document 5
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();
INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Medium Term Expenditure Framework',
    'Medium Term Expenditure Framework.pdf',
    @nspd_category_id,
    '',
    'shortsummary/Medium Term Expenditure Framework.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Medium Term Expenditure Framework.pdf',
    'PDF','','eve',
    JSON_OBJECT(
        'audio_en','audio/en/Medium_Term_Expenditure_Framework_en.mp3',
        'audio_af','audio/af/Medium_Term_Expenditure_Framework_af.mp3',
        'audio_xh','audio/xh/Medium_Term_Expenditure_Framework_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'MOIP-challenges-and-opportunities-working-paper-2017-1.pdf',
    'MOIP-challenges-and-opportunities-working-paper-2017-1.pdf',
    @nspd_category_id,
    '',
    'shortsummary/MOIP-challenges-and-opportunities-working-paper-2017-1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/MOIP-challenges-and-opportunities-working-paper-2017-1.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/MOIP-challenges-and-opportunities-working-paper-2017-1_en.mp3',
        'audio_af','audio/af/MOIP-challenges-and-opportunities-working-paper-2017-1_af.mp3',
        'audio_xh','audio/xh/MOIP-challenges-and-opportunities-working-paper-2017-1_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 7
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'MTFonSPPReportCSD19FINAL',
    'MTFonSPPReportCSD19FINAL.pdf',
    @nspd_category_id,
    '',
    'shortsummary/MTFonSPPReportCSD19FINAL.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/MTFonSPPReportCSD19FINAL.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/MTFonSPPReportCSD19FINAL_en.mp3',
        'audio_af','audio/af/MTFonSPPReportCSD19FINAL_af.mp3',
        'audio_xh','audio/xh/MTFonSPPReportCSD19FINAL_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 8
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NDP-2030-our-future-make-it-workr',
    'NDP-2030-our-future-make-it-workr.pdf',
    @nspd_category_id,
    '',
    'shortsummary/NDP-2030-our-future-make-it-workr.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NDP-2030-our-future-make-it-workr.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NDP-2030-our-future-make-it-workr_en.mp3',
        'audio_af','audio/af/NDP-2030-our-future-make-it-workr_af.mp3',
        'audio_xh','audio/xh/NDP-2030-our-future-make-it-workr_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 9
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NIP 2050',
    'NIP 2050.pdf',
    @nspd_category_id,
    '',
    'shortsummary/NIP 2050.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NIP 2050.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NIP 2050_en.mp3',
        'audio_af','audio/af/NIP 2050_af.mp3',
        'audio_xh','audio/xh/NIP 2050_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 10
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NSDF',
    'NSDF.pdf',
    @nspd_category_id,
    '',
    'shortsummary/NSDF.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NSDF.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NSDF_en.mp3',
        'audio_af','audio/af/NSDF_af.mp3',
        'audio_xh','audio/xh/NSDF_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 11
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'SDG_Country_report',
    'SDG_Country_report.pdf',
    @nspd_category_id,
    '',
    'shortsummary/SDG_Country_report.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/SDG_Country_report.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/SDG_Country_report_en.mp3',
        'audio_af','audio/af/SDG_Country_report_af.mp3',
        'audio_xh','audio/xh/SDG_Country_report_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 12
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'SPLUMA',
    'SPLUMA.pdf',
    @nspd_category_id,
    '',
    'shortsummary/SPLUMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/SPLUMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/SPLUMA_en.mp3',
        'audio_af','audio/af/SPLUMA_af.mp3',
        'audio_xh','audio/xh/SPLUMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 13
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Western_cape_strategic_plan_2019-2024 (PSP)',
    'PSP_western_cape_strategic_plan_2019-2024 (PSP).pdf',
    @nspd_category_id,
    '',
    'shortsummary/western_cape_strategic_plan_2019-2024 (PSP).html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PSP_western_cape_strategic_plan_2019-2024 (PSP).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/PSP_western_cape_strategic_plan_2019-2024_(PSP)_en.mp3',
        'audio_af','audio/af/PSP_western_cape_strategic_plan_2019-2024_(PSP)_af.mp3',
        'audio_xh','audio/xh/PSP_western_cape_strategic_plan_2019-2024_(PSP)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert National Strategic Planning & Development Document  

-- Start Insert Spatial Planning & Infrastructure Document  

-- Get category ID
SET @spi_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='spatial-planning-infrastructure' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'MFMA',
    'MFMA.pdf',
    @spi_category_id,
    '',
    'shortsummary/MFMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/MFMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/MFMA_en.mp3',
        'audio_af','audio/af/MFMA_af.mp3',
        'audio_xh','audio/xh/MFMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'PFMA',
    'PFMA.pdf',
    @spi_category_id,
    '',
    'shortsummary/PFMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PFMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/PFMA_en.mp3',
        'audio_af','audio/af/PFMA_af.mp3',
        'audio_xh','audio/xh/PFMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NIP 2050',
    'NIP 2050.pdf',
    @spi_category_id,
    '',
    'shortsummary/NIP 2050.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NIP 2050.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NIP 2050_en.mp3',
        'audio_af','audio/af/NIP 2050_af.mp3',
        'audio_xh','audio/xh/NIP 2050_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 4
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'SPLUMA',
    'SPLUMA.pdf',
    @spi_category_id,
    '',
    'shortsummary/SPLUMA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/SPLUMA.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/SPLUMA_en.mp3',
        'audio_af','audio/af/SPLUMA_af.mp3',
        'audio_xh','audio/xh/SPLUMA_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 5
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'PSP_western_cape_strategic_plan_2019-2024 (PSP)',
    'PSP_western_cape_strategic_plan_2019-2024 (PSP).pdf',
    @spi_category_id,
    '',
    'shortsummary/western_cape_strategic_plan_2019-2024 (PSP).html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/PSP_western_cape_strategic_plan_2019-2024 (PSP).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/PSP_western_cape_strategic_plan_2019-2024_(PSP)_en.mp3',
        'audio_af','audio/af/PSP_western_cape_strategic_plan_2019-2024_(PSP)_af.mp3',
        'audio_xh','audio/xh/PSP_western_cape_strategic_plan_2019-2024_(PSP)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 6
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name='tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Growth-for-Jobs-Strategy-2023-Cabinet-Approved',
    'Growth-for-Jobs-Strategy-2023-Cabinet-Approved.pdf',
    @spi_category_id,
    '',
    'shortsummary/Growth-for-Jobs-Strategy-2023-Cabinet-Approved.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Growth-for-Jobs-Strategy-2023-Cabinet-Approved.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_en.mp3',
        'audio_af','audio/af/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_af.mp3',
        'audio_xh','audio/xh/Growth-for-Jobs-Strategy-2023-Cabinet-Approved_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Spatial Planning & Infrastructure Document  

-- Start Insert Agriculture Annual Report Document  

-- Get category ID
SET @ar_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-agree' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'annual report 2024-2025',
    'annual report 2024-2025.pdf',
    @ar_category_id,
    '',
    'shortsummary/annual report 2024-2025.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/annual report 2024-2025.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/annual report 2024-2025_en.mp3',
        'audio_af','audio/af/annual report 2024-2025_af.mp3',
        'audio_xh','audio/xh/annual report 2024-2025_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Agriculture Annual Report Document  

-- Start Insert Agriculture Policy Framework Document  

-- Get category ID
SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-agree' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'strategic plan 2025-2030',
    'strategic plan 2025-2030.pdf',
    @pf_category_id,
    '',
    'shortsummary/strategic plan 2025-2030.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/strategic plan 2025-2030.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/strategic plan 2025-2030_en.mp3',
        'audio_af','audio/af/strategic plan 2025-2030_af.mp3',
        'audio_xh','audio/xh/strategic plan 2025-2030_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Agriculture Policy Framework Document  

-- Start Insert Cultural Legislation Documents  

-- Get category ID
SET @lcas_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='legislation-cas' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'provincal lanuage act,1998',
    'provincal lanuage act,1998.pdf',
    @lcas_category_id,
    '',
    'shortsummary/provincal lanuage act,1998.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/provincal lanuage act,1998.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/provincal lanuage act,1998_en.mp3',
        'audio_af','audio/af/provincal lanuage act,1998_af.mp3',
        'audio_xh','audio/xh/provincal lanuage act,1998_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'western cape cultural commission and cultural councils act,1998',
    'western cape cultural commission and cultural councils act,1998.pdf',
    @lcas_category_id,
    '',
    'shortsummary/western cape cultural commission and cultural councils act,1998.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/western cape cultural commission and cultural councils act,1998.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/western cape cultural commission and cultural councils act,1998_en.mp3',
        'audio_af','audio/af/western cape cultural commission and cultural councils act,1998_af.mp3',
        'audio_xh','audio/xh/western cape cultural commission and cultural councils act,1998_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Cultural Legislation Documents

-- Start Insert EDT Annual Report Documents  

-- Get category ID
SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-edt' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Annual Performance Plan 2025-26',
    'Annual Performance Plan 2025-26.pdf',
    @pf_category_id,
    '',
    'shortsummary/Annual Performance Plan 2025-26.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Annual Performance Plan 2025-26.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Annual Performance Plan 2025-26_en.mp3',
        'audio_af','audio/af/Annual Performance Plan 2025-26_af.mp3',
        'audio_xh','audio/xh/Annual Performance Plan 2025-26_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Strategic Plan-2025-30',
    'Strategic Plan-2025-30.pdf',
    @pf_category_id,
    '',
    'shortsummary/Strategic Plan-2025-30.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Strategic Plan-2025-30.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Strategic Plan-2025-30_en.mp3',
        'audio_af','audio/af/Strategic Plan-2025-30_af.mp3',
        'audio_xh','audio/xh/Strategic Plan-2025-30_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wced-app-2025-2026',
    'wced-app-2025-2026.pdf',
    @pf_category_id,
    '',
    'shortsummary/wced-app-2025-2026.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wced-app-2025-2026.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wced-app-2025-2026_en.mp3',
        'audio_af','audio/af/wced-app-2025-2026_af.mp3',
        'audio_xh','audio/xh/wced-app-2025-2026_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert EDT Annual Report Documents

-- Start Insert Department of Infrastructure Annual Report  

-- Get category ID
SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-infra' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wc-provincial-treasury-2024_25-annual-report',
    'wc-provincial-treasury-2024_25-annual-report.pdf',
    @pf_category_id,
    '',
    'shortsummary/wc-provincial-treasury-2024_25-annual-report.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wc-provincial-treasury-2024_25-annual-report.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wc-provincial-treasury-2024_25-annual-report_en.mp3',
        'audio_af','audio/af/wc-provincial-treasury-2024_25-annual-report_af.mp3',
        'audio_xh','audio/xh/wc-provincial-treasury-2024_25-annual-report_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Infrastructure Annual Report

-- Start Insert Department of Infrastructure Policy Framework  

-- Get category ID
SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-infra' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NPC-National-Development-Plan-Vision-2030',
    'NPC-National-Development-Plan-Vision-2030.pdf',
    @pf_category_id,
    '',
    'shortsummary/NPC-National-Development-Plan-Vision-2030.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NPC-National-Development-Plan-Vision-2030.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NPC-National-Development-Plan-Vision-2030_en.mp3',
        'audio_af','audio/af/NPC-National-Development-Plan-Vision-2030_af.mp3',
        'audio_xh','audio/xh/NPC-National-Development-Plan-Vision-2030_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Infrastructure Policy Framework

-- Start Insert Department of Local Government Annual Report  

-- Get category ID
SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-loc-gov' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'dlg-annual-performance-plan_2024-25_english',
    'dlg-annual-performance-plan_2024-25_english.pdf',
    @pf_category_id,
    '',
    'shortsummary/dlg-annual-performance-plan_2024-25_english.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/dlg-annual-performance-plan_2024-25_english.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/dlg-annual-performance-plan_2024-25_english_en.mp3',
        'audio_af','audio/af/dlg-annual-performance-plan_2024-25_english_af.mp3',
        'audio_xh','audio/xh/dlg-annual-performance-plan_2024-25_english_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Local Government Annual Report

-- Start Insert Department of Premier Annual Report  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-premier' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'department-of-the-premier-strategic-plan-2025-2030',
    'department-of-the-premier-strategic-plan-2025-2030.pdf',
    @pf_category_id,
    '',
    'shortsummary/department-of-the-premier-strategic-plan-2025-2030.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/department-of-the-premier-strategic-plan-2025-2030.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/department-of-the-premier-strategic-plan-2025-2030_en.mp3',
        'audio_af','audio/af/department-of-the-premier-strategic-plan-2025-2030_af.mp3',
        'audio_xh','audio/xh/department-of-the-premier-strategic-plan-2025-2030_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Premier Annual Report

-- Start Insert Department of Premier Legislation  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='legislation-premier' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023',
    'Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023.pdf',
    @pf_category_id,
    '',
    'shortsummary/Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023_en.mp3',
        'audio_af','audio/af/Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023_af.mp3',
        'audio_xh','audio/xh/Public Service Act Regulations amendments as gazzeted on the 20 Oct 2023_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Premier Legislation

-- Start Insert Department of Premier Policy Framework  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-premier' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Framework for Managing Programme Performance Information',
    'Framework for Managing Programme Performance Information.pdf',
    @pf_category_id,
    '',
    'shortsummary/Framework for Managing Programme Performance Information.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Framework for Managing Programme Performance Information.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Framework for Managing Programme Performance Information_en.mp3',
        'audio_af','audio/af/Framework for Managing Programme Performance Information_af.mp3',
        'audio_xh','audio/xh/Framework for Managing Programme Performance Information_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'greenpapernational-strategic-planning0',
    'greenpapernational-strategic-planning0.pdf',
    @pf_category_id,
    '',
    'shortsummary/greenpapernational-strategic-planning0.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/greenpapernational-strategic-planning0.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/greenpapernational-strategic-planning0_en.mp3',
        'audio_af','audio/af/greenpapernational-strategic-planning0_af.mp3',
        'audio_xh','audio/xh/greenpapernational-strategic-planning0_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'national_policy_framework',
    'national_policy_framework.pdf',
    @pf_category_id,
    '',
    'shortsummary/national_policy_framework.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/national_policy_framework.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/national_policy_framework_en.mp3',
        'audio_af','audio/af/national_policy_framework_af.mp3',
        'audio_xh','audio/xh/national_policy_framework_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Premier Policy Framework

-- Start Insert Department of Social Development Policy Framework  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-sd' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'national Youth Policy',
    'national Youth Policy.pdf',
    @pf_category_id,
    '',
    'shortsummary/national Youth Policy.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/national Youth Policy.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/national Youth Policy_en.mp3',
        'audio_af','audio/af/national Youth Policy_af.mp3',
        'audio_xh','audio/xh/national Youth Policy_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'OneCape_2040',
    'OneCape_2040.pdf',
    @pf_category_id,
    '',
    'shortsummary/OneCape_2040.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/OneCape_2040.pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/OneCape_2040_en.mp3',
        'audio_af','audio/af/OneCape_2040_af.mp3',
        'audio_xh','audio/xh/OneCape_2040_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids 
SET max_id = LAST_INSERT_ID(max_id + 1) 
WHERE tbl_name = 'tbl_documents';

SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'White Paper for Social Welfare (1997)',
    'White Paper for Social Welfare (1997).pdf',
    @pf_category_id,
    '',
    'shortsummary/White Paper for Social Welfare (1997).html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/White Paper for Social Welfare (1997).pdf',
    'PDF',
    '',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/White Paper for Social Welfare (1997)_en.mp3',
        'audio_af','audio/af/White Paper for Social Welfare (1997)_af.mp3',
        'audio_xh','audio/xh/White Paper for Social Welfare (1997)_xh.mp3',
        'color','#ffd258',
        'icon','faFilePdf'
    ),
    1,
    CURRENT_TIMESTAMP(),
    171
);

COMMIT;

-- End Insert Department of Social Development Policy Framework

-- Start Insert Treasury Annual Report  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-treasury' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'final-alternative-and-blended-finance-framework-22.04.2025',
    'final-alternative-and-blended-finance-framework-22.04.2025.pdf',
    @pf_category_id,
    '',
    'shortsummary/final-alternative-and-blended-finance-framework-22.04.2025.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/final-alternative-and-blended-finance-framework-22.04.2025.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/final-alternative-and-blended-finance-framework-22.04.2025_en.mp3',
        'audio_af','audio/af/final-alternative-and-blended-finance-framework-22.04.2025_af.mp3',
        'audio_xh','audio/xh/final-alternative-and-blended-finance-framework-22.04.2025_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25',
    'quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25.pdf',
    @pf_category_id,
    '',
    'shortsummary/quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25_en.mp3',
        'audio_af','audio/af/quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25_af.mp3',
        'audio_xh','audio/xh/quarterly-consolidated-statement-on-municipal-finances-per-s71-7-of-the-mfma-q3-2024-25_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wc-provincial-treasury-2024_25-annual-report',
    'wc-provincial-treasury-2024_25-annual-report.pdf',
    @pf_category_id,
    '',
    'shortsummary/wc-provincial-treasury-2024_25-annual-report.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wc-provincial-treasury-2024_25-annual-report.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wc-provincial-treasury-2024_25-annual-report_en.mp3',
        'audio_af','audio/af/wc-provincial-treasury-2024_25-annual-report_af.mp3',
        'audio_xh','audio/xh/wc-provincial-treasury-2024_25-annual-report_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert Treasury Annual Report

-- Start Insert Treasury Legislation  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='legislation-treasury' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'SAConstitution-web-eng',
    'SAConstitution-web-eng.pdf',
    @pf_category_id,
    '',
    'shortsummary/SAConstitution-web-eng.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/SAConstitution-web-eng.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/SAConstitution-web-eng_en.mp3',
        'audio_af','audio/af/SAConstitution-web-eng_af.mp3',
        'audio_xh','audio/xh/SAConstitution-web-eng_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert Treasury Legislation

-- Start Insert Treasury Policy Framework  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-treasury' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Agenda 2063',
    'Agenda 2063.pdf',
    @pf_category_id,
    '',
    'shortsummary/Agenda 2063.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Agenda 2063.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Agenda 2063_en.mp3',
        'audio_af','audio/af/Agenda 2063_af.mp3',
        'audio_xh','audio/xh/Agenda 2063_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert Treasury Policy Framework


-- Start Insert DEADP Annual Report  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-eadp' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'MTDP 2024-2029 Final Edit Version - 11 March 2025',
    'MTDP 2024-2029 Final Edit Version - 11 March 2025.pdf',
    @pf_category_id,
    '',
    'shortsummary/MTDP 2024-2029 Final Edit Version - 11 March 2025.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/MTDP 2024-2029 Final Edit Version - 11 March 2025.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/MTDP 2024-2029 Final Edit Version - 11 March 2025_en.mp3',
        'audio_af','audio/af/MTDP 2024-2029 Final Edit Version - 11 March 2025_af.mp3',
        'audio_xh','audio/xh/MTDP 2024-2029 Final Edit Version - 11 March 2025_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wced-stratplan-2020-2025',
    'wced-stratplan-2020-2025.pdf',
    @pf_category_id,
    '',
    'shortsummary/wced-stratplan-2020-2025.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wced-stratplan-2020-2025.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wced-stratplan-2020-2025_en.mp3',
        'audio_af','audio/af/wced-stratplan-2020-2025_af.mp3',
        'audio_xh','audio/xh/wced-stratplan-2020-2025_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 3
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wcg_dea-dp_annual-report_17-september-2025-website',
    'wcg_dea-dp_annual-report_17-september-2025-website.pdf',
    @pf_category_id,
    '',
    'shortsummary/wcg_dea-dp_annual-report_17-september-2025-website.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wcg_dea-dp_annual-report_17-september-2025-website.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wcg_dea-dp_annual-report_17-september-2025-website_en.mp3',
        'audio_af','audio/af/wcg_dea-dp_annual-report_17-september-2025-website_af.mp3',
        'audio_xh','audio/xh/wcg_dea-dp_annual-report_17-september-2025-website_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert DEADP Annual Report


-- Start Insert DEADP Legislation  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='legislation-eadp' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'constitution of republic of RSA',
    'constitution of republic of RSA.pdf',
    @pf_category_id,
    '',
    'shortsummary/constitution of republic of RSA.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/constitution of republic of RSA.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/constitution of republic of RSA_en.mp3',
        'audio_af','audio/af/constitution of republic of RSA_af.mp3',
        'audio_xh','audio/xh/constitution of republic of RSA_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert DEADP Legislation

-- Start Insert WCED Annual Report  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-wced' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wced-app-2025-2026',
    'wced-app-2025-2026.pdf',
    @pf_category_id,
    '',
    'shortsummary/wced-app-2025-2026.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wced-app-2025-2026.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wced-app-2025-2026_en.mp3',
        'audio_af','audio/af/wced-app-2025-2026_af.mp3',
        'audio_xh','audio/xh/wced-app-2025-2026_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wced-strategic-plan-2025-2030',
    'wced-strategic-plan-2025-2030.pdf',
    @pf_category_id,
    '',
    'shortsummary/wced-strategic-plan-2025-2030.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wced-strategic-plan-2025-2030.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wced-strategic-plan-2025-2030_en.mp3',
        'audio_af','audio/af/wced-strategic-plan-2025-2030_af.mp3',
        'audio_xh','audio/xh/wced-strategic-plan-2025-2030_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert WCED Annual Report


-- Start Insert WCED Policy Framework  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-wced' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'NATIONAL EDUCATION POLICY ACT OF 1996',
    'NATIONAL EDUCATION POLICY ACT OF 1996.pdf',
    @pf_category_id,
    '',
    'shortsummary/NATIONAL EDUCATION POLICY ACT OF 1996.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/NATIONAL EDUCATION POLICY ACT OF 1996.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/NATIONAL EDUCATION POLICY ACT OF 1996_en.mp3',
        'audio_af','audio/af/NATIONAL EDUCATION POLICY ACT OF 1996_af.mp3',
        'audio_xh','audio/xh/NATIONAL EDUCATION POLICY ACT OF 1996_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert WCED Policy Framework

-- Start Insert Health & Wellness Annual Report  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-wchw' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wcdhw-annual-report-2024-2025',
    'wcdhw-annual-report-2024-2025.pdf',
    @pf_category_id,
    '',
    'shortsummary/wcdhw-annual-report-2024-2025.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wcdhw-annual-report-2024-2025.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wcdhw-annual-report-2024-2025_en.mp3',
        'audio_af','audio/af/wcdhw-annual-report-2024-2025_af.mp3',
        'audio_xh','audio/xh/wcdhw-annual-report-2024-2025_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wced-app-2023-2024',
    'wced-app-2023-2024.pdf',
    @pf_category_id,
    '',
    'shortsummary/wced-app-2023-2024.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wced-app-2023-2024.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wced-app-2023-2024_en.mp3',
        'audio_af','audio/af/wced-app-2023-2024_af.mp3',
        'audio_xh','audio/xh/wced-app-2023-2024_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert Health & Wellness Annual Report

-- Start Insert Health & Wellness Policy Framework  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-wchw' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'pocs-strategic-plan-2025-2030',
    'pocs-strategic-plan-2025-2030.pdf',
    @pf_category_id,
    '',
    'shortsummary/pocs-strategic-plan-2025-2030.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/pocs-strategic-plan-2025-2030.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/pocs-strategic-plan-2025-2030_en.mp3',
        'audio_af','audio/af/pocs-strategic-plan-2025-2030_af.mp3',
        'audio_xh','audio/xh/pocs-strategic-plan-2025-2030_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert Health & Wellness Policy Framework

-- Start Insert WCMD Annual Report  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='annual-report-wcmd' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'wcmd-annual-report-24-25-english',
    'wcmd-annual-report-24-25-english.pdf',
    @pf_category_id,
    '',
    'shortsummary/wcmd-annual-report-24-25-english.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/wcmd-annual-report-24-25-english.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/wcmd-annual-report-24-25-english_en.mp3',
        'audio_af','audio/af/wcmd-annual-report-24-25-english_af.mp3',
        'audio_xh','audio/xh/wcmd-annual-report-24-25-english_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert WCMD Annual Report

-- Start Insert WCMD Legislation  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='legislation-wcmd' 
    LIMIT 1
);

START TRANSACTION;

UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'Road Transportation Act 74 of 1977',
    'Road Transportation Act 74 of 1977.pdf',
    @pf_category_id,
    '',
    'shortsummary/Road Transportation Act 74 of 1977.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/Road Transportation Act 74 of 1977.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/Road Transportation Act 74 of 1977_en.mp3',
        'audio_af','audio/af/Road Transportation Act 74 of 1977_af.mp3',
        'audio_xh','audio/xh/Road Transportation Act 74 of 1977_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert WCMD Legislation

-- Start Insert WCMD Policy Framework  

SET @pf_category_id = ( 
    SELECT cat_id 
    FROM tbl_categories 
    WHERE dev_name='policy-framework-wcmd' 
    LIMIT 1
);

START TRANSACTION;

-- =========================
-- Document 1
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    '9057-wc-registration-licence-fees-2025-1',
    '9057-wc-registration-licence-fees-2025-1.pdf',
    @pf_category_id,
    '',
    'shortsummary/9057-wc-registration-licence-fees-2025-1.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/9057-wc-registration-licence-fees-2025-1.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/9057-wc-registration-licence-fees-2025-1_en.mp3',
        'audio_af','audio/af/9057-wc-registration-licence-fees-2025-1_af.mp3',
        'audio_xh','audio/xh/9057-wc-registration-licence-fees-2025-1_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

-- =========================
-- Document 2
-- =========================
UPDATE tbl_maxids SET max_id = LAST_INSERT_ID(max_id + 1) WHERE tbl_name = 'tbl_documents';
SET @document_id = LAST_INSERT_ID();

INSERT INTO tbl_documents (
    doc_id, doc_name, doc_full_name, doc_cat_id, doc_category, doc_desc,
    doc_file_path, doc_type, doc_size, doc_level, extra_data,
    is_active, creation_date, created_by
) VALUES (
    @document_id,
    'final-wcmd-strategic-plan-2025_2030',
    'final-wcmd-strategic-plan-2025_2030.pdf',
    @pf_category_id,
    '',
    'shortsummary/final-wcmd-strategic-plan-2025_2030.html',
    'https://gov-api.qadoi.platform.org.za/uploads/app_documents/final-wcmd-strategic-plan-2025_2030.pdf',
    'PDF','',
    'eve',
    JSON_OBJECT(
        'audio_en','audio/en/final-wcmd-strategic-plan-2025_2030_en.mp3',
        'audio_af','audio/af/final-wcmd-strategic-plan-2025_2030_af.mp3',
        'audio_xh','audio/xh/final-wcmd-strategic-plan-2025_2030_xh.mp3',
        'color','#ffd258','icon','faFilePdf'
    ),
    1,CURRENT_TIMESTAMP(),171
);

COMMIT;

-- End Insert WCMD Policy Framework