-- ================================================================
-- Velocity-OS Test Users Seed (FOR TESTING ONLY — NOT FOR PROD)
-- ================================================================
-- Generated by seed_test_users.py

BEGIN;

-- Sagnik (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('sagnik@desineuron.in', '$2b$12$3j9DDH.clvQhFucKAisJFeJBrTXhA1Vd27J8CCpMeucmacbW8f9be', 'ADMIN', 'tenant_velocity', 'Sagnik', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

-- Sayan (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('sayan@desineuron.in', '$2b$12$8Qh4REe8OzMNBIh16/vEpeB9349eWpTqZWub.PL1.eKbqNmRrhPey', 'ADMIN', 'tenant_velocity', 'Sayan', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

-- Sourik (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('sourik@desineuron.in', '$2b$12$uiYt6CF.tYswM9xRqG9f.ui7rTyOj3V7dMSoMvQ243BMI3i.W5UV2', 'ADMIN', 'tenant_velocity', 'Sourik', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

-- Abantika (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('abantika@desineuron.in', '$2b$12$VUfvj6dMp/pTo1XlEEIgHuB44EGNrrjN9xzhJs4NeKY3HaUijtGJq', 'ADMIN', 'tenant_velocity', 'Abantika', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

-- Sinjini (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('sinjini@desineuron.in', '$2b$12$W/3p6P5jOFfIZ15Bv4qco.hcnn5jic4mN42xxRtMH6dtfHdp5iZE6', 'ADMIN', 'tenant_velocity', 'Sinjini', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

-- Swastika (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('swastika@desineuron.in', '$2b$12$ilNxZFa7/BjUMJbakcvaRejHYWnn5D0ZtTOixFoGYfE/1T6K6D6x6', 'ADMIN', 'tenant_velocity', 'Swastika', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

-- Debargha (ADMIN)
INSERT INTO users_and_roles
  (email, password_hash, role, tenant_id, full_name, is_active)
VALUES
  ('debargha@desineuron.in', '$2b$12$N9QOcFfs8pUmOOBczFZQx.UMg6pbIuUvxhDe0kkFQyZ4KUbq96umu', 'ADMIN', 'tenant_velocity', 'Debargha', TRUE)
ON CONFLICT (email) DO UPDATE
  SET password_hash = EXCLUDED.password_hash,
      role          = EXCLUDED.role,
      full_name     = EXCLUDED.full_name,
      is_active     = TRUE;

COMMIT;

-- Verify:
SELECT email, role, full_name FROM users_and_roles ORDER BY role DESC, email;