-- plans seed（口径来源：design/CLAUDE.md §7，价格不入表）
-- free: 1 设备，10 分钟/天，每日广告解锁
-- pro:  5 设备，不限时长，无广告门槛
-- team: 10 设备，不限时长，无广告门槛
INSERT INTO plans (code, max_devices, daily_minutes, ad_gate)
VALUES
  ('free', 1,  10,   TRUE),
  ('pro',  5,  NULL, FALSE),
  ('team', 10, NULL, FALSE)
ON DUPLICATE KEY UPDATE
  max_devices   = VALUES(max_devices),
  daily_minutes = VALUES(daily_minutes),
  ad_gate       = VALUES(ad_gate);

-- directory_version 单例初始化
INSERT INTO directory_version (id, version)
VALUES (1, 1)
ON DUPLICATE KEY UPDATE
  version = VALUES(version);
