refactor: إعادة تسمية التطبيقات الأربعة siro_* → intaleq_*
المجلدات وأسماء حزم 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>
This commit is contained in:
co-authored by
Claude Opus 5
parent
92dc6b3641
commit
0aab85c732
@@ -0,0 +1,164 @@
|
||||
// transit_models.dart — نماذج بيانات مواصلاتي (جهة الراكب)
|
||||
|
||||
class TransitOrg {
|
||||
final int id;
|
||||
final String type;
|
||||
final String nameAr;
|
||||
final String nameEn;
|
||||
final String? logoUrl;
|
||||
final String city;
|
||||
|
||||
TransitOrg({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.nameAr,
|
||||
required this.nameEn,
|
||||
required this.city,
|
||||
this.logoUrl,
|
||||
});
|
||||
|
||||
factory TransitOrg.fromJson(Map<String, dynamic> j) => TransitOrg(
|
||||
id: int.tryParse(j['id'].toString()) ?? 0,
|
||||
type: j['type']?.toString() ?? '',
|
||||
nameAr: j['name_ar']?.toString() ?? '',
|
||||
nameEn: j['name_en']?.toString() ?? '',
|
||||
city: j['city']?.toString() ?? '',
|
||||
logoUrl: j['logo_url']?.toString(),
|
||||
);
|
||||
}
|
||||
|
||||
class TransitEnrollment {
|
||||
final int id;
|
||||
final int orgId;
|
||||
final String orgName;
|
||||
final String status; // pending | active | suspended | expired
|
||||
final String verifyMethod;
|
||||
|
||||
TransitEnrollment({
|
||||
required this.id,
|
||||
required this.orgId,
|
||||
required this.orgName,
|
||||
required this.status,
|
||||
required this.verifyMethod,
|
||||
});
|
||||
|
||||
factory TransitEnrollment.fromActivateResponse(
|
||||
Map<String, dynamic> j, int orgId) =>
|
||||
TransitEnrollment(
|
||||
id: int.tryParse(j['enrollment_id'].toString()) ?? 0,
|
||||
orgId: orgId,
|
||||
orgName: j['org_name']?.toString() ?? '',
|
||||
status: j['status']?.toString() ?? 'pending',
|
||||
verifyMethod: j['verify_method']?.toString() ?? '',
|
||||
);
|
||||
}
|
||||
|
||||
class TransitStop {
|
||||
final int id;
|
||||
final int sequence;
|
||||
final String nameAr;
|
||||
final double lat;
|
||||
final double lng;
|
||||
final int etaOffsetMin;
|
||||
final bool isMajor;
|
||||
|
||||
TransitStop({
|
||||
required this.id,
|
||||
required this.sequence,
|
||||
required this.nameAr,
|
||||
required this.lat,
|
||||
required this.lng,
|
||||
required this.etaOffsetMin,
|
||||
required this.isMajor,
|
||||
});
|
||||
|
||||
factory TransitStop.fromJson(Map<String, dynamic> j) => TransitStop(
|
||||
id: int.tryParse(j['id'].toString()) ?? 0,
|
||||
sequence: int.tryParse(j['sequence'].toString()) ?? 0,
|
||||
nameAr: j['name_ar']?.toString() ?? '',
|
||||
lat: double.tryParse(j['latitude']?.toString() ?? '0') ?? 0,
|
||||
lng: double.tryParse(j['longitude']?.toString() ?? '0') ?? 0,
|
||||
etaOffsetMin: int.tryParse(j['eta_offset_min']?.toString() ?? '0') ?? 0,
|
||||
isMajor: (j['is_major']?.toString() ?? '0') == '1',
|
||||
);
|
||||
}
|
||||
|
||||
class TransitRouteSummary {
|
||||
final int id;
|
||||
final String nameAr;
|
||||
final String status;
|
||||
final int stopCount;
|
||||
|
||||
TransitRouteSummary({
|
||||
required this.id,
|
||||
required this.nameAr,
|
||||
required this.status,
|
||||
required this.stopCount,
|
||||
});
|
||||
|
||||
factory TransitRouteSummary.fromJson(Map<String, dynamic> j) =>
|
||||
TransitRouteSummary(
|
||||
id: int.tryParse(j['id'].toString()) ?? 0,
|
||||
nameAr: j['name_ar']?.toString() ?? '',
|
||||
status: j['status']?.toString() ?? '',
|
||||
stopCount: int.tryParse(j['stop_count']?.toString() ?? '0') ?? 0,
|
||||
);
|
||||
}
|
||||
|
||||
class TransitLiveTrip {
|
||||
final int id;
|
||||
final String status;
|
||||
final int delayMinutes;
|
||||
final int? currentStopSeq;
|
||||
final String routeName;
|
||||
final String? departureTime;
|
||||
final String? driverName;
|
||||
|
||||
TransitLiveTrip({
|
||||
required this.id,
|
||||
required this.status,
|
||||
required this.delayMinutes,
|
||||
required this.routeName,
|
||||
this.currentStopSeq,
|
||||
this.departureTime,
|
||||
this.driverName,
|
||||
});
|
||||
|
||||
factory TransitLiveTrip.fromJson(Map<String, dynamic> j) => TransitLiveTrip(
|
||||
id: int.tryParse(j['id'].toString()) ?? 0,
|
||||
status: j['status']?.toString() ?? '',
|
||||
delayMinutes: int.tryParse(j['delay_minutes']?.toString() ?? '0') ?? 0,
|
||||
currentStopSeq: j['current_stop_seq'] == null
|
||||
? null
|
||||
: int.tryParse(j['current_stop_seq'].toString()),
|
||||
routeName: j['route_name']?.toString() ?? '',
|
||||
departureTime: j['departure_time']?.toString(),
|
||||
driverName: j['driver_name']?.toString(),
|
||||
);
|
||||
}
|
||||
|
||||
class BusPosition {
|
||||
final double lat;
|
||||
final double lng;
|
||||
final double heading;
|
||||
final double speed;
|
||||
final int? currentStopSeq;
|
||||
|
||||
BusPosition({
|
||||
required this.lat,
|
||||
required this.lng,
|
||||
this.heading = 0,
|
||||
this.speed = 0,
|
||||
this.currentStopSeq,
|
||||
});
|
||||
|
||||
factory BusPosition.fromJson(Map<dynamic, dynamic> j) => BusPosition(
|
||||
lat: double.tryParse(j['lat']?.toString() ?? '0') ?? 0,
|
||||
lng: double.tryParse(j['lng']?.toString() ?? '0') ?? 0,
|
||||
heading: double.tryParse(j['heading']?.toString() ?? '0') ?? 0,
|
||||
speed: double.tryParse(j['speed']?.toString() ?? '0') ?? 0,
|
||||
currentStopSeq: j['current_stop_seq'] == null
|
||||
? null
|
||||
: int.tryParse(j['current_stop_seq'].toString()),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user