class AddOrderViewResponse {
  List<Employees>? employees;
  List<States>? states;
  List<SaleProducts>? saleProducts;
  List<String>? unloadingScope;
  List<String>? freightScope;
  List<String>? erectionScope;
  String? error;
  String? message;

  AddOrderViewResponse(
      {this.employees,
        this.states,
        this.saleProducts,
        this.unloadingScope,
        this.freightScope,
        this.erectionScope,
        this.error,
        this.message});

  AddOrderViewResponse.fromJson(Map<String, dynamic> json) {
    if (json['employees'] != null) {
      employees = <Employees>[];
      json['employees'].forEach((v) {
        employees!.add(new Employees.fromJson(v));
      });
    }
    if (json['states'] != null) {
      states = <States>[];
      json['states'].forEach((v) {
        states!.add(new States.fromJson(v));
      });
    }
    if (json['sale_products'] != null) {
      saleProducts = <SaleProducts>[];
      json['sale_products'].forEach((v) {
        saleProducts!.add(new SaleProducts.fromJson(v));
      });
    }
    unloadingScope = json['unloading_scope'].cast<String>();
    freightScope = json['freight_scope'].cast<String>();
    erectionScope = json['erection_scope'].cast<String>();
    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.employees != null) {
      data['employees'] = this.employees!.map((v) => v.toJson()).toList();
    }
    if (this.states != null) {
      data['states'] = this.states!.map((v) => v.toJson()).toList();
    }
    if (this.saleProducts != null) {
      data['sale_products'] =
          this.saleProducts!.map((v) => v.toJson()).toList();
    }
    data['unloading_scope'] = this.unloadingScope;
    data['freight_scope'] = this.freightScope;
    data['erection_scope'] = this.erectionScope;
    data['error'] = this.error;
    data['message'] = this.message;
    return data;
  }
}

class Employees {
  String? id;
  String? name;

  Employees({this.id, this.name});

  Employees.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}

class SaleProducts {
  String? id;
  String? productCode;
  String? project;
  String? subGroup;
  String? vendor1;
  String? vendor2;
  String? vendorCode;
  String? prodName;
  String? brand;
  String? imageDirFilePath;
  String? imageViewFileName;
  String? prodDesc;
  String? hsnCode;
  String? units;
  String? unitsId;
  String? worksMsl;
  String? refType;
  String? refId;
  String? price;
  String? type;
  String? productionProcessId;
  String? createdBy;
  String? datetime;
  String? isExists;
  String? updatedDatetime;

  SaleProducts(
      {this.id,
        this.productCode,
        this.project,
        this.subGroup,
        this.vendor1,
        this.vendor2,
        this.vendorCode,
        this.prodName,
        this.brand,
        this.imageDirFilePath,
        this.imageViewFileName,
        this.prodDesc,
        this.hsnCode,
        this.units,
        this.unitsId,
        this.worksMsl,
        this.refType,
        this.refId,
        this.price,
        this.type,
        this.productionProcessId,
        this.createdBy,
        this.datetime,
        this.isExists,
        this.updatedDatetime});

  SaleProducts.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    productCode = json['product_code'];
    project = json['project'];
    subGroup = json['sub_group'];
    vendor1 = json['vendor_1'];
    vendor2 = json['vendor_2'];
    vendorCode = json['vendor_code'];
    prodName = json['prod_name'];
    brand = json['brand'];
    imageDirFilePath = json['image_dir_file_path'];
    imageViewFileName = json['image_view_file_name'];
    prodDesc = json['prod_desc'];
    hsnCode = json['hsn_code'];
    units = json['units'];
    unitsId = json['units_id'];
    worksMsl = json['works_msl'];
    refType = json['ref_type'];
    refId = json['ref_id'];
    price = json['price'];
    type = json['type'];
    productionProcessId = json['production_process_id'];
    createdBy = json['created_by'];
    datetime = json['datetime'];
    isExists = json['is_exists'];
    updatedDatetime = json['updated_datetime'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['product_code'] = this.productCode;
    data['project'] = this.project;
    data['sub_group'] = this.subGroup;
    data['vendor_1'] = this.vendor1;
    data['vendor_2'] = this.vendor2;
    data['vendor_code'] = this.vendorCode;
    data['prod_name'] = this.prodName;
    data['brand'] = this.brand;
    data['image_dir_file_path'] = this.imageDirFilePath;
    data['image_view_file_name'] = this.imageViewFileName;
    data['prod_desc'] = this.prodDesc;
    data['hsn_code'] = this.hsnCode;
    data['units'] = this.units;
    data['units_id'] = this.unitsId;
    data['works_msl'] = this.worksMsl;
    data['ref_type'] = this.refType;
    data['ref_id'] = this.refId;
    data['price'] = this.price;
    data['type'] = this.type;
    data['production_process_id'] = this.productionProcessId;
    data['created_by'] = this.createdBy;
    data['datetime'] = this.datetime;
    data['is_exists'] = this.isExists;
    data['updated_datetime'] = this.updatedDatetime;
    return data;
  }
}

class States {
  String? id;
  String? name;

  States({this.id, this.name});

  States.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}