feat: 角色卡 demo

This commit is contained in:
liqupan
2026-01-28 20:28:38 +08:00
parent a4e7898e94
commit c09fbf4808
35 changed files with 2773 additions and 329 deletions

View File

@@ -0,0 +1,31 @@
-- =============================================
-- Wei AI App - Storage Bucket 创建
-- 注意Storage 的 bucket 需要通过 Supabase Dashboard 或 API 创建
-- 这个 SQL 仅用于记录需要创建的 bucket
-- =============================================
-- Storage Bucket 配置说明:
--
-- Bucket Name: avatars
-- Public: true (头像需要公开访问)
-- File Size Limit: 5MB
-- Allowed MIME Types: image/png, image/jpeg, image/webp, image/gif
--
-- 在 Supabase Studio 中手动创建,或使用以下 API:
--
-- POST /storage/v1/bucket
-- {
-- "id": "avatars",
-- "name": "avatars",
-- "public": true,
-- "file_size_limit": 5242880,
-- "allowed_mime_types": ["image/png", "image/jpeg", "image/webp", "image/gif"]
-- }
-- Storage RLS 策略(需要在 Supabase Dashboard 中配置)
-- 允许所有人读取头像
-- CREATE POLICY "Public Access" ON storage.objects FOR SELECT USING (bucket_id = 'avatars');
--
-- 仅允许管理员上传(后续可修改)
-- CREATE POLICY "Admin Upload" ON storage.objects FOR INSERT
-- WITH CHECK (bucket_id = 'avatars' AND auth.role() = 'service_role');