-- Beezifi Workspace - Seed Data


-- Demo organization
INSERT INTO organizations (id, name, slug, description, plan) VALUES
  ('org-demo-0000-0000-0000-000000000001', 'Acme Corp', 'acme', 'Demo workspace for Beezifi Workspace', 'pro');

-- Memberships
INSERT INTO memberships (user_id, organization_id, role) VALUES
  ('usr-admin-000-0000-0000-000000000001', 'org-demo-0000-0000-0000-000000000001', 'owner'),
  ('usr-alice-000-0000-0000-000000000002', 'org-demo-0000-0000-0000-000000000001', 'admin'),
  ('usr-bob-0000-0000-0000-000000000003',  'org-demo-0000-0000-0000-000000000001', 'member'),
  ('usr-carol-00-0000-0000-000000000004',  'org-demo-0000-0000-0000-000000000001', 'member');

-- Default channels
INSERT INTO channels (id, organization_id, name, description, type, created_by, is_default) VALUES
  ('chn-general-0000-0000-0000-000000000001', 'org-demo-0000-0000-0000-000000000001', 'general',   'Company-wide announcements and work-based matters', 'public', 'usr-admin-000-0000-0000-000000000001', TRUE),
  ('chn-random-00-0000-0000-000000000002', 'org-demo-0000-0000-0000-000000000001', 'random',    'Non-work banter and water cooler talk',             'public', 'usr-admin-000-0000-0000-000000000001', TRUE),
  ('chn-dev-0000-0000-0000-000000000003',  'org-demo-0000-0000-0000-000000000001', 'dev',       'Engineering discussions',                           'public', 'usr-alice-000-0000-0000-000000000002', FALSE);

-- Channel members
INSERT INTO channel_members (channel_id, user_id, role) VALUES
  ('chn-general-0000-0000-0000-000000000001', 'usr-admin-000-0000-0000-000000000001', 'admin'),
  ('chn-general-0000-0000-0000-000000000001', 'usr-alice-000-0000-0000-000000000002', 'member'),
  ('chn-general-0000-0000-0000-000000000001', 'usr-bob-0000-0000-0000-000000000003',  'member'),
  ('chn-general-0000-0000-0000-000000000001', 'usr-carol-00-0000-0000-000000000004',  'member'),
  ('chn-random-00-0000-0000-000000000002', 'usr-admin-000-0000-0000-000000000001', 'admin'),
  ('chn-random-00-0000-0000-000000000002', 'usr-alice-000-0000-0000-000000000002', 'member'),
  ('chn-random-00-0000-0000-000000000002', 'usr-bob-0000-0000-0000-000000000003',  'member'),
  ('chn-dev-0000-0000-0000-000000000003',  'usr-alice-000-0000-0000-000000000002', 'admin'),
  ('chn-dev-0000-0000-0000-000000000003',  'usr-bob-0000-0000-0000-000000000003',  'member');

-- Seed messages
INSERT INTO messages (id, channel_id, organization_id, user_id, content, type) VALUES
  (UUID(), 'chn-general-0000-0000-0000-000000000001', 'org-demo-0000-0000-0000-000000000001', 'usr-admin-000-0000-0000-000000000001', 'Welcome to Beezifi Workspace! 🎉 This is the #general channel.', 'system'),
  (UUID(), 'chn-general-0000-0000-0000-000000000001', 'org-demo-0000-0000-0000-000000000001', 'usr-alice-000-0000-0000-000000000002', 'Hey everyone! Excited to be here.', 'text'),
  (UUID(), 'chn-general-0000-0000-0000-000000000001', 'org-demo-0000-0000-0000-000000000001', 'usr-bob-0000-0000-0000-000000000003',  'Thanks @admin for setting this up!', 'text'),
  (UUID(), 'chn-random-00-0000-0000-000000000002', 'org-demo-0000-0000-0000-000000000001', 'usr-alice-000-0000-0000-000000000002', 'Anyone up for coffee? ☕', 'text'),
  (UUID(), 'chn-dev-0000-0000-0000-000000000003',  'org-demo-0000-0000-0000-000000000001', 'usr-alice-000-0000-0000-000000000002', 'Just pushed the new feature branch. Ready for review!', 'text');

