Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/conference/database/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/conference/database/sample_data.sql

-- Sample data for Church Conference Management Platform
-- Run this after creating the database schema

USE `copmadinaconf`;

-- Clear existing data to prevent duplicates
DELETE FROM `event_registrations`;
DELETE FROM `nonmember_registrations`;
DELETE FROM `notifications`;
DELETE FROM `audit_logs`;
DELETE FROM `promo_codes`;
DELETE FROM `products`;
DELETE FROM `ticket_types`;
DELETE FROM `event_forms`;
DELETE FROM `events`;
DELETE FROM `event_form_templates`;
DELETE FROM `users` WHERE `username` != 'nabibo';
DELETE FROM `assemblies`;
DELETE FROM `districts`;
DELETE FROM `areas` WHERE `name` != 'Madina Area';

-- Insert sample areas (skip Madina Area as it exists from schema)
INSERT INTO `areas` (`name`, `description`, `status`) VALUES 
('Tema Area', 'Area covering Tema and surrounding communities', 'active');

-- Insert sample districts (using dynamic area IDs)
INSERT INTO `districts` (`area_id`, `name`, `description`, `location`, `contact_person`, `contact_email`, `contact_phone`, `status`) VALUES 
((SELECT id FROM areas WHERE name = 'Madina Area'), 'Madina District', 'Main district in Madina Area', 'Madina, Accra', 'Pastor Emmanuel Asante', 'madina.district@cop.org', '+233 24 111 2222', 'active'),
((SELECT id FROM areas WHERE name = 'Madina Area'), 'East Legon District', 'East Legon District in Madina Area', 'East Legon, Accra', 'Pastor Grace Osei', 'eastlegon.district@cop.org', '+233 24 333 4444', 'active'),
((SELECT id FROM areas WHERE name = 'Madina Area'), 'Dome District', 'Dome District in Madina Area', 'Dome, Accra', 'Pastor Samuel Mensah', 'dome.district@cop.org', '+233 24 555 6666', 'active'),
((SELECT id FROM areas WHERE name = 'Tema Area'), 'Tema Central District', 'Central district in Tema Area', 'Tema, Greater Accra', 'Pastor Mary Adjei', 'tema.central@cop.org', '+233 24 777 8888', 'active'),
((SELECT id FROM areas WHERE name = 'Tema Area'), 'Tema New Town District', 'New Town district in Tema Area', 'Tema New Town, Greater Accra', 'Pastor John Boateng', 'tema.newtown@cop.org', '+233 24 999 0000', 'active');

