mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 15:31:13 -05:00
feat: Implement normalized submission items table
This commit is contained in:
@@ -127,9 +127,13 @@ export type Database = {
|
||||
}
|
||||
content_submissions: {
|
||||
Row: {
|
||||
approval_mode: string | null
|
||||
content: Json
|
||||
created_at: string
|
||||
escalated_by: string | null
|
||||
escalation_reason: string | null
|
||||
id: string
|
||||
original_submission_id: string | null
|
||||
reviewed_at: string | null
|
||||
reviewer_id: string | null
|
||||
reviewer_notes: string | null
|
||||
@@ -139,9 +143,13 @@ export type Database = {
|
||||
user_id: string
|
||||
}
|
||||
Insert: {
|
||||
approval_mode?: string | null
|
||||
content: Json
|
||||
created_at?: string
|
||||
escalated_by?: string | null
|
||||
escalation_reason?: string | null
|
||||
id?: string
|
||||
original_submission_id?: string | null
|
||||
reviewed_at?: string | null
|
||||
reviewer_id?: string | null
|
||||
reviewer_notes?: string | null
|
||||
@@ -151,9 +159,13 @@ export type Database = {
|
||||
user_id: string
|
||||
}
|
||||
Update: {
|
||||
approval_mode?: string | null
|
||||
content?: Json
|
||||
created_at?: string
|
||||
escalated_by?: string | null
|
||||
escalation_reason?: string | null
|
||||
id?: string
|
||||
original_submission_id?: string | null
|
||||
reviewed_at?: string | null
|
||||
reviewer_id?: string | null
|
||||
reviewer_notes?: string | null
|
||||
@@ -162,7 +174,15 @@ export type Database = {
|
||||
updated_at?: string
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: []
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "content_submissions_original_submission_id_fkey"
|
||||
columns: ["original_submission_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "content_submissions"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
locations: {
|
||||
Row: {
|
||||
@@ -768,6 +788,66 @@ export type Database = {
|
||||
},
|
||||
]
|
||||
}
|
||||
submission_items: {
|
||||
Row: {
|
||||
approved_entity_id: string | null
|
||||
created_at: string
|
||||
depends_on: string | null
|
||||
id: string
|
||||
item_data: Json
|
||||
item_type: string
|
||||
order_index: number | null
|
||||
original_data: Json | null
|
||||
rejection_reason: string | null
|
||||
status: string
|
||||
submission_id: string
|
||||
updated_at: string
|
||||
}
|
||||
Insert: {
|
||||
approved_entity_id?: string | null
|
||||
created_at?: string
|
||||
depends_on?: string | null
|
||||
id?: string
|
||||
item_data: Json
|
||||
item_type: string
|
||||
order_index?: number | null
|
||||
original_data?: Json | null
|
||||
rejection_reason?: string | null
|
||||
status?: string
|
||||
submission_id: string
|
||||
updated_at?: string
|
||||
}
|
||||
Update: {
|
||||
approved_entity_id?: string | null
|
||||
created_at?: string
|
||||
depends_on?: string | null
|
||||
id?: string
|
||||
item_data?: Json
|
||||
item_type?: string
|
||||
order_index?: number | null
|
||||
original_data?: Json | null
|
||||
rejection_reason?: string | null
|
||||
status?: string
|
||||
submission_id?: string
|
||||
updated_at?: string
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "submission_items_depends_on_fkey"
|
||||
columns: ["depends_on"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "submission_items"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "submission_items_submission_id_fkey"
|
||||
columns: ["submission_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "content_submissions"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
user_blocks: {
|
||||
Row: {
|
||||
blocked_id: string
|
||||
@@ -970,6 +1050,10 @@ export type Database = {
|
||||
[_ in never]: never
|
||||
}
|
||||
Functions: {
|
||||
can_approve_submission_item: {
|
||||
Args: { item_id: string }
|
||||
Returns: boolean
|
||||
}
|
||||
can_manage_user: {
|
||||
Args: { _manager_id: string; _target_user_id: string }
|
||||
Returns: boolean
|
||||
@@ -990,10 +1074,22 @@ export type Database = {
|
||||
Args: { _profile_user_id: string; _viewer_id?: string }
|
||||
Returns: Json
|
||||
}
|
||||
get_submission_item_dependencies: {
|
||||
Args: { item_id: string }
|
||||
Returns: {
|
||||
dependency_level: number
|
||||
dependent_item_id: string
|
||||
dependent_item_type: string
|
||||
}[]
|
||||
}
|
||||
get_user_management_permissions: {
|
||||
Args: { _user_id: string }
|
||||
Returns: Json
|
||||
}
|
||||
has_pending_dependents: {
|
||||
Args: { item_id: string }
|
||||
Returns: boolean
|
||||
}
|
||||
has_role: {
|
||||
Args: {
|
||||
_role: Database["public"]["Enums"]["app_role"]
|
||||
|
||||
Reference in New Issue
Block a user