Agenda, Agendador, Configurações
This commit is contained in:
17
DBS/2026-03-11/supabase-snippets/Untitled query 975.sql
Normal file
17
DBS/2026-03-11/supabase-snippets/Untitled query 975.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- 1) Qual é meu uid?
|
||||
select auth.uid() as my_uid;
|
||||
|
||||
-- 2) Tenho membership ativa no tenant atual?
|
||||
select *
|
||||
from tenant_members
|
||||
where tenant_id = 'e8b10543-fb36-4e75-9d37-6fece9745637'
|
||||
and user_id = auth.uid()
|
||||
order by created_at desc;
|
||||
|
||||
-- 3) Se você usa status:
|
||||
select *
|
||||
from tenant_members
|
||||
where tenant_id = 'e8b10543-fb36-4e75-9d37-6fece9745637'
|
||||
and user_id = auth.uid()
|
||||
and status = 'active'
|
||||
order by created_at desc;
|
||||
Reference in New Issue
Block a user