first commit
This commit is contained in:
21
lib/models/model/admin/monthly_ride.dart
Normal file
21
lib/models/model/admin/monthly_ride.dart
Normal file
@@ -0,0 +1,21 @@
|
||||
class MonthlyDataModel {
|
||||
final int year;
|
||||
final int month;
|
||||
final int day;
|
||||
final int ridesCount;
|
||||
|
||||
MonthlyDataModel({
|
||||
required this.year,
|
||||
required this.month,
|
||||
required this.day,
|
||||
required this.ridesCount,
|
||||
});
|
||||
|
||||
factory MonthlyDataModel.fromJson(Map<String, dynamic> json) =>
|
||||
MonthlyDataModel(
|
||||
year: json['year'] as int,
|
||||
month: json['month'] as int,
|
||||
day: json['day'] as int,
|
||||
ridesCount: json['rides_count'] as int,
|
||||
);
|
||||
}
|
||||
79
lib/models/model/admin/passenger_model.dart
Normal file
79
lib/models/model/admin/passenger_model.dart
Normal file
@@ -0,0 +1,79 @@
|
||||
class Passenger {
|
||||
String id;
|
||||
String phone;
|
||||
String email;
|
||||
String gender;
|
||||
String status;
|
||||
String birthdate;
|
||||
String site;
|
||||
String firstName;
|
||||
String lastName;
|
||||
String sosPhone;
|
||||
String education;
|
||||
String employmentType;
|
||||
String maritalStatus;
|
||||
String createdAt;
|
||||
String updatedAt;
|
||||
int countPassenger;
|
||||
int countFeedback;
|
||||
double ratingPassenger;
|
||||
int countDriverRate;
|
||||
int countPassengerCancel;
|
||||
double passengerAverageRating;
|
||||
int countPassengerRate;
|
||||
int countPassengerRide;
|
||||
|
||||
Passenger({
|
||||
required this.id,
|
||||
required this.phone,
|
||||
required this.email,
|
||||
required this.gender,
|
||||
required this.status,
|
||||
required this.birthdate,
|
||||
required this.site,
|
||||
required this.firstName,
|
||||
required this.lastName,
|
||||
required this.sosPhone,
|
||||
required this.education,
|
||||
required this.employmentType,
|
||||
required this.maritalStatus,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
required this.countPassenger,
|
||||
required this.countFeedback,
|
||||
required this.ratingPassenger,
|
||||
required this.countDriverRate,
|
||||
required this.countPassengerCancel,
|
||||
required this.passengerAverageRating,
|
||||
required this.countPassengerRate,
|
||||
required this.countPassengerRide,
|
||||
});
|
||||
|
||||
factory Passenger.fromJson(Map<String, dynamic> json) {
|
||||
return Passenger(
|
||||
id: json['id'],
|
||||
phone: json['phone'],
|
||||
email: json['email'],
|
||||
gender: json['gender'],
|
||||
status: json['status'],
|
||||
birthdate: json['birthdate'],
|
||||
site: json['site'],
|
||||
firstName: json['first_name'],
|
||||
lastName: json['last_name'],
|
||||
sosPhone: json['sosPhone'],
|
||||
education: json['education'],
|
||||
employmentType: json['employmentType'],
|
||||
maritalStatus: json['maritalStatus'],
|
||||
createdAt: json['created_at'],
|
||||
updatedAt: json['updated_at'],
|
||||
countPassenger: json['countPassenger'],
|
||||
countFeedback: json['countFeedback'],
|
||||
ratingPassenger: json['ratingPassenger'].toDouble(),
|
||||
countDriverRate: json['countDriverRate'],
|
||||
countPassengerCancel: json['countPassengerCancel'],
|
||||
passengerAverageRating: json['passengerAverageRating'].toDouble(),
|
||||
countPassengerRate: json['countPassengerRate'],
|
||||
countPassengerRide: json['countPassengerRide'],
|
||||
);
|
||||
}
|
||||
}
|
||||
12
lib/models/model/admin/rides_summary_model.dart
Normal file
12
lib/models/model/admin/rides_summary_model.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
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]));
|
||||
}
|
||||
34
lib/models/model/locations.dart
Normal file
34
lib/models/model/locations.dart
Normal file
@@ -0,0 +1,34 @@
|
||||
class CarLocationModel {
|
||||
String id;
|
||||
String driverId;
|
||||
double latitude;
|
||||
double heading;
|
||||
double speed;
|
||||
double longitude;
|
||||
DateTime createdAt;
|
||||
DateTime updatedAt;
|
||||
|
||||
CarLocationModel({
|
||||
required this.id,
|
||||
required this.driverId,
|
||||
required this.latitude,
|
||||
required this.longitude,
|
||||
required this.heading,
|
||||
required this.speed,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
factory CarLocationModel.fromJson(Map<String, dynamic> json) {
|
||||
return CarLocationModel(
|
||||
id: json['id'],
|
||||
driverId: json['driver_id'],
|
||||
latitude: double.parse(json['latitude'].toString()),
|
||||
longitude: double.parse(json['longitude'].toString()),
|
||||
heading: double.parse(json['heading'].toString()),
|
||||
speed: double.parse(json['speed'].toString()),
|
||||
createdAt: DateTime.parse(json['created_at']),
|
||||
updatedAt: DateTime.parse(json['updated_at']),
|
||||
);
|
||||
}
|
||||
}
|
||||
30
lib/models/model/onboarding_model.dart
Normal file
30
lib/models/model/onboarding_model.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
List<OnBoardingModel> onBoardingList = [
|
||||
OnBoardingModel(
|
||||
title: 'Welcome to Sefer!'.tr,
|
||||
image: 'assets/images/on1.png',
|
||||
body:
|
||||
'Sefer is the ride-hailing app that is safe, reliable, and accessible.'
|
||||
.tr,
|
||||
),
|
||||
OnBoardingModel(
|
||||
title: 'Get to your destination quickly and easily.'.tr,
|
||||
image: 'assets/images/on2.png',
|
||||
body: 'With Sefer, you can get a ride to your destination in minutes.'.tr,
|
||||
),
|
||||
OnBoardingModel(
|
||||
title: 'Enjoy a safe and comfortable ride.'.tr,
|
||||
image: 'assets/images/on3.png',
|
||||
body:
|
||||
'Sefer is committed to safety, and all of our captains are carefully screened and background checked.'
|
||||
.tr,
|
||||
),
|
||||
];
|
||||
|
||||
class OnBoardingModel {
|
||||
final String? title;
|
||||
final String? image;
|
||||
final String? body;
|
||||
OnBoardingModel({this.body, this.title, this.image});
|
||||
}
|
||||
Reference in New Issue
Block a user