Initial commit - Rentall App
- Full-stack rental marketplace application - React frontend with TypeScript - Node.js/Express backend with JWT authentication - Features: item listings, rental requests, calendar availability, user profiles
This commit is contained in:
74
frontend/src/types/index.ts
Normal file
74
frontend/src/types/index.ts
Normal file
@@ -0,0 +1,74 @@
|
||||
export interface User {
|
||||
id: string;
|
||||
username: string;
|
||||
email: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
phone?: string;
|
||||
address?: string;
|
||||
profileImage?: string;
|
||||
isVerified: boolean;
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
tags: string[];
|
||||
isPortable: boolean;
|
||||
pickUpAvailable?: boolean;
|
||||
localDeliveryAvailable?: boolean;
|
||||
localDeliveryRadius?: number;
|
||||
shippingAvailable?: boolean;
|
||||
inPlaceUseAvailable?: boolean;
|
||||
pricePerHour?: number;
|
||||
pricePerDay?: number;
|
||||
pricePerWeek?: number;
|
||||
pricePerMonth?: number;
|
||||
replacementCost: number;
|
||||
location: string;
|
||||
latitude?: number;
|
||||
longitude?: number;
|
||||
images: string[];
|
||||
condition: 'excellent' | 'good' | 'fair' | 'poor';
|
||||
availability: boolean;
|
||||
specifications: Record<string, any>;
|
||||
rules?: string;
|
||||
minimumRentalDays: number;
|
||||
maximumRentalDays?: number;
|
||||
needsTraining?: boolean;
|
||||
unavailablePeriods?: Array<{
|
||||
id: string;
|
||||
startDate: Date;
|
||||
endDate: Date;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
}>;
|
||||
ownerId: string;
|
||||
owner?: User;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface Rental {
|
||||
id: string;
|
||||
itemId: string;
|
||||
renterId: string;
|
||||
ownerId: string;
|
||||
startDate: string;
|
||||
endDate: string;
|
||||
totalAmount: number;
|
||||
status: 'pending' | 'confirmed' | 'active' | 'completed' | 'cancelled';
|
||||
paymentStatus: 'pending' | 'paid' | 'refunded';
|
||||
deliveryMethod: 'pickup' | 'delivery';
|
||||
deliveryAddress?: string;
|
||||
notes?: string;
|
||||
rating?: number;
|
||||
review?: string;
|
||||
rejectionReason?: string;
|
||||
item?: Item;
|
||||
renter?: User;
|
||||
owner?: User;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
Reference in New Issue
Block a user