SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci;

USE hyapp_wallet;

SET @now_ms = CAST(UNIX_TIMESTAMP(UTC_TIMESTAMP(3)) * 1000 AS UNSIGNED);

INSERT INTO gift_diamond_ratio_configs (
  app_code, region_id, gift_type_code, status, ratio_percent,
  created_by_admin_id, updated_by_admin_id, created_at_ms, updated_at_ms
) VALUES
  ('lalu', 0, 'normal', 'active', 100.00, 0, 0, @now_ms, @now_ms),
  ('lalu', 0, 'lucky', 'active', 10.00, 0, 0, @now_ms, @now_ms),
  ('lalu', 0, 'super_lucky', 'active', 1.00, 0, 0, @now_ms, @now_ms)
ON DUPLICATE KEY UPDATE
  status = VALUES(status),
  ratio_percent = VALUES(ratio_percent),
  updated_by_admin_id = VALUES(updated_by_admin_id),
  updated_at_ms = VALUES(updated_at_ms);