-- Insert sample assemblies (using dynamic district IDs)
INSERT INTO `assemblies` (`district_id`, `name`, `description`, `location`, `address`, `contact_phone`, `contact_email`, `contact_person`, `status`) VALUES 
((SELECT id FROM districts WHERE name = 'Madina District'), 'Madina Central Assembly', 'Main assembly in Madina District', 'Madina Market Area', 'Madina Market Road, Accra', '+233 24 123 4567', 'madina.central@cop.org', 'Elder Peter Kwame', 'active'),
((SELECT id FROM districts WHERE name = 'Madina District'), 'New Town Assembly', 'New Town Assembly in Madina District', 'New Town, Madina', 'New Town, Madina', '+233 24 234 5678', 'newtown@cop.org', 'Elder Sarah Adu', 'active'),
((SELECT id FROM districts WHERE name = 'East Legon District'), 'East Legon Assembly', 'Main assembly in East Legon District', 'East Legon Community', 'East Legon, Accra', '+233 24 345 6789', 'eastlegon@cop.org', 'Elder Michael Owusu', 'active'),
((SELECT id FROM districts WHERE name = 'East Legon District'), 'American House Assembly', 'American House Assembly', 'American House Area', 'American House, East Legon', '+233 24 456 7890', 'americanhouse@cop.org', 'Elder Joyce Appiah', 'active'),
((SELECT id FROM districts WHERE name = 'Dome District'), 'Dome Assembly', 'Main assembly in Dome District', 'Dome Market Area', 'Dome Market, Accra', '+233 24 567 8901', 'dome@cop.org', 'Elder Francis Nkrumah', 'active'),
((SELECT id FROM districts WHERE name = 'Dome District'), 'Achimota Assembly', 'Assembly serving Achimota community', 'Achimota, Accra', 'Achimota Mile 7, Accra', '+233 24 678 9012', 'achimota@cop.org', 'Elder Rebecca Tetteh', 'active'),
((SELECT id FROM districts WHERE name = 'Tema Central District'), 'Tema Central Assembly', 'Main assembly in Tema Central District', 'Tema Community 1', 'Community 1, Tema', '+233 24 789 0123', 'tema.central@cop.org', 'Elder David Asiedu', 'active'),
((SELECT id FROM districts WHERE name = 'Tema Central District'), 'Tema Station Assembly', 'Assembly near Tema Station', 'Tema Station Area', 'Tema Station, Tema', '+233 24 890 1234', 'tema.station@cop.org', 'Elder Elizabeth Okyere', 'active'),
((SELECT id FROM districts WHERE name = 'Tema New Town District'), 'Tema New Town Assembly', 'Main assembly in Tema New Town District', 'Tema New Town', 'New Town, Tema', '+233 24 901 2345', 'tema.newtown@cop.org', 'Elder Isaac Frimpong', 'active'),
((SELECT id FROM districts WHERE name = 'Tema New Town District'), 'Sakumono Assembly', 'Assembly serving Sakumono community', 'Sakumono, Tema', 'Sakumono Village, Tema', '+233 24 012 3456', 'sakumono@cop.org', 'Elder Comfort Adjei', 'active');

-- Update superuser password (password123) - using working hash
UPDATE `users` SET `password` = '$2y$10$kf0KTJ4SdV1qIvfTpsvySuqlURlEriiAF3eE8OJkrxMHIumucvk6m' WHERE `username` = 'nabibo';

