-- Seed data for local dev.
-- Applied by `pikku db seed` and `pikku db reset`.

-- password for all seed users is: test1234
-- hash = pbkdf2:100000:<fixed-salt>:<derived-key>  (PBKDF2-SHA-256, 100k iterations)
INSERT OR IGNORE INTO "user" (user_id, email, display_name, password_hash) VALUES
  ('seed-user-1', 'founder@example.com', 'Anna Müller',   'pbkdf2:100000:42424242424242424242424242424242:368e3b41696f0f194428b3580c0666cc8aa5c21e4a5d0c7cd6a3729f8dbd0264'),
  ('seed-user-2', 'angel@example.com',   'Bernd Schmidt', 'pbkdf2:100000:42424242424242424242424242424242:368e3b41696f0f194428b3580c0666cc8aa5c21e4a5d0c7cd6a3729f8dbd0264');

INSERT OR IGNORE INTO company (company_id, name, registry_no, address_line1, postcode, town, country, total_shares, fiscal_year_end) VALUES
  ('seed-co-1', 'Beispiel GmbH', 'HRB 123456', 'Musterstraße 1', '10115', 'Berlin', 'Germany', 10000, '12-31');

INSERT OR IGNORE INTO company_member (member_id, company_id, user_id, role, shares) VALUES
  ('seed-cm-1', 'seed-co-1', 'seed-user-1', 'managing_director', 6000),
  ('seed-cm-2', 'seed-co-1', 'seed-user-2', 'angel',             4000);
