Refactor: Create typed submission tables

This commit is contained in:
gpt-engineer-app[bot]
2025-10-02 00:53:29 +00:00
parent 1beb8ad2be
commit 6c95cd9856
2 changed files with 931 additions and 0 deletions

View File

@@ -137,6 +137,74 @@ export type Database = {
}
Relationships: []
}
company_submissions: {
Row: {
banner_image_id: string | null
banner_image_url: string | null
card_image_id: string | null
card_image_url: string | null
company_type: string
created_at: string
description: string | null
founded_year: number | null
headquarters_location: string | null
id: string
logo_url: string | null
name: string
person_type: string | null
slug: string
submission_id: string
updated_at: string
website_url: string | null
}
Insert: {
banner_image_id?: string | null
banner_image_url?: string | null
card_image_id?: string | null
card_image_url?: string | null
company_type: string
created_at?: string
description?: string | null
founded_year?: number | null
headquarters_location?: string | null
id?: string
logo_url?: string | null
name: string
person_type?: string | null
slug: string
submission_id: string
updated_at?: string
website_url?: string | null
}
Update: {
banner_image_id?: string | null
banner_image_url?: string | null
card_image_id?: string | null
card_image_url?: string | null
company_type?: string
created_at?: string
description?: string | null
founded_year?: number | null
headquarters_location?: string | null
id?: string
logo_url?: string | null
name?: string
person_type?: string | null
slug?: string
submission_id?: string
updated_at?: string
website_url?: string | null
}
Relationships: [
{
foreignKeyName: "company_submissions_submission_id_fkey"
columns: ["submission_id"]
isOneToOne: true
referencedRelation: "content_submissions"
referencedColumns: ["id"]
},
]
}
content_submissions: {
Row: {
approval_mode: string | null
@@ -434,6 +502,93 @@ export type Database = {
},
]
}
park_submissions: {
Row: {
banner_image_id: string | null
banner_image_url: string | null
card_image_id: string | null
card_image_url: string | null
closing_date: string | null
created_at: string
description: string | null
email: string | null
id: string
location_id: string | null
name: string
opening_date: string | null
operator_id: string | null
park_type: string
phone: string | null
property_owner_id: string | null
slug: string
status: string
submission_id: string
updated_at: string
website_url: string | null
}
Insert: {
banner_image_id?: string | null
banner_image_url?: string | null
card_image_id?: string | null
card_image_url?: string | null
closing_date?: string | null
created_at?: string
description?: string | null
email?: string | null
id?: string
location_id?: string | null
name: string
opening_date?: string | null
operator_id?: string | null
park_type: string
phone?: string | null
property_owner_id?: string | null
slug: string
status?: string
submission_id: string
updated_at?: string
website_url?: string | null
}
Update: {
banner_image_id?: string | null
banner_image_url?: string | null
card_image_id?: string | null
card_image_url?: string | null
closing_date?: string | null
created_at?: string
description?: string | null
email?: string | null
id?: string
location_id?: string | null
name?: string
opening_date?: string | null
operator_id?: string | null
park_type?: string
phone?: string | null
property_owner_id?: string | null
slug?: string
status?: string
submission_id?: string
updated_at?: string
website_url?: string | null
}
Relationships: [
{
foreignKeyName: "park_submissions_location_id_fkey"
columns: ["location_id"]
isOneToOne: false
referencedRelation: "locations"
referencedColumns: ["id"]
},
{
foreignKeyName: "park_submissions_submission_id_fkey"
columns: ["submission_id"]
isOneToOne: true
referencedRelation: "content_submissions"
referencedColumns: ["id"]
},
]
}
parks: {
Row: {
average_rating: number | null
@@ -948,6 +1103,141 @@ export type Database = {
},
]
}
ride_coaster_stats: {
Row: {
category: string | null
created_at: string
id: string
ride_submission_id: string
stat_name: string
stat_value: number
unit: string | null
}
Insert: {
category?: string | null
created_at?: string
id?: string
ride_submission_id: string
stat_name: string
stat_value: number
unit?: string | null
}
Update: {
category?: string | null
created_at?: string
id?: string
ride_submission_id?: string
stat_name?: string
stat_value?: number
unit?: string | null
}
Relationships: [
{
foreignKeyName: "ride_coaster_stats_ride_submission_id_fkey"
columns: ["ride_submission_id"]
isOneToOne: false
referencedRelation: "ride_submissions"
referencedColumns: ["id"]
},
]
}
ride_former_names: {
Row: {
created_at: string
date_changed: string | null
former_name: string
id: string
order_index: number | null
reason: string | null
ride_submission_id: string
}
Insert: {
created_at?: string
date_changed?: string | null
former_name: string
id?: string
order_index?: number | null
reason?: string | null
ride_submission_id: string
}
Update: {
created_at?: string
date_changed?: string | null
former_name?: string
id?: string
order_index?: number | null
reason?: string | null
ride_submission_id?: string
}
Relationships: [
{
foreignKeyName: "ride_former_names_ride_submission_id_fkey"
columns: ["ride_submission_id"]
isOneToOne: false
referencedRelation: "ride_submissions"
referencedColumns: ["id"]
},
]
}
ride_model_submissions: {
Row: {
banner_image_id: string | null
banner_image_url: string | null
card_image_id: string | null
card_image_url: string | null
category: string
created_at: string
description: string | null
id: string
manufacturer_id: string | null
name: string
ride_type: string
slug: string
submission_id: string
updated_at: string
}
Insert: {
banner_image_id?: string | null
banner_image_url?: string | null
card_image_id?: string | null
card_image_url?: string | null
category: string
created_at?: string
description?: string | null
id?: string
manufacturer_id?: string | null
name: string
ride_type: string
slug: string
submission_id: string
updated_at?: string
}
Update: {
banner_image_id?: string | null
banner_image_url?: string | null
card_image_id?: string | null
card_image_url?: string | null
category?: string
created_at?: string
description?: string | null
id?: string
manufacturer_id?: string | null
name?: string
ride_type?: string
slug?: string
submission_id?: string
updated_at?: string
}
Relationships: [
{
foreignKeyName: "ride_model_submissions_submission_id_fkey"
columns: ["submission_id"]
isOneToOne: true
referencedRelation: "content_submissions"
referencedColumns: ["id"]
},
]
}
ride_models: {
Row: {
banner_image_id: string | null
@@ -1007,6 +1297,166 @@ export type Database = {
},
]
}
ride_submissions: {
Row: {
age_requirement: number | null
banner_image_id: string | null
banner_image_url: string | null
capacity_per_hour: number | null
card_image_id: string | null
card_image_url: string | null
category: string
closing_date: string | null
coaster_type: string | null
created_at: string
description: string | null
designer_id: string | null
drop_height_meters: number | null
duration_seconds: number | null
height_requirement: number | null
id: string
image_url: string | null
intensity_level: string | null
inversions: number | null
length_meters: number | null
manufacturer_id: string | null
max_g_force: number | null
max_height_meters: number | null
max_speed_kmh: number | null
name: string
opening_date: string | null
park_id: string | null
ride_model_id: string | null
ride_sub_type: string | null
seating_type: string | null
slug: string
status: string
submission_id: string
updated_at: string
}
Insert: {
age_requirement?: number | null
banner_image_id?: string | null
banner_image_url?: string | null
capacity_per_hour?: number | null
card_image_id?: string | null
card_image_url?: string | null
category: string
closing_date?: string | null
coaster_type?: string | null
created_at?: string
description?: string | null
designer_id?: string | null
drop_height_meters?: number | null
duration_seconds?: number | null
height_requirement?: number | null
id?: string
image_url?: string | null
intensity_level?: string | null
inversions?: number | null
length_meters?: number | null
manufacturer_id?: string | null
max_g_force?: number | null
max_height_meters?: number | null
max_speed_kmh?: number | null
name: string
opening_date?: string | null
park_id?: string | null
ride_model_id?: string | null
ride_sub_type?: string | null
seating_type?: string | null
slug: string
status?: string
submission_id: string
updated_at?: string
}
Update: {
age_requirement?: number | null
banner_image_id?: string | null
banner_image_url?: string | null
capacity_per_hour?: number | null
card_image_id?: string | null
card_image_url?: string | null
category?: string
closing_date?: string | null
coaster_type?: string | null
created_at?: string
description?: string | null
designer_id?: string | null
drop_height_meters?: number | null
duration_seconds?: number | null
height_requirement?: number | null
id?: string
image_url?: string | null
intensity_level?: string | null
inversions?: number | null
length_meters?: number | null
manufacturer_id?: string | null
max_g_force?: number | null
max_height_meters?: number | null
max_speed_kmh?: number | null
name?: string
opening_date?: string | null
park_id?: string | null
ride_model_id?: string | null
ride_sub_type?: string | null
seating_type?: string | null
slug?: string
status?: string
submission_id?: string
updated_at?: string
}
Relationships: [
{
foreignKeyName: "ride_submissions_submission_id_fkey"
columns: ["submission_id"]
isOneToOne: true
referencedRelation: "content_submissions"
referencedColumns: ["id"]
},
]
}
ride_technical_specs: {
Row: {
category: string | null
created_at: string
id: string
ride_submission_id: string
spec_name: string
spec_type: string
spec_value: string
unit: string | null
}
Insert: {
category?: string | null
created_at?: string
id?: string
ride_submission_id: string
spec_name: string
spec_type: string
spec_value: string
unit?: string | null
}
Update: {
category?: string | null
created_at?: string
id?: string
ride_submission_id?: string
spec_name?: string
spec_type?: string
spec_value?: string
unit?: string | null
}
Relationships: [
{
foreignKeyName: "ride_technical_specs_ride_submission_id_fkey"
columns: ["ride_submission_id"]
isOneToOne: false
referencedRelation: "ride_submissions"
referencedColumns: ["id"]
},
]
}
rides: {
Row: {
age_requirement: number | null
@@ -1159,6 +1609,36 @@ export type Database = {
},
]
}
submission_dependencies: {
Row: {
child_entity_type: string
child_submission_id: string
created_at: string
dependency_type: string
id: string
parent_entity_type: string
parent_submission_id: string
}
Insert: {
child_entity_type: string
child_submission_id: string
created_at?: string
dependency_type?: string
id?: string
parent_entity_type: string
parent_submission_id: string
}
Update: {
child_entity_type?: string
child_submission_id?: string
created_at?: string
dependency_type?: string
id?: string
parent_entity_type?: string
parent_submission_id?: string
}
Relationships: []
}
submission_items: {
Row: {
approved_entity_id: string | null