-- Para o tenant A:
select id as responsible_member_id
from public.tenant_members
where tenant_id = '816b24fe-a0c3-4409-b79b-c6c0a6935d03'
  and user_id = '824f125c-55bb-40f5-a8c4-7a33618b91c7'
  and status = 'active'
limit 1;

-- Para o tenant B:
select id as responsible_member_id
from public.tenant_members
where tenant_id = 'e8b10543-fb36-4e75-9d37-6fece9745637'
  and user_id = '824f125c-55bb-40f5-a8c4-7a33618b91c7'
  and status = 'active'
limit 1;