passo_mobile_app/lib/model/passo/land_classification.dart

55 lines
1.4 KiB
Dart
Raw Permalink Normal View History

2023-09-01 03:22:48 +00:00
// To parse this JSON data, do
//
// final landClassification = landClassificationFromJson(jsonString);
import 'dart:convert';
LandClassification landClassificationFromJson(String str) =>
LandClassification.fromJson(json.decode(str));
String landClassificationToJson(LandClassification data) =>
json.encode(data.toJson());
class LandClassification {
final int? id;
final String? classificationCode;
final String? description;
LandClassification({
this.id,
this.classificationCode,
this.description,
});
2024-02-08 00:52:29 +00:00
LandClassification copy({
final int? id,
final String? classificationCode,
final String? description,
}) {
return LandClassification(
id: id ?? this.id,
classificationCode: classificationCode ?? this.classificationCode,
description: description ?? this.description);
}
2023-09-01 03:22:48 +00:00
factory LandClassification.fromJson(Map<String, dynamic> json) =>
LandClassification(
id: json["id"],
classificationCode: json["classification_code"],
description: json["description"],
);
2024-02-08 00:52:29 +00:00
factory LandClassification.fromJson2(Map<String, dynamic> json) =>
LandClassification(
id: json["id"],
classificationCode: json["classificationCode"],
description: json["description"],
);
2023-09-01 03:22:48 +00:00
Map<String, dynamic> toJson() => {
"id": id,
"classification_code": classificationCode,
"description": description,
};
}