Firestore API Documentation¶
Overview¶
Firestore serves as the primary NoSQL database for GolfChart, storing all application data with real-time synchronization capabilities.
Collections¶
Rentals¶
/rentals/{rentalId}
├── cartId: string
├── playerId: string
├── startTime: timestamp
├── endTime: timestamp
├── holes: number (9 or 18)
├── duration: number (minutes)
├── status: string (active, completed, cancelled)
└── createdAt: timestamp
Carts¶
/carts/{cartId}
├── name: string
├── clubId: string
├── status: string (available, in-use, charging, maintenance)
├── currentRental: string (rentalId or null)
├── lastCharged: timestamp
└── maintenanceHistory: array
Players¶
/players/{playerId}
├── name: string
├── memberId: string
├── email: string
├── phone: string
├── totalRentals: number
├── totalSpent: number
└── joinedAt: timestamp
Real-Time Features¶
- Listeners - Real-time data synchronization
- Transactions - Atomic multi-document updates
- Security Rules - Field-level access control
See API Overview for complete API reference.