UHotelRoomCreateParams.fromMap constructor

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

Implementation

factory UHotelRoomCreateParams.fromMap(Map<String, dynamic> json) => UHotelRoomCreateParams(
  tags: json["tags"] == null ? <int>[] : List<int>.from((json["tags"] as List<dynamic>).map((dynamic e) => (e as num).toInt())),
  id: json["id"],
  creatorId: json["creatorId"],
  detail1: json["detail1"],
  detail2: json["detail2"],
  adminUserIds: json["adminUserIds"] == null ? null : List<String>.from((json["adminUserIds"] as List<dynamic>).map((dynamic e) => e.toString())),
  title: json["title"],
  capacity: (json["capacity"] as num).toInt(),
  pricePerNight: (json["pricePerNight"] as num).toDouble(),
  hotelId: json["hotelId"],
  roomNumber: json["roomNumber"],
  quantity: json["quantity"] ?? 1,
  isAvailable: json["isAvailable"] ?? true,
  description: json["description"],
  bedType: json["bedType"],
  sizeSquareMeters: json["sizeSquareMeters"] == null ? null : (json["sizeSquareMeters"] as num).toDouble(),
  floor: json["floor"] == null ? null : (json["floor"] as num).toInt(),
  extraGuestCapacity: json["extraGuestCapacity"] == null ? null : (json["extraGuestCapacity"] as num).toInt(),
  extraGuestPrice: json["extraGuestPrice"] == null ? null : (json["extraGuestPrice"] as num).toDouble(),
);