Fix null/undefined type mismatches

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 01:35:07 +00:00
parent 2ce837f376
commit c4b1339f0d
4 changed files with 39 additions and 35 deletions

View File

@@ -2,31 +2,31 @@ export interface Location {
id: string;
name: string;
country: string;
state_province?: string;
city?: string;
postal_code?: string;
latitude?: number;
longitude?: number;
timezone?: string;
state_province?: string | null;
city?: string | null;
postal_code?: string | null;
latitude?: number | null;
longitude?: number | null;
timezone?: string | null;
}
export interface Company {
id: string;
name: string;
slug: string;
description?: string;
description?: string | null;
company_type: string; // Allow any string from database
person_type?: string; // Database returns string, validated at form level
website_url?: string;
founded_year?: number; // Legacy field
founded_date?: string;
founded_date_precision?: string;
headquarters_location?: string;
logo_url?: string;
banner_image_url?: string;
banner_image_id?: string;
card_image_url?: string;
card_image_id?: string;
person_type?: string | null; // Database returns string, validated at form level
website_url?: string | null;
founded_year?: number | null; // Legacy field
founded_date?: string | null;
founded_date_precision?: string | null;
headquarters_location?: string | null;
logo_url?: string | null;
banner_image_url?: string | null;
banner_image_id?: string | null;
card_image_url?: string | null;
card_image_id?: string | null;
average_rating: number;
review_count: number;
}
@@ -42,16 +42,16 @@ export interface Park {
opening_date_precision?: string | null;
closing_date?: string | null;
closing_date_precision?: string | null;
website_url?: string;
phone?: string;
email?: string;
location?: Location;
operator?: Company;
property_owner?: Company;
banner_image_url?: string;
banner_image_id?: string;
card_image_url?: string;
card_image_id?: string;
website_url?: string | null;
phone?: string | null;
email?: string | null;
location?: Location | null;
operator?: Company | null;
property_owner?: Company | null;
banner_image_url?: string | null;
banner_image_id?: string | null;
card_image_url?: string | null;
card_image_id?: string | null;
average_rating: number;
review_count: number;
ride_count: number;