-- Fix local database with simple test data
USE BigPond;

-- Clear existing data first
DELETE FROM actions;
DELETE FROM playlists;
DELETE FROM application;

-- Insert basic applications
INSERT INTO application (id, platform, name, instance_id, active, created_at, updated_at) VALUES
(1, 'web', 'Xero', 'local-instance', 1, NOW(), NOW()),
(2, 'desktop', 'Sage', 'local-instance', 1, NOW(), NOW()),
(3, 'web', 'QuickBooks', 'local-instance', 1, NOW(), NOW());

-- Insert basic playlists (without user_id/company_id for now)
INSERT INTO playlists (id, name, created_date, application_id) VALUES
(1, 'Xero Login Test', NOW(), 1),
(2, 'Sage Data Entry', NOW(), 2),
(3, 'QuickBooks Invoice', NOW(), 3);

-- Insert some sample actions
INSERT INTO actions (playlist_id, action_type, x, y, timestamp, playlist_name) VALUES
(1, 'click', 100, 200, NOW(), 'Xero Login Test'),
(1, 'click', 150, 250, NOW(), 'Xero Login Test'),
(2, 'click', 200, 300, NOW(), 'Sage Data Entry'),
(3, 'click', 250, 350, NOW(), 'QuickBooks Invoice');
