import 'package:mohem_flutter_app/models/itg_forms_models/request_detail_model.dart';

class RequestType {
  int? itemCount;
  List<RequestDetails>? requestDetails;
  String? requestTypeCode;
  String? requestTypeName;

  RequestType({this.itemCount, this.requestDetails, this.requestTypeCode, this.requestTypeName});

  RequestType.fromJson(Map<String, dynamic> json) {
    itemCount = json['ItemCount'];
    if (json['RequestDetails'] != null) {
      requestDetails = <RequestDetails>[];
      json['RequestDetails'].forEach((v) {
        requestDetails!.add(new RequestDetails.fromJson(v));
      });
    }
    requestTypeCode = json['RequestTypeCode'];
    requestTypeName = json['RequestTypeName'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> data = new Map<String, dynamic>();
    data['ItemCount'] = this.itemCount;
    if (this.requestDetails != null) {
      data['RequestDetails'] = this.requestDetails!.map((v) => v.toJson()).toList();
    }
    data['RequestTypeCode'] = this.requestTypeCode;
    data['RequestTypeName'] = this.requestTypeName;
    return data;
  }
}
