-- ============================================================================
-- 모모유통 시드 데이터 — 초기 관리자, 창고 4개, 샘플 제조사
-- 실행 전 db/migrations/001_momo_init.sql 적용 필요
-- ============================================================================

BEGIN;

-- 초기 관리자 (이메일: admin@momo.com / 비밀번호: admin1234 — bcrypt)
-- bcrypt hash for "admin1234" cost=10 — 운영 시 반드시 비밀번호 변경
INSERT INTO momo_users (objid, email, password_hash, company_name, role, status, regdate)
VALUES (
  'MOMOADM00000001',
  'admin@momo.com',
  '$2b$10$gqkZxYVzQwH8gCWPvfBtFOg/9QDx2iO3p0d8RA7d7j.VhSZqHfqTa',
  '모모유통(관리자)',
  'ADMIN',
  'ACTIVE',
  NOW()
)
ON CONFLICT (email) DO NOTHING;

-- 창고
INSERT INTO momo_warehouses (objid, wh_code, wh_name, wh_type, regdate) VALUES
  ('MOMOWH000000001', 'WH001', '본사창고',  'STOCK',       NOW()),
  ('MOMOWH000000002', 'WH002', '시장픽업',  'MARKET',      NOW()),
  ('MOMOWH000000003', 'WH003', '용차배송',  'DELIVERY',    NOW()),
  ('MOMOWH000000004', 'WH004', '창고픽업팀','PICKUP_TEAM', NOW())
ON CONFLICT (wh_code) DO NOTHING;

-- 샘플 제조사
INSERT INTO momo_makers (objid, maker_name, regdate) VALUES
  ('MOMOMK000000001', '성부유통', NOW()),
  ('MOMOMK000000002', '과트',     NOW()),
  ('MOMOMK000000003', '날로유진', NOW())
ON CONFLICT DO NOTHING;

COMMIT;
