init commit
This commit is contained in:
79
apps/web/types/bookings.ts
Normal file
79
apps/web/types/bookings.ts
Normal file
@@ -0,0 +1,79 @@
|
||||
// types/booking.ts
|
||||
|
||||
export interface BookingType {
|
||||
id: string;
|
||||
name: string;
|
||||
display_name: string;
|
||||
requires_payment: boolean;
|
||||
default_duration: number; // in minutes
|
||||
description?: string;
|
||||
resources: string; // relation to resources collection
|
||||
created: string;
|
||||
updated: string;
|
||||
}
|
||||
|
||||
export interface Resource {
|
||||
id: string;
|
||||
type: 'wheel' | 'workstation';
|
||||
capacity: number;
|
||||
is_active: boolean;
|
||||
created: string;
|
||||
updated: string;
|
||||
}
|
||||
|
||||
export interface TimeSlot {
|
||||
id: string;
|
||||
booking_types: string[]; // relation to booking types
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
is_reccuring: boolean;
|
||||
max_capacity: number;
|
||||
is_active: boolean;
|
||||
recurrence_pattern?: {
|
||||
type: string;
|
||||
days: number[];
|
||||
end_date: string;
|
||||
};
|
||||
created: string;
|
||||
updated: string;
|
||||
}
|
||||
|
||||
export interface Booking {
|
||||
id: string;
|
||||
booking_type: string; // relation to booking type
|
||||
customer_name: string;
|
||||
customer_email: string;
|
||||
internal_notes?: string;
|
||||
start_time: string;
|
||||
end_time: string;
|
||||
participants_count: number;
|
||||
status: 'confirmed' | 'cancelled' | 'completed';
|
||||
payment_status: 'not_required' | 'paid' | 'refunded' | 'partially_refunded' | 'pending';
|
||||
payment_required: boolean;
|
||||
cancellation_token: string;
|
||||
created: string;
|
||||
updated: string;
|
||||
}
|
||||
|
||||
export interface BookingFormData {
|
||||
bookingTypeId: string;
|
||||
customerName: string;
|
||||
customerEmail: string;
|
||||
participantsCount: number;
|
||||
startTime: Date;
|
||||
endTime: Date;
|
||||
}
|
||||
|
||||
// For the booking flow state
|
||||
export interface BookingFlowState {
|
||||
step: 'booking-type' | 'date-time' | 'customer-details' | 'confirmation';
|
||||
selectedBookingType?: BookingType;
|
||||
selectedDate?: Date;
|
||||
selectedTimeSlot?: string; // time slot ID or time string
|
||||
customerDetails?: {
|
||||
name: string;
|
||||
email: string;
|
||||
participantsCount: number;
|
||||
notes?: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user