Refactor: Complete Photo System Refactor

This commit is contained in:
gpt-engineer-app[bot]
2025-10-01 23:19:35 +00:00
parent 5e4773e54c
commit 1beb8ad2be
7 changed files with 259 additions and 154 deletions

View File

@@ -0,0 +1,45 @@
// TypeScript interfaces for the new photo submission relational tables
export interface PhotoSubmission {
id: string;
submission_id: string;
entity_type: 'park' | 'ride' | 'manufacturer' | 'operator' | 'designer' | 'property_owner';
entity_id: string;
parent_id?: string;
title?: string;
created_at: string;
updated_at: string;
}
export interface PhotoSubmissionItem {
id: string;
photo_submission_id: string;
cloudflare_image_id: string;
cloudflare_image_url: string;
caption?: string;
title?: string;
filename?: string;
order_index: number;
file_size?: number;
mime_type?: string;
date_taken?: string;
created_at: string;
}
export interface ReviewPhoto {
id: string;
review_id: string;
cloudflare_image_id: string;
cloudflare_image_url: string;
caption?: string;
order_index: number;
created_at: string;
}
export interface PhotoSubmissionWithItems extends PhotoSubmission {
items: PhotoSubmissionItem[];
submission?: {
user_id: string;
status: string;
};
}