-- Migration 041 — RES#2 (11/05/2026).
--
-- Backfill da politica de resgate nos 2 agentes existentes hoje:
--   - 278 (BJ COMERCIO / Aibal)
--   - 417 (CODGOX / Rede HG)
--
-- Defaults:
--   agente_limite_resgates_auto       = 3
--   agente_dia_min_resgate_corrente  = 20
--
-- Esses valores sao apenas "ponto de partida" — o dono ajustara
-- individualmente pelo cadastro Tef.Net depois.
--
-- Necessario rodar ANTES da Migration 042 (ALTER NOT NULL).
--
-- Card: RES#2.

SET SESSION sql_mode = '';

UPDATE tbl_Representante
   SET agente_limite_resgates_auto      = 3,
       agente_dia_min_resgate_corrente = 20
 WHERE id IN (278, 417)
   AND agente_limite_resgates_auto IS NULL;
