mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-24 15:31:13 -05:00
Add moderation queue tables
This commit is contained in:
@@ -355,6 +355,48 @@ export type Database = {
|
||||
},
|
||||
]
|
||||
}
|
||||
reports: {
|
||||
Row: {
|
||||
created_at: string
|
||||
id: string
|
||||
reason: string | null
|
||||
report_type: string
|
||||
reported_entity_id: string
|
||||
reported_entity_type: string
|
||||
reporter_id: string
|
||||
reviewed_at: string | null
|
||||
reviewed_by: string | null
|
||||
status: string
|
||||
updated_at: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
id?: string
|
||||
reason?: string | null
|
||||
report_type: string
|
||||
reported_entity_id: string
|
||||
reported_entity_type: string
|
||||
reporter_id: string
|
||||
reviewed_at?: string | null
|
||||
reviewed_by?: string | null
|
||||
status?: string
|
||||
updated_at?: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
id?: string
|
||||
reason?: string | null
|
||||
report_type?: string
|
||||
reported_entity_id?: string
|
||||
reported_entity_type?: string
|
||||
reporter_id?: string
|
||||
reviewed_at?: string | null
|
||||
reviewed_by?: string | null
|
||||
status?: string
|
||||
updated_at?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
reviews: {
|
||||
Row: {
|
||||
content: string | null
|
||||
@@ -367,6 +409,7 @@ export type Database = {
|
||||
park_id: string | null
|
||||
photos: Json | null
|
||||
rating: number
|
||||
report_count: number
|
||||
ride_id: string | null
|
||||
title: string | null
|
||||
total_votes: number | null
|
||||
@@ -386,6 +429,7 @@ export type Database = {
|
||||
park_id?: string | null
|
||||
photos?: Json | null
|
||||
rating: number
|
||||
report_count?: number
|
||||
ride_id?: string | null
|
||||
title?: string | null
|
||||
total_votes?: number | null
|
||||
@@ -405,6 +449,7 @@ export type Database = {
|
||||
park_id?: string | null
|
||||
photos?: Json | null
|
||||
rating?: number
|
||||
report_count?: number
|
||||
ride_id?: string | null
|
||||
title?: string | null
|
||||
total_votes?: number | null
|
||||
@@ -637,6 +682,33 @@ export type Database = {
|
||||
},
|
||||
]
|
||||
}
|
||||
user_roles: {
|
||||
Row: {
|
||||
created_at: string
|
||||
granted_at: string
|
||||
granted_by: string | null
|
||||
id: string
|
||||
role: Database["public"]["Enums"]["app_role"]
|
||||
user_id: string
|
||||
}
|
||||
Insert: {
|
||||
created_at?: string
|
||||
granted_at?: string
|
||||
granted_by?: string | null
|
||||
id?: string
|
||||
role: Database["public"]["Enums"]["app_role"]
|
||||
user_id: string
|
||||
}
|
||||
Update: {
|
||||
created_at?: string
|
||||
granted_at?: string
|
||||
granted_by?: string | null
|
||||
id?: string
|
||||
role?: Database["public"]["Enums"]["app_role"]
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
user_top_lists: {
|
||||
Row: {
|
||||
created_at: string
|
||||
@@ -678,6 +750,17 @@ export type Database = {
|
||||
[_ in never]: never
|
||||
}
|
||||
Functions: {
|
||||
has_role: {
|
||||
Args: {
|
||||
_role: Database["public"]["Enums"]["app_role"]
|
||||
_user_id: string
|
||||
}
|
||||
Returns: boolean
|
||||
}
|
||||
is_moderator: {
|
||||
Args: { _user_id: string }
|
||||
Returns: boolean
|
||||
}
|
||||
update_company_ratings: {
|
||||
Args: { target_company_id: string }
|
||||
Returns: undefined
|
||||
@@ -692,7 +775,7 @@ export type Database = {
|
||||
}
|
||||
}
|
||||
Enums: {
|
||||
[_ in never]: never
|
||||
app_role: "admin" | "moderator" | "user"
|
||||
}
|
||||
CompositeTypes: {
|
||||
[_ in never]: never
|
||||
@@ -819,6 +902,8 @@ export type CompositeTypes<
|
||||
|
||||
export const Constants = {
|
||||
public: {
|
||||
Enums: {},
|
||||
Enums: {
|
||||
app_role: ["admin", "moderator", "user"],
|
||||
},
|
||||
},
|
||||
} as const
|
||||
|
||||
Reference in New Issue
Block a user