-- 添加外键约束
ALTER TABLE public.after_sales_requests 
ADD CONSTRAINT after_sales_requests_order_id_fkey 
FOREIGN KEY (order_id) REFERENCES public.orders(id);

ALTER TABLE public.after_sales_requests 
ADD CONSTRAINT after_sales_requests_product_id_fkey 
FOREIGN KEY (product_id) REFERENCES public.products(id);

ALTER TABLE public.after_sales_requests 
ADD CONSTRAINT after_sales_requests_user_id_fkey 
FOREIGN KEY (user_id) REFERENCES auth.users(id);