-- rentidium DATABASE SEEDS
-- File: database/seeds.sql
-- Sample data for development and testing

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

-- Insert sample categories
INSERT INTO `categories` (`id`, `name`, `description`, `icon`, `image`, `sort_order`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Electronics', 'Cameras, laptops, audio equipment and more', 'fas fa-laptop', 'electronics.jpg', 1, 1, NOW(), NOW()),
(2, 'Tools & Equipment', 'Power tools, hand tools, and construction equipment', 'fas fa-tools', 'tools.jpg', 2, 1, NOW(), NOW()),
(3, 'Vehicles', 'Cars, motorcycles, bicycles, and transportation', 'fas fa-car', 'vehicles.jpg', 3, 1, NOW(), NOW()),
(4, 'Party & Events', 'Event supplies, decorations, and entertainment', 'fas fa-birthday-cake', 'party.jpg', 4, 1, NOW(), NOW()),
(5, 'Sports & Recreation', 'Sports equipment, fitness gear, and outdoor items', 'fas fa-football-ball', 'sports.jpg', 5, 1, NOW(), NOW()),
(6, 'Home & Garden', 'Furniture, appliances, and garden equipment', 'fas fa-home', 'home.jpg', 6, 1, NOW(), NOW()),
(7, 'Fashion & Accessories', 'Clothing, jewelry, and fashion items', 'fas fa-tshirt', 'fashion.jpg', 7, 1, NOW(), NOW()),
(8, 'Books & Media', 'Books, movies, games, and educational materials', 'fas fa-book', 'books.jpg', 8, 1, NOW(), NOW());

-- Insert sample users (Admin)
INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `password_hash`, `role`, `status`, `email_verified_at`, `created_at`, `updated_at`) VALUES
(1, 'System', 'Administrator', 'admin@rentidium.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'admin', 'active', NOW(), NOW(), NOW());

-- Insert sample users (Vendors)
INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `password_hash`, `role`, `status`, `email_verified_at`, `created_at`, `updated_at`) VALUES
(2, 'John', 'Adebayo', 'john.adebayo@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', NOW(), NOW(), NOW()),
(3, 'Sarah', 'Okafor', 'sarah.okafor@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', NOW(), NOW(), NOW()),
(4, 'Michael', 'Chen', 'michael.chen@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', NOW(), NOW(), NOW()),
(5, 'Amara', 'Nwosu', 'amara.nwosu@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'pending', NULL, NOW(), NOW());

-- Insert sample users (Customers)
INSERT INTO `users` (`id`, `first_name`, `last_name`, `email`, `password_hash`, `role`, `status`, `email_verified_at`, `created_at`, `updated_at`) VALUES
(6, 'Alice', 'Johnson', 'alice.johnson@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', NOW(), NOW(), NOW()),
(7, 'Bob', 'Smith', 'bob.smith@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', NOW(), NOW(), NOW()),
(8, 'Carol', 'Williams', 'carol.williams@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', NOW(), NOW(), NOW()),
(9, 'David', 'Brown', 'david.brown@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', NOW(), NOW(), NOW()),
(10, 'Emma', 'Davis', 'emma.davis@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', NOW(), NOW(), NOW());

-- Insert sample vendors
INSERT INTO `vendors` (`id`, `user_id`, `business_name`, `business_type`, `description`, `address`, `city`, `state`, `phone`, `status`, `verification_status`, `total_items`, `approved_items`, `rating_average`, `rating_count`, `created_at`, `updated_at`) VALUES
(1, 2, 'TechRent Lagos', 'Technology', 'Premier technology equipment rental in Lagos', '123 Victoria Island', 'Lagos', 'Lagos', '+2348012345678', 'approved', 'verified', 5, 5, 4.8, 25, NOW(), NOW()),
(2, 3, 'PartyPro Nigeria', 'Events', 'Complete party and event equipment rental', '45 Ikeja GRA', 'Lagos', 'Lagos', '+2348123456789', 'approved', 'verified', 8, 7, 4.6, 18, NOW(), NOW()),
(3, 4, 'Tools & More', 'Construction', 'Professional tools and equipment rental', '67 Surulere', 'Lagos', 'Lagos', '+2348234567890', 'approved', 'verified', 12, 10, 4.7, 32, NOW(), NOW()),
(4, 5, 'SportGear Rentals', 'Sports', 'Sports equipment for all activities', '89 Yaba', 'Lagos', 'Lagos', '+2348345678901', 'pending', 'pending', 3, 0, 0, 0, NOW(), NOW());

-- Insert sample customers
INSERT INTO `customers` (`id`, `user_id`, `first_name`, `last_name`, `phone`, `address`, `city`, `state`, `date_of_birth`, `gender`, `profile_image`, `created_at`, `updated_at`) VALUES
(1, 6, 'Alice', 'Johnson', '+2347012345678', '12 Ikoyi', 'Lagos', 'Lagos', '1990-05-15', 'Female', 'alice.jpg', NOW(), NOW()),
(2, 7, 'Bob', 'Smith', '+2347123456789', '34 Lekki', 'Lagos', 'Lagos', '1985-08-22', 'Male', 'bob.jpg', NOW(), NOW()),
(3, 8, 'Carol', 'Williams', '+2347234567890', '56 Magodo', 'Lagos', 'Lagos', '1992-12-10', 'Female', 'carol.jpg', NOW(), NOW()),
(4, 9, 'David', 'Brown', '+2347345678901', '78 Ajah', 'Lagos', 'Lagos', '1988-03-18', 'Male', 'david.jpg', NOW(), NOW()),
(5, 10, 'Emma', 'Davis', '+2347456789012', '90 Badagry', 'Lagos', 'Lagos', '1995-11-25', 'Female', 'emma.jpg', NOW(), NOW());

-- Insert sample items
INSERT INTO `items` (`id`, `vendor_id`, `category_id`, `title`, `description`, `main_image`, `additional_images`, `price_per_day`, `price_per_week`, `price_per_month`, `available_quantity`, `minimum_rental_days`, `maximum_rental_days`, `deposit_amount`, `location`, `city`, `state`, `latitude`, `longitude`, `tags`, `specifications`, `approval_status`, `is_active`, `is_featured`, `views_count`, `rating_average`, `rating_count`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Canon EOS 5D Mark IV Camera', 'Professional DSLR camera perfect for weddings and events. Includes 24-105mm lens, extra batteries, and memory cards.', 'canon-5d-mark-iv.jpg', '["canon-5d-1.jpg", "canon-5d-2.jpg", "canon-5d-3.jpg"]', 15000.00, 90000.00, 350000.00, 2, 1, 30, 50000.00, '123 Victoria Island', 'Lagos', 'Lagos', 6.4281, 3.4219, 'camera,dslr,canon,photography,wedding,professional', '{"sensor": "30.4MP", "lens": "24-105mm", "battery_life": "900 shots", "weight": "890g"}', 'approved', 1, 1, 45, 4.8, 12, NOW(), NOW()),
(2, 1, 1, 'MacBook Pro 16-inch', 'Latest MacBook Pro with M2 chip, 16GB RAM, 512GB SSD. Perfect for video editing and development work.', 'macbook-pro-16.jpg', '["macbook-1.jpg", "macbook-2.jpg", "macbook-3.jpg"]', 12000.00, 72000.00, 280000.00, 3, 1, 60, 30000.00, '123 Victoria Island', 'Lagos', 'Lagos', 6.4281, 3.4219, 'laptop,macbook,apple,development,video editing', '{"processor": "M2", "ram": "16GB", "storage": "512GB SSD", "display": "16-inch"}', 'approved', 1, 0, 32, 4.9, 8, NOW(), NOW()),
(3, 2, 4, 'Event Sound System Package', 'Complete PA system with speakers, microphones, mixer, and stands. Suitable for up to 200 people.', 'sound-system.jpg', '["sound-1.jpg", "sound-2.jpg", "sound-3.jpg"]', 25000.00, 150000.00, 600000.00, 1, 1, 7, 75000.00, '45 Ikeja GRA', 'Lagos', 'Lagos', 6.6017, 3.3515, 'sound system,speaker,microphone,event,party,pa system', '{"power": "1000W", "coverage": "200 people", "inputs": "multiple", "microphones": "2 wireless"}', 'approved', 1, 1, 28, 4.7, 15, NOW(), NOW()),
(4, 2, 4, 'LED Uplight Package', 'Wireless LED uplights with remote control. Set of 8 lights perfect for venue decoration.', 'led-uplights.jpg', '["led-1.jpg", "led-2.jpg", "led-3.jpg"]', 8000.00, 48000.00, 180000.00, 8, 1, 14, 20000.00, '45 Ikeja GRA', 'Lagos', 'Lagos', 6.6017, 3.3515, 'led,uplight,decoration,event,lighting,wedding', '{"color": "RGB", "battery": "8 hours", "wireless": "yes", "remote": "included"}', 'approved', 1, 0, 19, 4.5, 6, NOW(), NOW()),
(5, 3, 2, 'Makita Drill Set', 'Professional cordless drill set with 2 batteries, charger, and complete bit set. Perfect for DIY and construction.', 'makita-drill.jpg', '["drill-1.jpg", "drill-2.jpg", "drill-3.jpg"]', 5000.00, 30000.00, 120000.00, 4, 1, 30, 15000.00, '67 Surulere', 'Lagos', 'Lagos', 6.4898, 3.3791, 'drill,makita,power tool,construction,diy', '{"voltage": "18V", "battery": "5.0Ah", "chuck": "13mm", "weight": "1.8kg"}', 'approved', 1, 0, 38, 4.6, 22, NOW(), NOW()),
(6, 3, 2, 'Concrete Mixer', 'Portable concrete mixer for small to medium construction projects. Easy to transport and operate.', 'concrete-mixer.jpg', '["mixer-1.jpg", "mixer-2.jpg", "mixer-3.jpg"]', 10000.00, 60000.00, 240000.00, 2, 1, 14, 30000.00, '67 Surulere', 'Lagos', 'Lagos', 6.4898, 3.3791, 'concrete,mixer,construction,cement,portable', '{"capacity": "140L", "motor": "550W", "weight": "55kg", "wheels": "included"}', 'approved', 1, 0, 24, 4.4, 11, NOW(), NOW()),
(7, 1, 1, 'DJI Mavic Air 2 Drone', 'Professional drone with 4K camera, obstacle avoidance, and 34-minute flight time. Includes extra batteries.', 'djimavic-air2.jpg', '["drone-1.jpg", "drone-2.jpg", "drone-3.jpg"]', 18000.00, 108000.00, 420000.00, 1, 1, 14, 60000.00, '123 Victoria Island', 'Lagos', 'Lagos', 6.4281, 3.4219, 'drone,dji,4k camera,aerial,photography,video', '{"camera": "4K/60fps", "flight_time": "34 min", "range": "10km", "weight": "570g"}', 'approved', 1, 1, 52, 4.9, 18, NOW(), NOW()),
(8, 3, 2, 'Pressure Washer', 'High-pressure washer for cleaning vehicles, buildings, and outdoor surfaces. Includes multiple nozzles.', 'pressure-washer.jpg', '["washer-1.jpg", "washer-2.jpg", "washer-3.jpg"]', 7500.00, 45000.00, 180000.00, 3, 1, 21, 25000.00, '67 Surulere', 'Lagos', 'Lagos', 6.4898, 3.3791, 'pressure washer,cleaning,outdoor,vehicle,high pressure', '{"pressure": "2000 PSI", "flow": "1.2 GPM", "power": "1600W", "hose": "20ft"}', 'approved', 1, 0, 16, 4.3, 9, NOW(), NOW());

-- Insert sample reviews
INSERT INTO `reviews` (`id`, `item_id`, `customer_id`, `order_id`, `rating`, `title`, `comment`, `is_verified`, `helpful_count`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 5, 'Excellent Camera!', 'The Canon 5D Mark IV was in perfect condition and produced amazing photos for our wedding. John was very professional and helpful.', 1, 3, DATE_SUB(NOW(), INTERVAL 5 DAY), NOW()),
(2, 1, 2, 2, 4, 'Great Quality', 'Camera worked perfectly for our event. Only minor issue was battery life could be better, but overall satisfied.', 1, 2, DATE_SUB(NOW(), INTERVAL 8 DAY), NOW()),
(3, 3, 3, 3, 5, 'Perfect Sound System', 'The sound quality was excellent and covered our venue perfectly. Setup was quick and easy.', 1, 4, DATE_SUB(NOW(), INTERVAL 12 DAY), NOW()),
(4, 5, 4, 4, 5, 'Powerful Drill', 'Makita drill worked great for my home renovation. Battery life was impressive and it handled tough materials easily.', 1, 1, DATE_SUB(NOW(), INTERVAL 15 DAY), NOW()),
(5, 2, 5, 5, 4, 'Good Laptop', 'MacBook Pro worked well for my video editing project. A bit expensive for the daily rate but worth it for the quality.', 1, 2, DATE_SUB(NOW(), INTERVAL 18 DAY), NOW());

-- Insert sample orders
INSERT INTO `orders` (`id`, `customer_id`, `vendor_id`, `item_id`, `order_number`, `start_date`, `end_date`, `quantity`, `daily_rate`, `total_days`, `subtotal`, `platform_commission`, `tax_amount`, `deposit_amount`, `total_amount`, `payment_status`, `status`, `payment_method`, `payment_reference`, `notes`, `created_at`, `updated_at`, `completed_at`) VALUES
(1, 1, 1, 1, 'ORD-2024-001', DATE_ADD(NOW(), INTERVAL -2 DAY), DATE_ADD(NOW(), INTERVAL 3 DAY), 1, 15000.00, 5, 75000.00, 3750.00, 5906.25, 50000.00, 136656.25, 'paid', 'completed', 'card', 'TXN123456789', 'Wedding photography session', DATE_SUB(NOW(), INTERVAL 10 DAY), DATE_SUB(NOW(), INTERVAL 1 DAY), DATE_SUB(NOW(), INTERVAL 1 DAY)),
(2, 2, 1, 1, 'ORD-2024-002', DATE_ADD(NOW(), INTERVAL 1 DAY), DATE_ADD(NOW(), INTERVAL 6 DAY), 1, 15000.00, 5, 75000.00, 3750.00, 5906.25, 50000.00, 136656.25, 'paid', 'confirmed', 'card', 'TXN987654321', 'Corporate event photos', DATE_SUB(NOW(), INTERVAL 2 DAY), NOW(), NULL),
(3, 3, 2, 3, 'ORD-2024-003', DATE_ADD(NOW(), INTERVAL -1 DAY), DATE_ADD(NOW(), INTERVAL 1 DAY), 1, 25000.00, 2, 50000.00, 2500.00, 3937.50, 75000.00, 131437.50, 'paid', 'in_progress', 'bank_transfer', 'BT456789123', 'Anniversary party', DATE_SUB(NOW(), INTERVAL 5 DAY), DATE_SUB(NOW(), INTERVAL 1 DAY), NULL),
(4, 4, 3, 5, 'ORD-2024-004', DATE_ADD(NOW(), INTERVAL 2 DAY), DATE_ADD(NOW(), INTERVAL 4 DAY), 1, 5000.00, 2, 10000.00, 500.00, 787.50, 15000.00, 26287.50, 'pending', 'pending', NULL, NULL, 'Home renovation project', DATE_SUB(NOW(), INTERVAL 1 DAY), NOW(), NULL),
(5, 5, 1, 2, 'ORD-2024-005', DATE_ADD(NOW(), INTERVAL 7 DAY), DATE_ADD(NOW(), INTERVAL 14 DAY), 1, 12000.00, 7, 84000.00, 4200.00, 6615.00, 30000.00, 124815.00, 'pending', 'pending', NULL, NULL, 'Video editing project', NOW(), NOW(), NULL);

-- Insert sample vendor wallets
INSERT INTO `vendor_wallets` (`vendor_id`, `balance`, `available_balance`, `pending_balance`, `total_earned`, `total_withdrawn`, `currency`, `status`, `created_at`, `updated_at`) VALUES
(1, 75000.00, 50000.00, 25000.00, 150000.00, 75000.00, 'NGN', 'active', NOW(), NOW()),
(2, 45000.00, 30000.00, 15000.00, 90000.00, 45000.00, 'NGN', 'active', NOW(), NOW()),
(3, 60000.00, 40000.00, 20000.00, 120000.00, 60000.00, 'NGN', 'active', NOW(), NOW()),
(4, 0.00, 0.00, 0.00, 0.00, 0.00, 'NGN', 'active', NOW(), NOW());

-- Insert sample withdrawal requests
INSERT INTO `vendor_withdrawals` (`vendor_id`, `amount`, `fee_amount`, `net_amount`, `payment_method`, `bank_details`, `notes`, `status`, `requested_at`, `processed_at`, `transaction_id`) VALUES
(1, 25000.00, 375.00, 24625.00, 'bank_transfer', '{"bank_name": "First Bank", "account_number": "1234567890", "account_name": "TechRent Lagos"}', 'Monthly earnings withdrawal', 'completed', DATE_SUB(NOW(), INTERVAL 15 DAY), DATE_SUB(NOW(), INTERVAL 12 DAY), 'TXN-WD-001'),
(2, 15000.00, 225.00, 14775.00, 'bank_transfer', '{"bank_name": "GTBank", "account_number": "0987654321", "account_name": "PartyPro Nigeria"}', 'Weekly payout', 'completed', DATE_SUB(NOW(), INTERVAL 8 DAY), DATE_SUB(NOW(), INTERVAL 6 DAY), 'TXN-WD-002'),
(3, 20000.00, 300.00, 19700.00, 'bank_transfer', '{"bank_name": "UBA", "account_number": "1122334455", "account_name": "Tools & More"}', 'Project completion payment', 'pending', DATE_SUB(NOW(), INTERVAL 2 DAY), NULL, NULL);

-- Insert sample item extras
INSERT INTO `item_extras` (`id`, `item_id`, `name`, `price`, `price_type`, `description`, `is_required`, `created_at`, `updated_at`) VALUES
(1, 1, 'Extra Battery', 5000.00, 'daily', 'Additional battery pack for extended shooting', 0, NOW(), NOW()),
(2, 1, '50mm Lens', 8000.00, 'daily', 'Professional 50mm f/1.4 lens', 0, NOW(), NOW()),
(3, 1, 'Memory Card 128GB', 2000.00, 'one-time', 'High-speed SD card 128GB', 0, NOW(), NOW()),
(4, 3, 'Microphone Stand', 3000.00, 'daily', 'Adjustable microphone stand', 0, NOW(), NOW()),
(5, 3, 'Extension Cables', 1000.00, 'one-time', 'Set of audio extension cables', 0, NOW(), NOW());

-- Insert sample order extras
INSERT INTO `order_extras` (`id`, `order_id`, `extra_id`, `quantity`, `price`, `total_price`, `created_at`) VALUES
(1, 1, 1, 1, 5000.00, 5000.00, NOW()),
(2, 1, 3, 1, 2000.00, 2000.00, NOW()),
(3, 2, 2, 1, 8000.00, 8000.00, NOW()),
(4, 3, 4, 1, 3000.00, 3000.00, NOW());

-- Insert sample bookmarks
INSERT INTO `bookmarks` (`id`, `customer_id`, `item_id`, `created_at`) VALUES
(1, 1, 2, NOW()),
(2, 1, 7, NOW()),
(3, 2, 3, NOW()),
(4, 2, 4, NOW()),
(5, 3, 5, NOW()),
(6, 3, 6, NOW()),
(7, 4, 1, NOW()),
(8, 4, 8, NOW()),
(9, 5, 2, NOW()),
(10, 5, 5, NOW());

-- Insert sample contact submissions
INSERT INTO `contact_submissions` (`id`, `name`, `email`, `phone`, `subject`, `message`, `type`, `ip_address`, `user_agent`, `status`, `created_at`) VALUES
(1, 'Test User', 'test@example.com', '+2341234567890', 'General Inquiry', 'I have a question about your rental services.', 'general', '127.0.0.1', 'Mozilla/5.0', 'new', NOW()),
(2, 'Vendor Applicant', 'vendor@example.com', '+2342345678901', 'Vendor Application', 'I would like to become a vendor on your platform.', 'vendor', '127.0.0.1', 'Mozilla/5.0', 'new', NOW()),
(3, 'Customer Support', 'support@example.com', '+2343456789012', 'Technical Support', 'I am experiencing issues with my account.', 'support', '127.0.0.1', 'Mozilla/5.0', 'new', NOW());

-- Insert sample notifications
INSERT INTO `notifications` (`id`, `user_id`, `type`, `title`, `message`, `data`, `is_read`, `created_at`, `read_at`) VALUES
(1, 1, 'order_confirmed', 'Order Confirmed', 'Your order #ORD-2024-002 has been confirmed', '{"order_id": 2}', 0, NOW(), NULL),
(2, 6, 'item_approved', 'Item Approved', 'Your Canon camera has been approved and is now live!', '{"item_id": 1}', 1, DATE_SUB(NOW(), INTERVAL 1 DAY), NOW()),
(3, 7, 'payment_received', 'Payment Received', 'Payment of ₦136,656.25 has been received for order #ORD-2024-001', '{"order_id": 1, "amount": 136656.25}', 1, DATE_SUB(NOW(), INTERVAL 2 DAY), NOW());

-- Insert sample system settings
INSERT INTO `settings` (`key`, `value`, `type`, `description`, `is_public`, `created_at`, `updated_at`) VALUES
('site_name', 'rentidium', 'string', 'Website name', 1, NOW(), NOW()),
('site_description', 'Nigeria\'s premier rental marketplace', 'string', 'Website description', 1, NOW(), NOW()),
('contact_email', 'support@rentidium.com', 'string', 'Contact email address', 1, NOW(), NOW()),
('contact_phone', '+234700RENTIV', 'string', 'Contact phone number', 1, NOW(), NOW()),
('commission_rate', '5', 'number', 'Platform commission percentage', 0, NOW(), NOW()),
('min_withdrawal_amount', '1000', 'number', 'Minimum withdrawal amount in NGN', 0, NOW(), NOW()),
('max_upload_size', '5242880', 'number', 'Maximum file upload size in bytes', 0, NOW(), NOW()),
('maintenance_mode', '0', 'boolean', 'Enable maintenance mode', 0, NOW(), NOW()),
('email_verification_required', '1', 'boolean', 'Require email verification for new users', 0, NOW(), NOW()),
('auto_approve_items', '0', 'boolean', 'Automatically approve new items', 0, NOW(), NOW());

-- Insert sample audit logs
INSERT INTO `audit_logs` (`id`, `user_id`, `event`, `auditable_type`, `auditable_id`, `old_values`, `new_values`, `ip_address`, `user_agent`, `url`, `created_at`) VALUES
(1, 1, 'item_created', 'Item', 1, NULL, '{"title": "Canon EOS 5D Mark IV Camera", "price": 15000}', '127.0.0.1', 'Mozilla/5.0', '/vendor/items/create', NOW()),
(2, 2, 'order_created', 'Order', 1, NULL, '{"total_amount": 136656.25, "status": "pending"}', '127.0.0.1', 'Mozilla/5.0', '/customer/checkout', NOW()),
(3, 1, 'item_approved', 'Item', 1, '{"approval_status": "pending"}', '{"approval_status": "approved"}', '127.0.0.1', 'Mozilla/5.0', '/admin/items/approve', NOW());

-- Create sample analytics data
INSERT INTO `analytics_events` (`id`, `event_name`, `event_data`, `user_id`, `session_id`, `ip_address`, `user_agent`, `created_at`) VALUES
(1, 'page_view', '{"page": "/", "referrer": "google.com"}', NULL, 'sess_123', '127.0.0.1', 'Mozilla/5.0', NOW()),
(2, 'item_view', '{"item_id": 1, "category": "Electronics"}', 6, 'sess_456', '127.0.0.1', 'Mozilla/5.0', NOW()),
(3, 'search_performed', '{"query": "camera", "category": "all", "results": 15}', NULL, 'sess_789', '127.0.0.1', 'Mozilla/5.0', NOW()),
(4, 'user_registered', '{"role": "customer", "source": "organic"}', 6, NULL, '127.0.0.1', 'Mozilla/5.0', DATE_SUB(NOW(), INTERVAL 30 DAY)),
(5, 'order_completed', '{"order_id": 1, "amount": 136656.25, "duration": 5}', 1, 'sess_123', '127.0.0.1', 'Mozilla/5.0', DATE_SUB(NOW(), INTERVAL 1 DAY));

COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;