update the app

This commit is contained in:
root
2026-05-25 15:56:00 -04:00
parent 277db06d26
commit 7ca43ba2f3
19 changed files with 1854 additions and 210 deletions
@@ -0,0 +1,21 @@
import '../../../core/models/marketplace.dart';
class BookingResult {
final String reservationId;
final MarketplaceVehicle vehicle;
final DateTime startDate;
final DateTime endDate;
const BookingResult({
required this.reservationId,
required this.vehicle,
required this.startDate,
required this.endDate,
});
int get days => endDate.difference(startDate).inDays.clamp(1, 9999);
double get total => vehicle.dailyRateCents * days / 100;
String get shortRef => reservationId.length >= 8
? reservationId.substring(0, 8).toUpperCase()
: reservationId.toUpperCase();
}