المجلدات وأسماء حزم dart واستيراداتها: siro_rider → intaleq_rider siro_driver → intaleq_driver siro_admin → intaleq_admin siro_service → intaleq_service شمل ذلك `name:` في كل pubspec وكل `package:siro_*` في الاستيرادات (115 ملفاً في rider وحده)، وإشارات أسماء المجلدات في docs/ وتعليق في backend/Admin/notifications/broadcast.php. لم تبقَ إشارة واحدة (تحقّقت). + ضُمّت حزم get و get_storage داخل intaleq_driver/packages/ وحُوّلت مساراتها الثلاثة من `../../Intaleq/packages/*` إلى `./packages/*`. كانت تُحل عرضاً إلى مجلد App/Intaleq القديم المجاور — تبعية خارج المستودع تنكسر بأول نقل. لم يبقَ في أي تطبيق تبعية مسار خارج الشجرة. ⚠️ لم تُمسّ بعد: هويات المتاجر (applicationId · PRODUCT_BUNDLE_IDENTIFIER · shorebird app_id) ولا الألوان ولا النصوص المرئية ولا النطاقات — كل منها كوميت منفصل، والهويات تحتاج قرار المالك. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
71 lines
2.3 KiB
Dart
71 lines
2.3 KiB
Dart
// transit_admin_models.dart — نماذج بيانات مواصلاتي (لوحة إدارة سيرو)
|
|
|
|
class TransitOrgSummary {
|
|
final int id;
|
|
final String type;
|
|
final String country;
|
|
final String city;
|
|
final String nameAr;
|
|
final String nameEn;
|
|
final String? logoUrl;
|
|
final String contractStatus;
|
|
final String? trialEndsAt;
|
|
final int driversCount;
|
|
final int vehiclesCount;
|
|
final int activeRoutes;
|
|
final int activeEnrollments;
|
|
|
|
TransitOrgSummary({
|
|
required this.id,
|
|
required this.type,
|
|
required this.country,
|
|
required this.city,
|
|
required this.nameAr,
|
|
required this.nameEn,
|
|
required this.contractStatus,
|
|
this.logoUrl,
|
|
this.trialEndsAt,
|
|
this.driversCount = 0,
|
|
this.vehiclesCount = 0,
|
|
this.activeRoutes = 0,
|
|
this.activeEnrollments = 0,
|
|
});
|
|
|
|
factory TransitOrgSummary.fromJson(Map<String, dynamic> j) => TransitOrgSummary(
|
|
id: int.tryParse(j['id'].toString()) ?? 0,
|
|
type: j['type']?.toString() ?? '',
|
|
country: j['country']?.toString() ?? '',
|
|
city: j['city']?.toString() ?? '',
|
|
nameAr: j['name_ar']?.toString() ?? '',
|
|
nameEn: j['name_en']?.toString() ?? '',
|
|
logoUrl: j['logo_url']?.toString(),
|
|
contractStatus: j['contract_status']?.toString() ?? '',
|
|
trialEndsAt: j['trial_ends_at']?.toString(),
|
|
driversCount: int.tryParse(j['drivers_count']?.toString() ?? '0') ?? 0,
|
|
vehiclesCount: int.tryParse(j['vehicles_count']?.toString() ?? '0') ?? 0,
|
|
activeRoutes: int.tryParse(j['active_routes']?.toString() ?? '0') ?? 0,
|
|
activeEnrollments: int.tryParse(j['active_enrollments']?.toString() ?? '0') ?? 0,
|
|
);
|
|
}
|
|
|
|
class TransitOrgDetails {
|
|
final Map<String, dynamic> org;
|
|
final Map<String, dynamic> counts;
|
|
final Map<String, dynamic> trips;
|
|
final List<dynamic> routes;
|
|
|
|
TransitOrgDetails({
|
|
required this.org,
|
|
required this.counts,
|
|
required this.trips,
|
|
required this.routes,
|
|
});
|
|
|
|
factory TransitOrgDetails.fromJson(Map<String, dynamic> j) => TransitOrgDetails(
|
|
org: Map<String, dynamic>.from(j['org'] ?? {}),
|
|
counts: Map<String, dynamic>.from(j['counts'] ?? {}),
|
|
trips: Map<String, dynamic>.from(j['trips'] ?? {}),
|
|
routes: (j['routes'] is List) ? List<dynamic>.from(j['routes']) : [],
|
|
);
|
|
}
|