-- Sample data for knowledge_central table
-- Each row references lookup_data for doc type, status and category
-- This script generates roughly 50 sample records across all categories
INSERT INTO knowledge_central (
  title,
  doc_type_id,
  status_id,
  category_id,
  relative_path,
  extension,
  summary,
  version,
  tags,
  access_count,
  created_by,
  updated_by
) VALUES
  -- SALES_COLLATERAL
  ('Sales Guide 1', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/sales_guide_1.pdf', 'pdf', 'Sales guide for product line A', 1, ARRAY['sales','guide'], 150, 1,1),
  ('Sales Guide 2', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/sales_guide_2.pdf', 'pdf', 'Updated sales strategies', 1, ARRAY['sales'], 345, 1,1),
  ('Pricing Sheet', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/pricing_sheet.xlsx', 'xlsx', 'Latest pricing sheet', 1, ARRAY['pricing','sales'], 789, 1,1),
  ('Competitor Analysis', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/competitor_analysis.pdf', 'pdf', 'Competitor comparison', 1, ARRAY['analysis'], 1023,1,1),
  ('Sales Audio Tips', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='AUDIO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/sales_tips.mp3', 'mp3', 'Audio tips for sales', 1, ARRAY['audio','sales'], 204,1,1),
  ('Sales Video Demo', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='VIDEO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/sales_demo.mp4', 'mp4', 'Demo video for clients', 1, ARRAY['video','sales'], 1345,1,1),
  ('Sales FAQ Link', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='WEBSITE_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/sales_faq.html', 'html', 'FAQ for sales team', 1, ARRAY['faq'], 567,1,1),
  ('Sales Cheat Sheet', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='SALES_COLLATERAL'),
    '/knowledge-central/SALES_COLLATERAL/cheat_sheet.pdf', 'pdf', 'Quick reference guide', 1, ARRAY['cheatsheet'], 890,1,1),
  -- PRESENTATIONS
  ('Kickoff Presentation', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/kickoff_presentation.pdf', 'pdf', 'Project kickoff slides', 1, ARRAY['presentation'], 1200,1,1),
  ('Annual Results Deck', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/annual_results.pptx', 'pptx', 'Slides for annual results', 1, ARRAY['annual','results'], 1600,1,1),
  ('Webinar Recording', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='VIDEO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/webinar_recording.mp4', 'mp4', 'Recorded webinar session', 1, ARRAY['webinar'], 300,1,1),
  ('Pitch Deck', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/pitch_deck.pdf', 'pdf', 'Startup pitch deck', 1, ARRAY['pitch'], 500,1,1),
  ('Quarterly Townhall', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='VIDEO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/townhall_q1.mp4', 'mp4', 'Quarterly townhall video', 1, ARRAY['townhall'], 1500,1,1),
  ('Product Launch Slides', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/product_launch.pdf', 'pdf', 'Slides for product launch', 1, ARRAY['launch'], 900,1,1),
  ('Strategy Meeting Notes', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/strategy_notes.docx', 'docx', 'Notes from strategy meeting', 1, ARRAY['strategy'], 780,1,1),
  ('Conference Keynote', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='STREAM_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='PRESENTATIONS'),
    '/knowledge-central/PRESENTATIONS/keynote_url.txt', 'txt', 'Streaming link to keynote', 1, ARRAY['keynote'], 1100,1,1),
  -- BROCHURES
  ('Product Brochure A', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/product_a.pdf', 'pdf', 'Product A brochure', 1, ARRAY['productA'], 400,1,1),
  ('Product Brochure B', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/product_b.pdf', 'pdf', 'Product B brochure', 1, ARRAY['productB'], 420,1,1),
  ('Service Overview', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/service_overview.pdf', 'pdf', 'Services overview brochure', 1, ARRAY['service'], 630,1,1),
  ('Image Library', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='IMAGE'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/images.zip', 'zip', 'Marketing images package', 1, ARRAY['images'], 955,1,1),
  ('Campaign Poster', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='IMAGE'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/poster.png', 'png', 'Campaign poster image', 1, ARRAY['poster'], 1120,1,1),
  ('Brochure Templates', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/templates.docx', 'docx', 'Templates for brochures', 1, ARRAY['templates'], 250,1,1),
  ('Flyer Sample', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/flyer_sample.pdf', 'pdf', 'Sample flyer', 1, ARRAY['flyer'], 760,1,1),
  ('Pricing Flyers', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='BROCHURES'),
    '/knowledge-central/BROCHURES/pricing_flyers.pdf', 'pdf', 'Flyers with pricing info', 1, ARRAY['flyer','pricing'], 580,1,1),
  -- TRAINING
  ('Onboarding Manual', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/onboarding_manual.pdf', 'pdf', 'Employee onboarding guide', 1, ARRAY['onboarding'], 1500,1,1),
  ('Safety Training Video', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='VIDEO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/safety_training.mp4', 'mp4', 'Safety procedures video', 1, ARRAY['safety'], 1800,1,1),
  ('Customer Service Basics', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/customer_service_basics.pdf', 'pdf', 'Customer service handbook', 1, ARRAY['customer','service'], 620,1,1),
  ('Leadership Workshop', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='STREAM_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/leadership_workshop.url', 'url', 'Link to leadership workshop', 1, ARRAY['leadership'], 710,1,1),
  ('Software Tutorial', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='VIDEO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/software_tutorial.mp4', 'mp4', 'Tutorial for internal software', 1, ARRAY['tutorial'], 980,1,1),
  ('Training Schedule', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/training_schedule.xlsx', 'xlsx', 'Schedule for training sessions', 1, ARRAY['schedule'], 430,1,1),
  ('Development Plan', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/development_plan.docx', 'docx', 'Personal development plan template', 1, ARRAY['development'], 520,1,1),
  ('Best Practices', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='TRAINING'),
    '/knowledge-central/TRAINING/best_practices.pdf', 'pdf', 'Training best practices', 1, ARRAY['best','practices'], 875,1,1),
  -- LEGAL
  ('Compliance Checklist', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/compliance_checklist.pdf', 'pdf', 'Checklist for compliance requirements', 1, ARRAY['compliance'], 300,1,1),
  ('Contract Template', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/contract_template.docx', 'docx', 'Standard contract template', 1, ARRAY['contract'], 1420,1,1),
  ('Privacy Policy', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/privacy_policy.url', 'url', 'Link to privacy policy', 1, ARRAY['policy'], 1300,1,1),
  ('Terms of Service', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/terms_of_service.pdf', 'pdf', 'Terms of service document', 1, ARRAY['terms'], 1605,1,1),
  ('NDA Template', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/nda_template.docx', 'docx', 'Mutual NDA template', 1, ARRAY['nda'], 1125,1,1),
  ('Regulatory Update', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/regulatory_update.pdf', 'pdf', 'Recent regulatory changes', 1, ARRAY['regulatory'], 980,1,1),
  ('Compliance Training Slides', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/compliance_training.pptx', 'pptx', 'Slides for compliance training', 1, ARRAY['compliance','training'], 845,1,1),
  ('Legal FAQ', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='WEBSITE_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/legal_faq.html', 'html', 'Frequently asked legal questions', 1, ARRAY['faq'], 410,1,1),
  ('IP Policy', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='LEGAL'),
    '/knowledge-central/LEGAL/ip_policy.pdf', 'pdf', 'Intellectual property policy', 1, ARRAY['ip'], 500,1,1),
  -- FAQ
  ('General FAQ', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/general_faq.pdf', 'pdf', 'General frequently asked questions', 1, ARRAY['faq'], 720,1,1),
  ('Technical FAQ', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/technical_faq.pdf', 'pdf', 'Technical frequently asked questions', 1, ARRAY['faq','technical'], 830,1,1),
  ('Policy FAQ', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/policy_faq.pdf', 'pdf', 'Policy related FAQ', 1, ARRAY['policy','faq'], 910,1,1),
  ('How-to Video', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='VIDEO'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/how_to_video.mp4', 'mp4', 'Short how-to video', 1, ARRAY['video','faq'], 1450,1,1),
  ('Account Setup Guide', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/account_setup.url', 'url', 'External link for account setup', 1, ARRAY['account'], 680,1,1),
  ('Billing FAQ', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/billing_faq.pdf', 'pdf', 'Billing questions and answers', 1, ARRAY['billing','faq'], 570,1,1),
  ('Troubleshooting Guide', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/troubleshooting_guide.pdf', 'pdf', 'Troubleshooting common issues', 1, ARRAY['troubleshooting'], 1040,1,1),
  ('Subscription Info', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='WEBSITE_URL'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/subscription_info.html', 'html', 'Subscription information page', 1, ARRAY['subscription'], 450,1,1),
  ('Support Contacts', (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_DOC_TYPE' AND value_key='DOCUMENT'), 462,
    (SELECT id FROM lookup_data WHERE lookup_name='KNOWLEDGE_CATEGORY' AND value_key='FAQ'),
    '/knowledge-central/FAQ/support_contacts.pdf', 'pdf', 'List of support contacts', 1, ARRAY['support'], 990,1,1);
