feat: Implement moderation queue integration

This commit is contained in:
gpt-engineer-app[bot]
2025-09-30 18:34:33 +00:00
parent 3d8bd5e0f7
commit 5c9a4dc249
2 changed files with 57 additions and 0 deletions

View File

@@ -130,6 +130,8 @@ export type Database = {
approval_mode: string | null approval_mode: string | null
content: Json content: Json
created_at: string created_at: string
escalated: boolean | null
escalated_at: string | null
escalated_by: string | null escalated_by: string | null
escalation_reason: string | null escalation_reason: string | null
id: string id: string
@@ -146,6 +148,8 @@ export type Database = {
approval_mode?: string | null approval_mode?: string | null
content: Json content: Json
created_at?: string created_at?: string
escalated?: boolean | null
escalated_at?: string | null
escalated_by?: string | null escalated_by?: string | null
escalation_reason?: string | null escalation_reason?: string | null
id?: string id?: string
@@ -162,6 +166,8 @@ export type Database = {
approval_mode?: string | null approval_mode?: string | null
content?: Json content?: Json
created_at?: string created_at?: string
escalated?: boolean | null
escalated_at?: string | null
escalated_by?: string | null escalated_by?: string | null
escalation_reason?: string | null escalation_reason?: string | null
id?: string id?: string
@@ -184,6 +190,36 @@ export type Database = {
}, },
] ]
} }
email_aliases: {
Row: {
created_at: string
description: string | null
email: string
id: string
key: string
owner_id: string | null
updated_at: string
}
Insert: {
created_at?: string
description?: string | null
email: string
id?: string
key: string
owner_id?: string | null
updated_at?: string
}
Update: {
created_at?: string
description?: string | null
email?: string
id?: string
key?: string
owner_id?: string | null
updated_at?: string
}
Relationships: []
}
locations: { locations: {
Row: { Row: {
city: string | null city: string | null

View File

@@ -0,0 +1,21 @@
-- Add escalation tracking fields to content_submissions table
ALTER TABLE public.content_submissions
ADD COLUMN IF NOT EXISTS escalated BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS escalation_reason TEXT,
ADD COLUMN IF NOT EXISTS escalated_at TIMESTAMP WITH TIME ZONE,
ADD COLUMN IF NOT EXISTS escalated_by UUID REFERENCES auth.users(id);
-- Add index for escalated submissions
CREATE INDEX IF NOT EXISTS idx_content_submissions_escalated
ON public.content_submissions(escalated)
WHERE escalated = TRUE;
-- Add index for escalated_by
CREATE INDEX IF NOT EXISTS idx_content_submissions_escalated_by
ON public.content_submissions(escalated_by);
-- Add comments for documentation
COMMENT ON COLUMN public.content_submissions.escalated IS 'Whether this submission has been escalated to admin';
COMMENT ON COLUMN public.content_submissions.escalation_reason IS 'Reason for escalation';
COMMENT ON COLUMN public.content_submissions.escalated_at IS 'Timestamp when submission was escalated';
COMMENT ON COLUMN public.content_submissions.escalated_by IS 'User who escalated the submission';