import 'package:road24_mobile/utils/frequent_widgets.dart';

class Regions {
  int id;
  String name;

  Regions({required this.id, required this.name});

  factory Regions.fromJson(Map<String, dynamic> json) {
    return Regions(
        id: json["id"], name: json[FrequentWidgets.getTextConcat("name")]);
  }
}

class Districts {
  int id;
  String name;
  int regionId;

  Districts({required this.id, required this.name, required this.regionId});

  factory Districts.fromJson(Map<String, dynamic> json) {
    return Districts(
        id: json["id"],
        name: json[FrequentWidgets.getTextConcat("name")],
        regionId: json["region_id"]);
  }
}
