UParkingSubscriptionResponse.fromMap constructor

UParkingSubscriptionResponse.fromMap(
  1. Map<String, dynamic> json
)

Implementation

factory UParkingSubscriptionResponse.fromMap(Map<String, dynamic> json) => UParkingSubscriptionResponse(
  id: json["id"],
  createdAt: DateTime.parse(json["createdAt"]),
  tags: List<int>.from(json["tags"].map((dynamic x) => x)),
  parkingId: json["parkingId"],
  vehicleId: json["vehicleId"],
  price: (json["price"] as num).toDouble(),
  startDate: DateTime.parse(json["startDate"]),
  expiryDate: DateTime.parse(json["expiryDate"]),
  dailyEntryLimit: json["dailyEntryLimit"] ?? 0,
  officeHoursOnly: json["officeHoursOnly"] ?? false,
  remainingDays: json["remainingDays"] ?? 0,
  vehicle: json["vehicle"] == null ? null : UVehicleResponse.fromMap(json["vehicle"]),
  customerName: json["customerName"],
  customerPhoneNumber: json["customerPhoneNumber"],
  creatorId: json["creatorId"],
  jsonData: json["jsonData"] == null ? null : UBaseJson.fromMap(json["jsonData"]),
  creator: json["creator"] == null ? null : UUserResponse.fromMap(json["creator"]),
  adminUserIds: json["adminUserIds"] == null ? <String>[] : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);