mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 10:51:12 -05:00
feat: Implement moderation queue integration
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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';
|
||||||
Reference in New Issue
Block a user