class NursingStation {
  final List<NursingStationEntity>? entityList;
  final int? rowcount;
  final String? statusMessage;
  final bool? success;

  NursingStation({
    this.entityList,
    this.rowcount,
    this.statusMessage,
    this.success,
  });

  factory NursingStation.fromJson(Map<String, dynamic> json) {
    return NursingStation(
      entityList: (json['entityList'] as List<dynamic>?)
          ?.map((e) => NursingStationEntity.fromJson(e as Map<String, dynamic>))
          .toList(),
      rowcount: json['rowcount'] as int?,
      statusMessage: json['statusMessage'] as String?,
      success: json['success'] as bool?,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'entityList': entityList?.map((e) => e.toJson()).toList(),
      'rowcount': rowcount,
      'statusMessage': statusMessage,
      'success': success,
    };
  }
}

class NursingStationEntity {
  final int? categoryID;
  final String? description;
  final String? descriptionN;
  final int? floorID;
  final bool? isActive;
  final int? nursingStationID;

  NursingStationEntity({
    this.categoryID,
    this.description,
    this.descriptionN,
    this.floorID,
    this.isActive,
    this.nursingStationID,
  });

  factory NursingStationEntity.fromJson(Map<String, dynamic> json) {
    return NursingStationEntity(
      categoryID: json['categoryID'] as int?,
      description: json['description'] ??'${json['nursingStationID']}',
      descriptionN: json['descriptionN'] as String?,
      floorID: json['floorID'] as int?,
      isActive: json['isActive'] as bool?,
      nursingStationID: json['nursingStationID'] as int?,
    );
  }

  Map<String, dynamic> toJson() {
    return {
      'categoryID': categoryID,
      'description': description,
      'descriptionN': descriptionN,
      'floorID': floorID,
      'isActive': isActive,
      'nursingStationID': nursingStationID,
    };
  }
}
