mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-23 21:11:13 -05:00
Refactor: Complete Photo System Refactor
This commit is contained in:
45
src/types/photo-submissions.ts
Normal file
45
src/types/photo-submissions.ts
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user