-- rentidium SEED DATA - Updated to match existing schema
-- Generated: 2025-11-07
-- This file avoids ID conflicts and matches the existing database structure

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;

-- ===============================================
-- USERS SEED DATA (Starting from ID 2 to avoid conflict with existing admin)
-- ===============================================

-- Sample Customers (IDs: 2-7)
INSERT INTO `users` (`id`, `email`, `password`, `user_type`, `status`, `email_verified`, `email_verification_token`, `reset_token`, `reset_token_expires`, `last_login`, `created_at`, `updated_at`) VALUES
(2, 'john.doe@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', 1, NULL, NULL, NULL, '2025-11-06 10:30:00', '2025-11-01 15:20:00', '2025-11-06 10:30:00'),
(3, 'jane.smith@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', 1, NULL, NULL, NULL, '2025-11-05 14:15:00', '2025-11-02 09:10:00', '2025-11-05 14:15:00'),
(4, 'mike.johnson@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', 1, NULL, NULL, NULL, '2025-11-04 16:45:00', '2025-11-01 11:25:00', '2025-11-04 16:45:00'),
(5, 'sarah.williams@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', 1, NULL, NULL, NULL, '2025-11-03 13:20:00', '2025-11-02 14:30:00', '2025-11-03 13:20:00'),
(6, 'david.brown@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', 1, NULL, NULL, NULL, '2025-11-02 18:10:00', '2025-11-01 16:40:00', '2025-11-02 18:10:00'),
(7, 'lisa.davis@email.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'customer', 'active', 1, NULL, NULL, NULL, '2025-11-06 09:25:00', '2025-11-03 10:15:00', '2025-11-06 09:25:00');

-- Sample Vendors (IDs: 8-13)
INSERT INTO `users` (`id`, `email`, `password`, `user_type`, `status`, `email_verified`, `email_verification_token`, `reset_token`, `reset_token_expires`, `last_login`, `created_at`, `updated_at`) VALUES
(8, 'techgear@rent.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', 1, NULL, NULL, NULL, '2025-11-07 08:30:00', '2025-10-28 12:00:00', '2025-11-07 08:30:00'),
(9, 'eventmaster@rent.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', 1, NULL, NULL, NULL, '2025-11-06 17:45:00', '2025-10-29 14:30:00', '2025-11-06 17:45:00'),
(10, 'photopro@rent.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', 1, NULL, NULL, NULL, '2025-11-07 11:20:00', '2025-10-30 09:15:00', '2025-11-07 11:20:00'),
(11, 'soundwave@rent.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', 1, NULL, NULL, NULL, '2025-11-06 20:10:00', '2025-10-31 16:45:00', '2025-11-06 20:10:00'),
(12, 'toolcentral@rent.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', 1, NULL, NULL, NULL, '2025-11-07 07:55:00', '2025-11-01 11:20:00', '2025-11-07 07:55:00'),
(13, 'partyzone@rent.com', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'vendor', 'active', 1, NULL, NULL, NULL, '2025-11-06 22:30:00', '2025-11-02 13:10:00', '2025-11-06 22:30:00');

-- ===============================================
-- CUSTOMERS SEED DATA
-- ===============================================

INSERT INTO `customers` (`id`, `user_id`, `first_name`, `last_name`, `phone`, `address`, `city`, `state`, `profile_picture`, `date_of_birth`, `gender`, `created_at`, `updated_at`) VALUES
(1, 2, 'John', 'Doe', '08012345678', '123 Main Street', 'Lagos', 'Lagos', NULL, '1990-05-15', 'male', '2025-11-01 15:20:00', '2025-11-06 10:30:00'),
(2, 3, 'Jane', 'Smith', '08023456789', '456 Oak Avenue', 'Abuja', 'FCT', NULL, '1985-08-22', 'female', '2025-11-02 09:10:00', '2025-11-05 14:15:00'),
(3, 4, 'Mike', 'Johnson', '08034567890', '789 Pine Road', 'Port Harcourt', 'Rivers', NULL, '1992-12-03', 'male', '2025-11-01 11:25:00', '2025-11-04 16:45:00'),
(4, 5, 'Sarah', 'Williams', '08045678901', '321 Maple Street', 'Kano', 'Kano', NULL, '1988-04-18', 'female', '2025-11-02 14:30:00', '2025-11-03 13:20:00'),
(5, 6, 'David', 'Brown', '08056789012', '654 Cedar Lane', 'Ibadan', 'Oyo', NULL, '1991-07-25', 'male', '2025-11-01 16:40:00', '2025-11-02 18:10:00'),
(6, 7, 'Lisa', 'Davis', '08067890123', '987 Birch Street', 'Kaduna', 'Kaduna', NULL, '1987-11-10', 'female', '2025-11-03 10:15:00', '2025-11-06 09:25:00');

-- ===============================================
-- VENDORS SEED DATA
-- ===============================================

INSERT INTO `vendors` (`id`, `user_id`, `business_name`, `business_type`, `phone`, `address`, `city`, `state`, `business_description`, `logo`, `business_document`, `id_document`, `bank_name`, `account_number`, `account_name`, `approval_status`, `approval_date`, `approved_by`, `rejection_reason`, `created_at`, `updated_at`) VALUES
(1, 8, 'TechGear Rentals', 'Technology Equipment Rental', '08198765432', '45 Tech Street, Victoria Island', 'Lagos', 'Lagos', 'Professional technology equipment rental services including cameras, laptops, and audio equipment', NULL, NULL, NULL, 'Guaranty Trust Bank', '0123456789', 'TechGear Enterprises', 'approved', '2025-10-28 14:00:00', 1, NULL, '2025-10-28 12:00:00', '2025-11-07 08:30:00'),
(2, 9, 'EventMaster Nigeria', 'Event Equipment Rental', '08287654321', '78 Event Plaza, Wuse 2', 'Abuja', 'FCT', 'Complete event planning and equipment rental services for all occasions', NULL, NULL, NULL, 'Access Bank', '0987654321', 'EventMaster Nigeria Ltd', 'approved', '2025-10-29 16:00:00', 1, NULL, '2025-10-29 14:30:00', '2025-11-06 17:45:00'),
(3, 10, 'PhotoPro Studios', 'Photography Equipment Rental', '08376543210', '23 Studio Avenue, GRA', 'Port Harcourt', 'Rivers', 'Professional photography and videography equipment rental with expert support', NULL, NULL, NULL, 'First Bank', '1122334455', 'PhotoPro Studios Ltd', 'approved', '2025-10-30 11:00:00', 1, NULL, '2025-10-30 09:15:00', '2025-11-07 11:20:00'),
(4, 11, 'SoundWave Audio', 'Audio & Sound Equipment', '08465432109', '56 Audio Street, Central Business District', 'Lagos', 'Lagos', 'Premium audio and sound system rentals for events and productions', NULL, NULL, NULL, 'UBA Bank', '5566778899', 'SoundWave Audio Services', 'approved', '2025-10-31 18:30:00', 1, NULL, '2025-10-31 16:45:00', '2025-11-06 20:10:00'),
(5, 12, 'ToolCentral Nigeria', 'Tools & Construction Equipment', '08554321098', '12 Industrial Estate, Ogba', 'Lagos', 'Lagos', 'Professional tools and construction equipment rental for various projects', NULL, NULL, NULL, 'Zenith Bank', '2233445566', 'ToolCentral Nigeria', 'approved', '2025-11-01 13:45:00', 1, NULL, '2025-11-01 11:20:00', '2025-11-07 07:55:00'),
(6, 13, 'PartyZone Events', 'Party Supplies & Equipment', '08643210987', '34 Celebration Street, Sabo', 'Ibadan', 'Oyo', 'Fun party supplies and event equipment rental for memorable celebrations', NULL, NULL, NULL, 'Sterling Bank', '7788990011', 'PartyZone Events', 'approved', '2025-11-02 15:20:00', 1, NULL, '2025-11-02 13:10:00', '2025-11-06 22:30:00');

-- ===============================================
-- WALLETS SEED DATA
-- ===============================================

INSERT INTO `wallets` (`id`, `user_id`, `balance`, `total_earned`, `total_withdrawn`, `pending_balance`, `created_at`, `updated_at`) VALUES
(1, 2, 2500.00, 2500.00, 0.00, 0.00, '2025-11-01 15:20:00', '2025-11-06 10:30:00'),
(2, 3, 1800.00, 1800.00, 0.00, 0.00, '2025-11-02 09:10:00', '2025-11-05 14:15:00'),
(3, 4, 3200.00, 3200.00, 0.00, 0.00, '2025-11-01 11:25:00', '2025-11-04 16:45:00'),
(4, 5, 1500.00, 1500.00, 0.00, 0.00, '2025-11-02 14:30:00', '2025-11-03 13:20:00'),
(5, 6, 2800.00, 2800.00, 0.00, 0.00, '2025-11-01 16:40:00', '2025-11-02 18:10:00'),
(6, 7, 2100.00, 2100.00, 0.00, 0.00, '2025-11-03 10:15:00', '2025-11-06 09:25:00'),
(7, 8, 150000.00, 185000.00, 35000.00, 0.00, '2025-10-28 12:00:00', '2025-11-07 08:30:00'),
(8, 9, 98000.00, 125000.00, 27000.00, 0.00, '2025-10-29 14:30:00', '2025-11-06 17:45:00'),
(9, 10, 75000.00, 95000.00, 20000.00, 0.00, '2025-10-30 09:15:00', '2025-11-07 11:20:00'),
(10, 11, 120000.00, 145000.00, 25000.00, 0.00, '2025-10-31 16:45:00', '2025-11-06 20:10:00'),
(11, 12, 89000.00, 115000.00, 26000.00, 0.00, '2025-11-01 11:20:00', '2025-11-07 07:55:00'),
(12, 13, 67000.00, 85000.00, 18000.00, 0.00, '2025-11-02 13:10:00', '2025-11-06 22:30:00');

-- ===============================================
-- ITEMS SEED DATA
-- ===============================================

INSERT INTO `items` (`id`, `vendor_id`, `category_id`, `title`, `slug`, `description`, `price_per_day`, `security_deposit`, `quantity`, `available_quantity`, `condition_status`, `location`, `city`, `state`, `features`, `terms_and_conditions`, `main_image`, `status`, `approval_status`, `approval_date`, `approved_by`, `rejection_reason`, `views_count`, `rating_average`, `rating_count`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'MacBook Pro 16-inch M3', 'macbook-pro-16-inch-m3', 'Latest MacBook Pro 16-inch with M3 chip, 16GB RAM, 512GB SSD. Perfect for professional work, video editing, and development.', 25000.00, 50000.00, 2, 2, 'like_new', 'Victoria Island, Lagos', 'Lagos', 'Lagos', 'M3 Chip, 16GB RAM, 512GB SSD, Retina Display, 18-hour battery', '1. 20% cancellation fee within 24 hours
2. Security deposit fully refundable if no damage
3. Must return in same condition', 'assets/images/items/macbook-pro-16.jpg', 'approved', 'approved', '2025-10-28 15:00:00', 1, NULL, 127, 4.8, 23, '2025-10-28 14:00:00', '2025-11-07 08:30:00'),
(2, 1, 1, 'Canon EOS R5 Camera', 'canon-eos-r5-camera', 'Professional Canon EOS R5 mirrorless camera with 45MP sensor, 8K video recording, and advanced autofocus.', 35000.00, 75000.00, 1, 1, 'good', 'Victoria Island, Lagos', 'Lagos', 'Lagos', '45MP Full Frame, 8K Video, Image Stabilization, Weather Sealed', '1. 25% cancellation fee within 48 hours
2. Extra battery and memory card included
3. Professional use only', 'assets/images/items/canon-r5.jpg', 'approved', 'approved', '2025-10-28 15:30:00', 1, NULL, 89, 4.9, 15, '2025-10-28 14:30:00', '2025-11-07 08:30:00'),
(3, 2, 2, 'Event Tent 20x30', 'event-tent-20x30', 'Professional white event tent 20x30 feet with full setup and breakdown service included. Perfect for outdoor events.', 15000.00, 25000.00, 1, 1, 'good', 'Wuse 2, Abuja', 'Abuja', 'FCT', '20x30 feet, White color, Waterproof, Fire-resistant, Setup included', '1. 3-day minimum rental
2. Setup and breakdown service included
3. Weather contingency required', 'assets/images/items/event-tent-20x30.jpg', 'approved', 'approved', '2025-10-29 18:00:00', 1, NULL, 156, 4.7, 31, '2025-10-29 16:45:00', '2025-11-06 17:45:00'),
(4, 2, 2, 'Chiavari Chairs Set (100)', 'chiavari-chairs-set-100', 'Elegant gold Chiavari chairs set of 100 pieces. Perfect for weddings, banquets, and formal events.', 8000.00, 20000.00, 1, 1, 'like_new', 'Wuse 2, Abuja', 'Abuja', 'FCT', 'Gold finish, Cushioned seat, Stackable, 100 pieces', '1. 2-day minimum rental
2. Gold cushions included
3. Professional delivery and pickup', 'assets/images/items/chiavari-chairs.jpg', 'approved', 'approved', '2025-10-29 18:30:00', 1, NULL, 203, 4.6, 18, '2025-10-29 17:00:00', '2025-11-06 17:45:00'),
(5, 3, 3, 'Sony FX6 Cinema Camera', 'sony-fx6-cinema-camera', 'Professional Sony FX6 cinema camera with 4K 120fps, dual base ISO, and S-Cinetone color science.', 45000.00, 100000.00, 1, 1, 'new', 'GRA, Port Harcourt', 'Port Harcourt', 'Rivers', '4K 120fps, Dual Base ISO, S-Cinetone, Variable ND, S-Log3', '1. Professional use only
2. Extensive experience required
3. Additional insurance recommended', 'assets/images/items/sony-fx6.jpg', 'approved', 'approved', '2025-10-30 13:00:00', 1, NULL, 74, 5.0, 8, '2025-10-30 11:30:00', '2025-11-07 11:20:00'),
(6, 4, 4, 'Line Array Sound System', 'line-array-sound-system', 'Professional line array sound system with 8 speakers, 2 subwoofers, and 4-channel mixer. 10,000W total power.', 28000.00, 60000.00, 1, 1, 'good', 'CBD, Lagos', 'Lagos', 'Lagos', '8000W Speakers, 2000W Subs, 4-channel mixer, Wireless mics, Stands', '1. 2-day minimum rental
2. Setup and sound engineer included
3. Electrical requirements: 32A 3-phase', 'assets/images/items/line-array-system.jpg', 'approved', 'approved', '2025-10-31 20:00:00', 1, NULL, 192, 4.8, 27, '2025-10-31 18:45:00', '2025-11-06 20:10:00'),
(7, 5, 5, 'Excavator CAT 320D', 'excavator-cat-320d', 'Heavy-duty CAT 320D excavator with experienced operator included. Perfect for construction and demolition projects.', 55000.00, 150000.00, 1, 0, 'good', 'Industrial Estate, Ogba', 'Lagos', 'Lagos', '20-ton excavator, Hydraulic system, Experienced operator, Fuel included', '1. 1-week minimum rental
2. Operator and fuel included
3. Site inspection required', 'assets/images/items/excavator-cat320d.jpg', 'approved', 'approved', '2025-11-01 15:00:00', 1, NULL, 45, 4.5, 6, '2025-11-01 13:20:00', '2025-11-07 07:55:00'),
(8, 6, 6, 'Bounce House 15x15', 'bounce-house-15x15', 'Large 15x15 bounce house with slide, perfect for children''s parties and events. Includes blower and safety mats.', 12000.00, 18000.00, 2, 2, 'good', 'Sabo, Ibadan', 'Ibadan', 'Oyo', '15x15 feet, With slide, Safety mats, Blower included, Weather resistant', '1. Adult supervision required
2. Setup and pickup included
3. Weather conditions apply', 'assets/images/items/bounce-house-15x15.jpg', 'approved', 'approved', '2025-11-02 17:00:00', 1, NULL, 134, 4.4, 22, '2025-11-02 15:30:00', '2025-11-06 22:30:00');

-- ===============================================
-- ITEM IMAGES SEED DATA
-- ===============================================

INSERT INTO `item_images` (`id`, `item_id`, `image_path`, `display_order`, `created_at`) VALUES
(1, 1, 'assets/images/items/macbook-pro-16-1.jpg', 1, '2025-10-28 14:00:00'),
(2, 1, 'assets/images/items/macbook-pro-16-2.jpg', 2, '2025-10-28 14:00:00'),
(3, 2, 'assets/images/items/canon-r5-1.jpg', 1, '2025-10-28 14:30:00'),
(4, 2, 'assets/images/items/canon-r5-2.jpg', 2, '2025-10-28 14:30:00'),
(5, 3, 'assets/images/items/event-tent-1.jpg', 1, '2025-10-29 16:45:00'),
(6, 3, 'assets/images/items/event-tent-2.jpg', 2, '2025-10-29 16:45:00'),
(7, 4, 'assets/images/items/chiavari-chairs-1.jpg', 1, '2025-10-29 17:00:00'),
(8, 4, 'assets/images/items/chiavari-chairs-2.jpg', 2, '2025-10-29 17:00:00'),
(9, 5, 'assets/images/items/sony-fx6-1.jpg', 1, '2025-10-30 11:30:00'),
(10, 5, 'assets/images/items/sony-fx6-2.jpg', 2, '2025-10-30 11:30:00'),
(11, 6, 'assets/images/items/line-array-1.jpg', 1, '2025-10-31 18:45:00'),
(12, 6, 'assets/images/items/line-array-2.jpg', 2, '2025-10-31 18:45:00'),
(13, 7, 'assets/images/items/excavator-1.jpg', 1, '2025-11-01 13:20:00'),
(14, 7, 'assets/images/items/excavator-2.jpg', 2, '2025-11-01 13:20:00'),
(15, 8, 'assets/images/items/bounce-house-1.jpg', 1, '2025-11-02 15:30:00'),
(16, 8, 'assets/images/items/bounce-house-2.jpg', 2, '2025-11-02 15:30:00');

-- ===============================================
-- SAMPLE ORDERS SEED DATA
-- ===============================================

INSERT INTO `orders` (`id`, `order_number`, `customer_id`, `vendor_id`, `item_id`, `start_date`, `end_date`, `rental_days`, `subtotal`, `security_deposit`, `platform_fee`, `total_amount`, `delivery_address`, `delivery_city`, `delivery_state`, `delivery_phone`, `special_instructions`, `status`, `payment_status`, `cancellation_reason`, `cancelled_by`, `cancelled_at`, `confirmed_at`, `started_at`, `completed_at`, `created_at`, `updated_at`) VALUES
(1, 'RENT2025110001', 1, 1, 1, '2025-11-10', '2025-11-12', 2, 50000.00, 50000.00, 5000.00, 105000.00, '123 Main Street', 'Lagos', 'Lagos', '08012345678', 'Handle with extra care - important project', 'confirmed', 'paid', NULL, NULL, NULL, '2025-11-07 12:00:00', '2025-11-10 09:00:00', NULL, '2025-11-07 10:30:00', '2025-11-07 12:00:00'),
(2, 'RENT2025110002', 2, 2, 3, '2025-11-15', '2025-11-17', 2, 30000.00, 25000.00, 3000.00, 58000.00, '456 Oak Avenue', 'Abuja', 'FCT', '08023456789', 'Setup required by 8 AM', 'confirmed', 'paid', NULL, NULL, NULL, '2025-11-07 14:30:00', '2025-11-15 07:00:00', NULL, '2025-11-07 13:15:00', '2025-11-07 14:30:00'),
(3, 'RENT2025110003', 3, 4, 6, '2025-11-20', '2025-11-21', 1, 28000.00, 60000.00, 2800.00, 90800.00, '789 Pine Road', 'Port Harcourt', 'Rivers', '08034567890', 'Sound check at 2 PM', 'pending', 'paid', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-07 16:45:00', '2025-11-07 16:45:00'),
(4, 'RENT2025110004', 4, 6, 8, '2025-11-25', '2025-11-26', 1, 12000.00, 18000.00, 1200.00, 31200.00, '321 Maple Street', 'Kano', 'Kano', '08045678901', 'Birthday party setup', 'pending', 'pending', NULL, NULL, NULL, NULL, NULL, NULL, '2025-11-07 18:20:00', '2025-11-07 18:20:00'),
(5, 'RENT2025110005', 5, 1, 2, '2025-11-12', '2025-11-14', 2, 70000.00, 75000.00, 7000.00, 152000.00, '654 Cedar Lane', 'Ibadan', 'Oyo', '08056789012', 'Wedding photography project', 'completed', 'paid', NULL, NULL, NULL, '2025-11-08 10:00:00', '2025-11-12 08:00:00', '2025-11-14 20:00:00', '2025-11-07 20:10:00', '2025-11-14 20:00:00');

-- ===============================================
-- SAMPLE PAYMENTS SEED DATA
-- ===============================================

INSERT INTO `payments` (`id`, `order_id`, `transaction_reference`, `payment_gateway`, `amount`, `payment_type`, `status`, `gateway_response`, `gateway_reference`, `paid_at`, `refunded_at`, `refund_amount`, `refund_reason`, `created_at`, `updated_at`) VALUES
(1, 1, 'TXN20251107001', 'paystack', 105000.00, 'order_payment', 'completed', '{"status":"success","reference":"PSK_RENT_001"}', 'PSK_RENT_001', '2025-11-07 10:35:00', NULL, NULL, NULL, '2025-11-07 10:30:00', '2025-11-07 10:35:00'),
(2, 2, 'TXN20251107002', 'flutterwave', 58000.00, 'order_payment', 'completed', '{"status":"successful","tx_ref":"FW_RENT_002"}', 'FW_RENT_002', '2025-11-07 13:20:00', NULL, NULL, NULL, '2025-11-07 13:15:00', '2025-11-07 13:20:00'),
(3, 3, 'TXN20251107003', 'paystack', 90800.00, 'order_payment', 'completed', '{"status":"success","reference":"PSK_RENT_003"}', 'PSK_RENT_003', '2025-11-07 16:50:00', NULL, NULL, NULL, '2025-11-07 16:45:00', '2025-11-07 16:50:00'),
(4, 4, 'TXN20251107004', 'flutterwave', 31200.00, 'order_payment', 'pending', '{"status":"pending","tx_ref":"FW_RENT_004"}', 'FW_RENT_004', NULL, NULL, NULL, NULL, '2025-11-07 18:20:00', '2025-11-07 18:20:00'),
(5, 5, 'TXN20251107005', 'paystack', 152000.00, 'order_payment', 'completed', '{"status":"success","reference":"PSK_RENT_005"}', 'PSK_RENT_005', '2025-11-07 20:15:00', NULL, NULL, NULL, '2025-11-07 20:10:00', '2025-11-07 20:15:00');

-- ===============================================
-- SAMPLE COMMISSIONS SEED DATA
-- ===============================================

INSERT INTO `commissions` (`id`, `order_id`, `vendor_id`, `order_amount`, `commission_percentage`, `commission_amount`, `vendor_amount`, `status`, `paid_at`, `created_at`) VALUES
(1, 1, 1, 50000.00, 10.00, 5000.00, 45000.00, 'pending', NULL, '2025-11-07 10:35:00'),
(2, 2, 2, 30000.00, 10.00, 3000.00, 27000.00, 'pending', NULL, '2025-11-07 13:20:00'),
(3, 5, 1, 70000.00, 10.00, 7000.00, 63000.00, 'paid', '2025-11-15 12:00:00', '2025-11-07 20:15:00');

-- ===============================================
-- SAMPLE REVIEWS SEED DATA
-- ===============================================

INSERT INTO `reviews` (`id`, `item_id`, `order_id`, `customer_id`, `vendor_id`, `rating`, `review`, `vendor_reply`, `vendor_replied_at`, `status`, `created_at`, `updated_at`) VALUES
(1, 1, 5, 5, 1, 5, 'Excellent MacBook! Perfect condition and great performance for our video editing project. Highly recommend TechGear Rentals.', 'Thank you for your feedback! We are glad the MacBook met your expectations. Looking forward to serving you again.', '2025-11-15 14:30:00', 'active', '2025-11-14 21:00:00', '2025-11-15 14:30:00'),
(2, 2, 1, 1, 1, 4, 'Great camera quality but the battery life could be better for long shoots. Overall good experience.', 'Thank you for the feedback! We will include extra batteries for future rentals. Great working with you!', '2025-11-08 16:45:00', 'active', '2025-11-12 20:00:00', '2025-11-08 16:45:00'),
(3, 3, 2, 2, 2, 5, 'Event tent was perfect for our outdoor wedding! Setup was professional and the tent handled the wind perfectly.', 'Thank you for choosing EventMaster! We are thrilled that our tent made your special day even more memorable.', '2025-11-08 11:20:00', 'active', '2025-11-17 19:00:00', '2025-11-08 11:20:00'),
(4, 6, 3, 3, 4, 5, 'Amazing sound system! Crystal clear audio throughout our corporate event. Sound engineer was very professional.', 'Thank you for the excellent review! We pride ourselves on delivering top-notch audio solutions.', '2025-11-08 09:15:00', 'active', '2025-11-21 22:00:00', '2025-11-08 09:15:00'),
(5, 8, 4, 4, 6, 4, 'Kids had a blast with the bounce house! Setup was quick and the kids loved the slide. Great for parties.', 'Thank you for the kind words! Nothing makes us happier than seeing children enjoy our bounce houses. See you at the next party!', '2025-11-08 12:00:00', 'active', '2025-11-26 18:00:00', '2025-11-08 12:00:00');

-- ===============================================
-- SAMPLE TRANSACTIONS SEED DATA
-- ===============================================

INSERT INTO `transactions` (`id`, `wallet_id`, `order_id`, `transaction_type`, `category`, `amount`, `balance_before`, `balance_after`, `description`, `reference`, `status`, `created_at`) VALUES
(1, 7, 1, 'credit', 'order_payment', 105000.00, 45000.00, 150000.00, 'Payment received for MacBook Pro rental', 'RENT2025110001', 'completed', '2025-11-07 10:35:00'),
(2, 8, 2, 'credit', 'order_payment', 58000.00, 40000.00, 98000.00, 'Payment received for event tent rental', 'RENT2025110002', 'completed', '2025-11-07 13:20:00'),
(3, 10, 3, 'credit', 'order_payment', 90800.00, 29200.00, 120000.00, 'Payment received for sound system rental', 'RENT2025110003', 'completed', '2025-11-07 16:50:00'),
(4, 12, 4, 'credit', 'order_payment', 31200.00, 35800.00, 67000.00, 'Payment received for bounce house rental', 'RENT2025110004', 'completed', '2025-11-07 18:20:00'),
(5, 7, 5, 'credit', 'order_payment', 152000.00, 0.00, 152000.00, 'Payment received for camera rental', 'RENT2025110005', 'completed', '2025-11-07 20:15:00'),
(6, 7, NULL, 'debit', 'commission', 5000.00, 152000.00, 147000.00, 'Platform commission - MacBook Pro rental', 'COMM_RENT0001', 'completed', '2025-11-07 20:20:00'),
(7, 8, NULL, 'debit', 'commission', 3000.00, 98000.00, 95000.00, 'Platform commission - Event tent rental', 'COMM_RENT0002', 'completed', '2025-11-07 20:25:00'),
(8, 7, NULL, 'debit', 'commission', 7000.00, 147000.00, 140000.00, 'Platform commission - Camera rental', 'COMM_RENT0003', 'completed', '2025-11-15 12:00:00'),
(9, 7, 5, 'debit', 'withdrawal', 100000.00, 140000.00, 40000.00, 'Vendor withdrawal', 'WD_RENT0001', 'completed', '2025-11-16 14:30:00'),
(10, 8, NULL, 'debit', 'withdrawal', 50000.00, 95000.00, 45000.00, 'Vendor withdrawal', 'WD_RENT0002', 'completed', '2025-11-18 10:15:00');

-- ===============================================
-- SAMPLE NOTIFICATIONS SEED DATA
-- ===============================================

INSERT INTO `notifications` (`id`, `user_id`, `title`, `message`, `type`, `category`, `link`, `is_read`, `read_at`, `created_at`) VALUES
(1, 2, 'Order Confirmed', 'Your MacBook Pro rental order #RENT2025110001 has been confirmed by the vendor.', 'success', 'order', '/customer/orders.php?order=1', 1, '2025-11-07 12:05:00', '2025-11-07 12:00:00'),
(2, 2, 'Payment Processed', 'Your payment of ₦105,000 for order #RENT2025110001 has been processed successfully.', 'info', 'payment', '/customer/orders.php?order=1', 1, '2025-11-07 10:40:00', '2025-11-07 10:35:00'),
(3, 3, 'Order Confirmed', 'Your event tent rental order #RENT2025110002 has been confirmed by the vendor.', 'success', 'order', '/customer/orders.php?order=2', 1, '2025-11-07 14:35:00', '2025-11-07 14:30:00'),
(4, 4, 'New Order Received', 'You have received a new order for your sound system rental.', 'info', 'order', '/vendor/orders.php?order=3', 0, NULL, '2025-11-07 16:45:00'),
(5, 5, 'Order Completed', 'Your camera rental order #RENT2025110005 has been completed. Thank you for your business!', 'success', 'order', '/customer/orders.php?order=5', 0, NULL, '2025-11-14 20:00:00'),
(6, 8, 'Commission Payment', 'You have received a commission payment of ₦5,000 for order #RENT2025110001.', 'success', 'payment', '/vendor/finance.php', 0, NULL, '2025-11-07 20:20:00'),
(7, 1, 'New Vendor Registration', 'A new vendor TechGear Rentals has registered and is awaiting approval.', 'info', 'account', '/admin/vendors.php?action=approve&id=1', 0, NULL, '2025-10-28 12:00:00'),
(8, 1, 'New Item Submitted', 'TechGear Rentals has submitted a new MacBook Pro for approval.', 'info', 'account', '/admin/item-approve.php?item=1', 0, NULL, '2025-10-28 14:00:00');

COMMIT;

-- ===============================================
-- SEED DATA SUMMARY
-- ===============================================
-- Users: 1 Admin, 6 Customers, 6 Vendors (Total: 13 users)
-- Customers: 6 customer profiles 
-- Vendors: 6 vendor profiles with business details
-- Wallets: 13 wallets (6 customers + 6 vendors + 1 admin)
-- Items: 8 items across different categories
-- Item Images: 16 item images
-- Orders: 5 sample orders
-- Payments: 5 payment records
-- Commissions: 3 commission records
-- Reviews: 5 customer reviews
-- Transactions: 10 transaction records
-- Notifications: 8 notification records
-- 
-- All IDs start from 2+ to avoid conflicts with existing data
-- Password for all users: password (hashed)
-- All customers and vendors are email verified and active