passo_mobile_app/lib/model/passo/additional_items.dart

133 lines
4.2 KiB
Dart
Raw Normal View History

2023-07-28 02:35:36 +00:00
// To parse this JSON data, do
//
// final additionalItems = additionalItemsFromJson(jsonString);
import 'package:meta/meta.dart';
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;
2023-07-28 02:35:36 +00:00
final dynamic paintedUnitval;
final dynamic secondhandUnitval;
final String actualUse;
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,
});
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,
}) {
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);
}
2023-07-28 02:35:36 +00:00
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"],
2023-07-28 02:35:36 +00:00
area: json["area"],
marketValue: json["marketValue"],
depreciationRate: json["depreciationRate"],
adjustedMarketVal: json["adjustedMarketVal"],
amtDepreciation: json["amtDepreciation"],
2023-07-28 02:35:36 +00:00
painted: json["painted"],
secondhand: json["secondhand"],
paintedUnitval: json["paintedUnitval"],
secondhandUnitval: json["secondhandUnitval"],
actualUse: json["actualUse"],
2023-07-28 02:35:36 +00:00
);
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,
};
}