- GeminiService (integrations/gemini, @Global): extractDocument (OCR fields) + faceMatch; graceful if no GEMINI_API_KEY - documents: face-match now real via Gemini; POST /admin/documents/:id/ocr extracts fields for CS auto-fill - roles: PATCH /admin/users/:id/role (admin) + POST /platform/users/role (bootstrap via x-platform-secret) - config: gemini + platform.secret; .env.example entries Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.3 KiB
Dart
Executable File
44 lines
1.3 KiB
Dart
Executable File
class MonthlyDataModel {
|
|
int day;
|
|
int totalDuration;
|
|
|
|
MonthlyDataModel({required this.day, required this.totalDuration});
|
|
|
|
factory MonthlyDataModel.fromJson(Map<String, dynamic> json) =>
|
|
MonthlyDataModel(
|
|
day: int.parse(json['day'].toString().split('-')[2]),
|
|
totalDuration:
|
|
int.parse(json['total_duration'].toString().split(':')[0]));
|
|
}
|
|
|
|
class MonthlyRideModel {
|
|
int day;
|
|
int countRide;
|
|
int totalCount;
|
|
|
|
MonthlyRideModel(
|
|
{required this.day, required this.countRide, required this.totalCount});
|
|
|
|
factory MonthlyRideModel.fromJson(Map<String, dynamic> json) =>
|
|
MonthlyRideModel(
|
|
day: int.parse(json['day'].toString().split('-')[2]),
|
|
countRide: int.parse(json['countRide'].toString()),
|
|
totalCount: int.parse(json['totalCount'].toString()),
|
|
);
|
|
}
|
|
|
|
class MonthlyPriceDriverModel {
|
|
int day;
|
|
// int price;
|
|
double pricePerDay;
|
|
|
|
MonthlyPriceDriverModel({required this.day, required this.pricePerDay});
|
|
|
|
factory MonthlyPriceDriverModel.fromJson(Map<String, dynamic> json) =>
|
|
MonthlyPriceDriverModel(
|
|
day: int.parse(json['day'].toString().split('-')[2]),
|
|
// price: int.parse(json['price'].toString()),
|
|
pricePerDay: double.parse(json['pricePerDay'].toString()),
|
|
);
|
|
}
|