-- Insert sample admin users (using dynamic IDs)
INSERT INTO `users` (`username`, `email`, `password`, `first_name`, `last_name`, `phone`, `role`, `area_id`, `district_id`, `assembly_id`, `status`) VALUES 
('area_admin1', 'madina.area@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Emmanuel', 'Asante', '+233 24 111 1111', 'area_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), NULL, NULL, 'active'),
('area_admin2', 'tema.area@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Grace', 'Adjei', '+233 24 111 2222', 'area_admin', (SELECT id FROM areas WHERE name = 'Tema Area'), NULL, NULL, 'active'),
('district_admin1', 'madina.district@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Samuel', 'Osei', '+233 24 222 2222', 'district_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), (SELECT id FROM districts WHERE name = 'Madina District'), NULL, 'active'),
('district_admin2', 'eastlegon.district@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Mary', 'Mensah', '+233 24 333 3333', 'district_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), (SELECT id FROM districts WHERE name = 'East Legon District'), NULL, 'active'),
('district_admin3', 'dome.district@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'John', 'Boateng', '+233 24 444 4444', 'district_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), (SELECT id FROM districts WHERE name = 'Dome District'), NULL, 'active'),
('district_admin4', 'tema.central@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Rebecca', 'Tetteh', '+233 24 555 5555', 'district_admin', (SELECT id FROM areas WHERE name = 'Tema Area'), (SELECT id FROM districts WHERE name = 'Tema Central District'), NULL, 'active'),
('assembly_admin1', 'madina.central.admin@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Peter', 'Kwame', '+233 24 666 6666', 'assembly_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), (SELECT id FROM districts WHERE name = 'Madina District'), (SELECT id FROM assemblies WHERE name = 'Madina Central Assembly'), 'active'),
('assembly_admin2', 'eastlegon.admin@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Sarah', 'Adu', '+233 24 777 7777', 'assembly_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), (SELECT id FROM districts WHERE name = 'East Legon District'), (SELECT id FROM assemblies WHERE name = 'East Legon Assembly'), 'active'),
('assembly_admin3', 'dome.admin@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Michael', 'Owusu', '+233 24 888 8888', 'assembly_admin', (SELECT id FROM areas WHERE name = 'Madina Area'), (SELECT id FROM districts WHERE name = 'Dome District'), (SELECT id FROM assemblies WHERE name = 'Dome Assembly'), 'active'),
('assembly_admin4', 'tema.central.admin@cop.org', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Joyce', 'Appiah', '+233 24 999 9999', 'assembly_admin', (SELECT id FROM areas WHERE name = 'Tema Area'), (SELECT id FROM districts WHERE name = 'Tema Central District'), (SELECT id FROM assemblies WHERE name = 'Tema Central Assembly'), 'active');

-- Insert sample members
INSERT INTO `users` (`email`, `password`, `first_name`, `last_name`, `phone`, `role`, `area_id`, `district_id`, `assembly_id`, `date_of_birth`, `gender`, `address`, `status`) VALUES 
('john.doe@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'John', 'Doe', '+233 24 666 6666', 'member', 1, 1, 1, '1985-06-15', 'male', 'Madina Estate, Accra', 'active'),
('jane.smith@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Jane', 'Smith', '+233 24 777 7777', 'member', 1, 1, 1, '1990-03-22', 'female', 'New Town, Madina', 'active'),
('peter.wilson@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Peter', 'Wilson', '+233 24 888 8888', 'member', 1, 2, 3, '1982-11-08', 'male', 'East Legon Hills, Accra', 'active'),
('mary.johnson@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Mary', 'Johnson', '+233 24 999 9999', 'member', 1, 1, 2, '1988-09-12', 'female', 'Madina Zongo, Accra', 'active'),
('david.asante@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'David', 'Asante', '+233 24 123 5678', 'member', 1, 3, 5, '1975-12-03', 'male', 'Dome Pillar 2, Accra', 'active'),
('elizabeth.okyere@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Elizabeth', 'Okyere', '+233 24 234 6789', 'member', 1, 3, 6, '1992-07-18', 'female', 'Achimota New Town, Accra', 'active'),
('francis.adjei@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Francis', 'Adjei', '+233 24 345 7890', 'member', 2, 4, 7, '1980-04-25', 'male', 'Community 1, Tema', 'active'),
('comfort.frimpong@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Comfort', 'Frimpong', '+233 24 456 8901', 'member', 2, 4, 8, '1987-01-14', 'female', 'Tema Station, Tema', 'active'),
('isaac.mensah@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Isaac', 'Mensah', '+233 24 567 9012', 'member', 2, 5, 9, '1983-10-30', 'male', 'Tema New Town, Tema', 'active'),
('grace.boateng@example.com', '$2y$10$e0MYzXyjpJS7Pd0RVvHwHuFEDf6X/2TV8k8B95JieuK2LnQinmFW2', 'Grace', 'Boateng', '+233 24 678 0123', 'member', 2, 5, 10, '1995-05-07', 'female', 'Sakumono Village, Tema', 'active');

-- Insert sample event form templates
INSERT INTO `event_form_templates` (`name`, `description`, `form_fields`, `created_by`) VALUES 
('Basic Conference Form', 'Standard form for conference registrations', 
'[
    {"name": "dietary_requirements", "label": "Dietary Requirements", "type": "textarea", "required": false, "description": "Please specify any dietary restrictions or allergies"},
    {"name": "emergency_contact", "label": "Emergency Contact Name", "type": "text", "required": true},
    {"name": "emergency_phone", "label": "Emergency Contact Phone", "type": "text", "required": true},
    {"name": "church_background", "label": "Church Background", "type": "select", "required": false, "options": ["Member", "Visitor", "First Time Attendee", "Other Church Member"]},
    {"name": "special_needs", "label": "Special Accommodation Needs", "type": "textarea", "required": false, "description": "Any special accommodations needed"}
]', 1),

('Youth Event Form', 'Form template for youth events', 
'[
    {"name": "age_group", "label": "Age Group", "type": "select", "required": true, "options": ["13-17", "18-25", "26-35"]},
    {"name": "parent_guardian", "label": "Parent/Guardian Name (if under 18)", "type": "text", "required": false},
    {"name": "parent_phone", "label": "Parent/Guardian Phone (if under 18)", "type": "text", "required": false},
    {"name": "t_shirt_size", "label": "T-Shirt Size", "type": "select", "required": false, "options": ["XS", "S", "M", "L", "XL", "XXL"]},
    {"name": "interests", "label": "Areas of Interest", "type": "textarea", "required": false, "description": "What topics or activities interest you most?"}
]', 1);

-- Insert sample events
INSERT INTO `events` (`title`, `description`, `event_type`, `area_id`, `district_id`, `assembly_id`, `start_date`, `end_date`, `venue`, `address`, `capacity`, `registration_fee`, `early_bird_fee`, `early_bird_deadline`, `registration_deadline`, `status`, `featured`, `seo_title`, `seo_description`, `created_by`) VALUES 

('Madina Area Annual Conference 2024', 'Join us for our annual area conference featuring powerful ministrations, workshops, and fellowship. This year\'s theme is "Walking in Divine Purpose" with renowned speakers and inspiring worship sessions.', 'area', 1, NULL, NULL, '2024-03-15 09:00:00', '2024-03-17 18:00:00', 'Madina Conference Center', 'Madina Market Road, Accra', 500, 50.00, 35.00, '2024-02-15 23:59:59', '2024-03-10 23:59:59', 'published', 1, 'Madina Area Annual Conference 2024 - COP', 'Join the Madina Area Annual Conference 2024 with theme Walking in Divine Purpose. Register now for early bird rates.', 1),

('East Legon District Youth Summit', 'A dynamic youth summit focusing on leadership development, career guidance, and spiritual growth. Designed for young people aged 13-35 with interactive sessions and networking opportunities.', 'district', 1, 2, NULL, '2024-02-20 08:00:00', '2024-02-22 20:00:00', 'East Legon Community Center', 'East Legon, Accra', 200, 25.00, 20.00, '2024-02-05 23:59:59', '2024-02-18 23:59:59', 'published', 0, 'East Legon District Youth Summit 2024', 'Youth Summit for leadership development and spiritual growth in East Legon District.', 4),

('Madina Central Assembly Family Day', 'A fun-filled family day with games, food, testimonies, and fellowship. Bring the whole family for a day of celebration and community bonding.', 'assembly', 1, 1, 1, '2024-02-10 10:00:00', '2024-02-10 17:00:00', 'Madina Central Assembly Grounds', 'Madina Market Road, Accra', 300, 0.00, 0.00, NULL, '2024-02-08 23:59:59', 'published', 0, 'Madina Central Assembly Family Day', 'Join us for a fun family day with games, food and fellowship at Madina Central Assembly.', 6),

('Dome District Ministers Conference', 'A specialized conference for ministers and church leaders focusing on effective ministry strategies, pastoral care, and church growth principles.', 'district', 1, 3, NULL, '2024-03-05 09:00:00', '2024-03-07 16:00:00', 'Dome District Office', 'Dome Market, Accra', 100, 75.00, 60.00, '2024-02-20 23:59:59', '2024-03-02 23:59:59', 'published', 0, 'Dome District Ministers Conference 2024', 'Ministers and church leaders conference focusing on effective ministry strategies.', 1),

('New Town Assembly Evangelism Outreach', 'Community evangelism outreach program with door-to-door visits, street preaching, and community service activities. Join us in reaching our neighborhood for Christ.', 'assembly', 1, 1, 2, '2024-02-25 07:00:00', '2024-02-25 15:00:00', 'New Town Community', 'New Town, Madina', 150, 0.00, 0.00, NULL, '2024-02-23 23:59:59', 'published', 0, 'New Town Assembly Evangelism Outreach', 'Community evangelism outreach with door-to-door visits and community service.', 1);

-- Insert event forms for the events
INSERT INTO `event_forms` (`event_id`, `template_id`, `form_fields`) VALUES 
(1, 1, '[
    {"name": "dietary_requirements", "label": "Dietary Requirements", "type": "textarea", "required": false, "description": "Please specify any dietary restrictions or allergies"},
    {"name": "emergency_contact", "label": "Emergency Contact Name", "type": "text", "required": true},
    {"name": "emergency_phone", "label": "Emergency Contact Phone", "type": "text", "required": true},
    {"name": "church_background", "label": "Church Background", "type": "select", "required": false, "options": ["Member", "Visitor", "First Time Attendee", "Other Church Member"]},
    {"name": "accommodation_needed", "label": "Accommodation Needed", "type": "select", "required": false, "options": ["Yes", "No"]},
    {"name": "workshop_preference", "label": "Workshop Preference", "type": "select", "required": false, "options": ["Leadership", "Marriage & Family", "Youth Ministry", "Evangelism", "Worship"]}
]'),

(2, 2, '[
    {"name": "age_group", "label": "Age Group", "type": "select", "required": true, "options": ["13-17", "18-25", "26-35"]},
    {"name": "parent_guardian", "label": "Parent/Guardian Name (if under 18)", "type": "text", "required": false},
    {"name": "parent_phone", "label": "Parent/Guardian Phone (if under 18)", "type": "text", "required": false},
    {"name": "t_shirt_size", "label": "T-Shirt Size", "type": "select", "required": true, "options": ["XS", "S", "M", "L", "XL", "XXL"]},
    {"name": "career_interest", "label": "Career Interest Area", "type": "select", "required": false, "options": ["Technology", "Business", "Healthcare", "Education", "Ministry", "Arts & Media", "Other"]}
]'),

(3, NULL, '[
    {"name": "family_size", "label": "Number of Family Members Attending", "type": "text", "required": true},
    {"name": "children_ages", "label": "Ages of Children (if any)", "type": "text", "required": false},
    {"name": "food_allergies", "label": "Food Allergies", "type": "textarea", "required": false}
]'),

(4, 1, '[
    {"name": "ministry_position", "label": "Ministry Position", "type": "text", "required": true},
    {"name": "years_in_ministry", "label": "Years in Ministry", "type": "select", "required": true, "options": ["1-5", "6-10", "11-20", "20+"]},
    {"name": "church_size", "label": "Church/Assembly Size", "type": "select", "required": false, "options": ["Under 50", "50-100", "101-300", "301-500", "500+"]},
    {"name": "workshop_interest", "label": "Workshop of Interest", "type": "select", "required": false, "options": ["Church Growth", "Pastoral Care", "Leadership Development", "Financial Management", "Youth Ministry"]}
]'),

(5, NULL, '[
    {"name": "evangelism_experience", "label": "Previous Evangelism Experience", "type": "select", "required": false, "options": ["None", "Beginner", "Intermediate", "Experienced"]},
    {"name": "preferred_activity", "label": "Preferred Activity", "type": "select", "required": false, "options": ["Door-to-door", "Street Preaching", "Community Service", "Prayer Walk"]},
    {"name": "transportation", "label": "Need Transportation", "type": "select", "required": false, "options": ["Yes", "No"]}
]');

-- Insert sample ticket types
INSERT INTO `ticket_types` (`event_id`, `name`, `description`, `type`, `price`, `capacity`, `sales_start`, `sales_end`) VALUES 
(1, 'Early Bird Registration', 'Early bird pricing for the annual conference', 'paid', 35.00, 200, '2024-01-01 00:00:00', '2024-02-15 23:59:59'),
(1, 'Regular Registration', 'Regular pricing for the annual conference', 'paid', 50.00, 300, '2024-02-16 00:00:00', '2024-03-10 23:59:59'),
(1, 'Student Discount', 'Discounted rate for students with valid ID', 'paid', 25.00, 50, '2024-01-01 00:00:00', '2024-03-10 23:59:59'),

(2, 'Youth Summit Pass', 'Full access to all youth summit activities', 'paid', 25.00, 150, '2024-01-15 00:00:00', '2024-02-18 23:59:59'),
(2, 'Day Pass', 'Single day access to youth summit', 'paid', 15.00, 50, '2024-01-15 00:00:00', '2024-02-18 23:59:59'),

(3, 'Family Registration', 'Free registration for family day', 'free', 0.00, 300, '2024-01-20 00:00:00', '2024-02-08 23:59:59'),

(4, 'Ministers Pass', 'Full conference access for ministers', 'paid', 75.00, 80, '2024-02-01 00:00:00', '2024-03-02 23:59:59'),
(4, 'Early Bird Ministers', 'Early bird rate for ministers', 'paid', 60.00, 20, '2024-02-01 00:00:00', '2024-02-20 23:59:59'),

(5, 'Outreach Volunteer', 'Free registration for evangelism outreach', 'free', 0.00, 150, '2024-02-10 00:00:00', '2024-02-23 23:59:59');

-- Insert sample products
INSERT INTO `products` (`event_id`, `name`, `description`, `price`, `category`, `stock_quantity`) VALUES 
(1, 'Conference T-Shirt', 'Official Madina Area Conference 2024 T-Shirt with theme design', 15.00, 'Apparel', 200),
(1, 'Conference Handbook', 'Complete conference handbook with schedules and speaker profiles', 10.00, 'Materials', 300),
(1, 'USB Drive - Conference Materials', 'USB drive containing all conference materials and resources', 20.00, 'Digital', 100),
(1, 'Conference Mug', 'Commemorative mug with conference logo and theme', 8.00, 'Merchandise', 150),

(2, 'Youth Summit Hoodie', 'Stylish hoodie with Youth Summit branding', 25.00, 'Apparel', 100),
(2, 'Leadership Workbook', 'Comprehensive leadership development workbook', 12.00, 'Materials', 150),

(4, 'Ministers Handbook', 'Comprehensive guide for effective ministry', 18.00, 'Materials', 80),
(4, 'Ministry Resources CD', 'Collection of ministry resources and tools', 15.00, 'Digital', 60);

-- Insert sample promo codes
INSERT INTO `promo_codes` (`event_id`, `code`, `type`, `discount_value`, `usage_limit`, `valid_from`, `valid_until`) VALUES 
(1, 'EARLY2024', 'percentage', 10.00, 50, '2024-01-01 00:00:00', '2024-02-15 23:59:59'),
(1, 'MEMBER20', 'percentage', 20.00, 100, '2024-01-01 00:00:00', '2024-03-10 23:59:59'),
(2, 'YOUTH15', 'fixed_amount', 5.00, 30, '2024-01-15 00:00:00', '2024-02-18 23:59:59'),
(4, 'MINISTER10', 'percentage', 15.00, 20, '2024-02-01 00:00:00', '2024-03-02 23:59:59');

-- Insert sample registrations
INSERT INTO `event_registrations` (`event_id`, `user_id`, `registration_code`, `form_data`, `payment_status`, `amount_paid`) VALUES 
(1, 7, 'CONF2024001', '{"dietary_requirements": "Vegetarian", "emergency_contact": "Sarah Doe", "emergency_phone": "+233 24 111 2222", "church_background": "Member", "accommodation_needed": "Yes", "workshop_preference": "Leadership"}', 'paid', 35.00),
(1, 8, 'CONF2024002', '{"emergency_contact": "Mike Smith", "emergency_phone": "+233 24 333 4444", "church_background": "Member", "accommodation_needed": "No", "workshop_preference": "Marriage & Family"}', 'paid', 50.00),
(2, 9, 'YOUTH2024001', '{"age_group": "18-25", "t_shirt_size": "L", "career_interest": "Technology"}', 'paid', 25.00),
(3, 7, 'FAMILY2024001', '{"family_size": "4", "children_ages": "8, 12", "food_allergies": "None"}', 'paid', 0.00);

-- Insert sample non-member registrations (using correct table name and exact titles)
INSERT INTO `nonmember_registrations` (`event_id`, `registration_code`, `first_name`, `last_name`, `email`, `phone`, `form_data`, `payment_status`, `amount_paid`) VALUES 
((SELECT id FROM events WHERE title = 'Madina Area Annual Conference 2024' LIMIT 1), 'CONF2024003', 'Samuel', 'Asante', 'samuel.asante@example.com', '+233 24 555 6666', '{"dietary_requirements": "No restrictions", "emergency_contact": "Grace Asante", "emergency_phone": "+233 24 777 8888", "church_background": "Visitor", "accommodation_needed": "Yes", "workshop_preference": "Evangelism"}', 'pending', 50.00),
((SELECT id FROM events WHERE title = 'Madina Central Assembly Family Day' LIMIT 1), 'FAMILY2024002', 'Emmanuel', 'Osei', 'emmanuel.osei@example.com', '+233 24 999 0000', '{"family_size": "3", "children_ages": "5", "food_allergies": "Nuts"}', 'paid', 0.00),
((SELECT id FROM events WHERE title = 'New Town Assembly Evangelism Outreach' LIMIT 1), 'OUTREACH001', 'Grace', 'Mensah', 'grace.mensah@example.com', '+233 24 123 9876', '{"evangelism_experience": "Beginner", "preferred_activity": "Community Service", "transportation": "Yes"}', 'paid', 0.00);

-- Insert sample notifications
INSERT INTO `notifications` (`user_id`, `title`, `message`, `type`, `status`) VALUES 
(11, 'Registration Confirmed', 'Your registration for Madina Area Annual Conference 2024 has been confirmed. Registration code: CONF2024001', 'success', 'unread'),
(12, 'Payment Received', 'Payment for Madina Area Annual Conference 2024 has been received successfully.', 'success', 'read'),
(13, 'Event Reminder', 'East Legon District Youth Summit starts tomorrow. Don\'t forget to bring your ID and registration confirmation.', 'info', 'unread'),
(1, 'New Registration', 'New registration received for Madina Area Annual Conference 2024', 'info', 'read'),
(14, 'Welcome to COP Madina', 'Welcome to The Church of Pentecost - Madina Area platform. Your account has been activated.', 'success', 'unread'),
(15, 'Event Update', 'Tema Central Assembly Family Day has been updated. Please check the latest details.', 'info', 'unread');

-- Insert sample audit logs
INSERT INTO `audit_logs` (`user_id`, `action`, `table_name`, `record_id`, `old_values`, `new_values`) VALUES 
(1, 'create', 'events', 1, NULL, '{"title": "Madina Area Annual Conference 2024", "event_type": "area", "status": "published"}'),
(1, 'create', 'events', 2, NULL, '{"title": "East Legon District Youth Summit", "event_type": "district", "status": "published"}'),
(11, 'create', 'event_registrations', 1, NULL, '{"event_id": 1, "user_id": 11, "registration_code": "CONF2024001"}'),
(12, 'update', 'event_registrations', 1, '{"payment_status": "pending"}', '{"payment_status": "paid"}');

-- Insert sample settings
INSERT INTO `settings` (`setting_key`, `setting_value`) VALUES 
('site_name', 'COP Madina Conference Platform'),
('site_description', 'Conference and Event Management Platform for The Church of Pentecost - Madina Area'),
('contact_email', 'info@copmadinaconf.org'),
('contact_phone', '+233 24 123 4567'),
('timezone', 'Africa/Accra'),
('currency', 'GHS'),
('email_notifications', '1'),
('sms_notifications', '0'),
('auto_approve_registrations', '1'),
('max_file_size', '5'),
('allowed_file_types', 'jpg,jpeg,png,pdf,doc,docx'),
('maintenance_mode', '0'),
('maintenance_message', 'The system is currently under maintenance. Please check back later.');

COMMIT;

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists