UParkingShiftResponse.fromMap constructor

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

Implementation

factory UParkingShiftResponse.fromMap(Map<String, dynamic> json) => UParkingShiftResponse(
  id: json["id"],
  createdAt: DateTime.parse(json["createdAt"]),
  tags: List<int>.from(json["tags"].map((dynamic x) => x)),
  parkingId: json["parkingId"],
  startDate: DateTime.parse(json["startDate"]),
  cashTotal: (json["cashTotal"] as num).toDouble(),
  cardTotal: (json["cardTotal"] as num).toDouble(),
  ipgTotal: (json["ipgTotal"] as num).toDouble(),
  countedCash: (json["countedCash"] as num).toDouble(),
  entryCount: json["entryCount"] ?? 0,
  exitCount: json["exitCount"] ?? 0,
  endDate: json["endDate"] == null ? null : DateTime.parse(json["endDate"]),
  creatorId: json["creatorId"],
  creator: json["creator"] == null ? null : UUserResponse.fromMap(json["creator"]),
  total: (json["total"] as num?)?.toDouble() ?? 0,
  jsonData: json["jsonData"] == null ? null : UBaseJson.fromMap(json["jsonData"]),
  adminUserIds: json["adminUserIds"] == null ? <String>[] : List<String>.from(json["adminUserIds"]!.map((dynamic x) => x)),
);