// To parse this JSON data, do
//
//     final additionalItems = additionalItemsFromJson(jsonString);

import 'dart:convert';

AdditionalItems additionalItemsFromJson(String str) =>
    AdditionalItems.fromJson(json.decode(str));

String additionalItemsToJson(AdditionalItems data) =>
    json.encode(data.toJson());

class AdditionalItems {
  final int id;
  final int bldgapprDetailsId;
  final int classId;
  final String className;
  final String structType;
  final dynamic unitValue;
  final dynamic baseUnitValue;
  final dynamic area;
  final dynamic marketValue;
  final dynamic depreciationRate;
  final dynamic adjustedMarketVal;
  final dynamic amtDepreciation;
  final String painted;
  final String secondhand;
  final dynamic paintedUnitval;
  final dynamic secondhandUnitval;
  final String actualUse;
  final String genCode;

  AdditionalItems(
      {required this.id,
      required this.bldgapprDetailsId,
      required this.classId,
      required this.className,
      required this.structType,
      required this.unitValue,
      required this.baseUnitValue,
      required this.area,
      required this.marketValue,
      required this.depreciationRate,
      required this.adjustedMarketVal,
      required this.amtDepreciation,
      required this.painted,
      required this.secondhand,
      required this.paintedUnitval,
      required this.secondhandUnitval,
      required this.actualUse,
      required this.genCode});

  AdditionalItems copy(
      {int? id,
      int? bldgapprDetailsId,
      int? classId,
      String? className,
      String? structType,
      dynamic unitValue,
      dynamic baseUnitValue,
      dynamic area,
      dynamic marketValue,
      dynamic depreciationRate,
      dynamic adjustedMarketVal,
      dynamic amtDepreciation,
      String? painted,
      String? secondhand,
      dynamic paintedUnitval,
      dynamic secondhandUnitval,
      String? actualUse,
      String? genCode}) {
    return AdditionalItems(
        id: id ?? this.id,
        bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId,
        classId: classId ?? this.classId,
        className: className ?? this.className,
        structType: structType ?? this.structType,
        unitValue: unitValue ?? this.unitValue,
        baseUnitValue: baseUnitValue ?? this.baseUnitValue,
        area: area ?? this.area,
        marketValue: marketValue ?? this.marketValue,
        depreciationRate: depreciationRate ?? this.depreciationRate,
        adjustedMarketVal: adjustedMarketVal ?? this.adjustedMarketVal,
        amtDepreciation: amtDepreciation ?? this.amtDepreciation,
        painted: painted ?? this.painted,
        secondhand: secondhand ?? this.secondhand,
        paintedUnitval: paintedUnitval ?? this.paintedUnitval,
        secondhandUnitval: secondhandUnitval ?? this.secondhandUnitval,
        actualUse: actualUse ?? this.actualUse,
        genCode: genCode ?? this.genCode);
  }

  factory AdditionalItems.fromJson(Map<String, dynamic> json) =>
      AdditionalItems(
          id: json["id"],
          bldgapprDetailsId: json["bldgapprDetailsId"],
          classId: json["classId"],
          className: json["className"],
          structType: json["structType"],
          unitValue: json["unitValue"],
          baseUnitValue: json["baseUnitValue"],
          area: json["area"],
          marketValue: json["marketValue"],
          depreciationRate: json["depreciationRate"],
          adjustedMarketVal: json["adjustedMarketVal"],
          amtDepreciation: json["amtDepreciation"],
          painted: json["painted"],
          secondhand: json["secondhand"],
          paintedUnitval: json["paintedUnitval"],
          secondhandUnitval: json["secondhandUnitval"],
          actualUse: json["actualUse"],
          genCode: json["gen_code"]);

  Map<String, dynamic> toJson() => {
        "id": id,
        "bldgappr_details_id": bldgapprDetailsId,
        "class_id": classId,
        "class_name": className,
        "struct_type": structType,
        "unit_value": unitValue,
        "base_unit_value": baseUnitValue,
        "area": area,
        "market_value": marketValue,
        "depreciation_rate": depreciationRate,
        "adjusted_market_val": adjustedMarketVal,
        "amt_depreciation": amtDepreciation,
        "painted": painted,
        "secondhand": secondhand,
        "painted_unitval": paintedUnitval,
        "secondhand_unitval": secondhandUnitval,
        "actual_use": actualUse,
        "gen_code": genCode
      };
}
