passo_mobile_app/lib/model/passo/structureMaterial.dart

87 lines
2.4 KiB
Dart
Raw Normal View History

2023-09-01 03:22:48 +00:00
// To parse this JSON data, do
//
// final structureMaterials = structureMaterialsFromJson(jsonString);
import 'package:meta/meta.dart';
import 'dart:convert';
StructureMaterials structureMaterialsFromJson(String str) =>
StructureMaterials.fromJson(json.decode(str));
String structureMaterialsToJson(StructureMaterials data) =>
json.encode(data.toJson());
class StructureMaterials {
final int? id;
final int? bldgapprDetailsId;
2023-09-01 03:22:48 +00:00
final String? foundation;
final String? columns;
final String? beams;
final String? trussFraming;
final String? roof;
final String? flooring;
final String? walls;
final String? others;
2023-09-01 03:22:48 +00:00
StructureMaterials(
{this.id,
this.bldgapprDetailsId,
this.foundation,
this.columns,
this.beams,
this.trussFraming,
this.roof,
this.flooring,
this.walls,
this.others});
StructureMaterials copy(
{int? id,
int? bldgapprDetailsId,
String? foundation,
String? columns,
String? beams,
String? trussFraming,
String? roof,
String? flooring,
String? walls,
String? others}) =>
StructureMaterials(
id: id ?? this.id,
bldgapprDetailsId: bldgapprDetailsId ?? this.bldgapprDetailsId,
foundation: foundation ?? this.foundation,
columns: columns ?? this.columns,
beams: beams ?? this.beams,
trussFraming: trussFraming ?? this.trussFraming,
roof: roof ?? this.roof,
flooring: flooring ?? this.flooring,
walls: walls ?? this.walls,
others: others ?? this.others);
2023-09-01 03:22:48 +00:00
factory StructureMaterials.fromJson(Map<String, dynamic> json) =>
StructureMaterials(
id: json["id"],
bldgapprDetailsId: json["bldgappr_details_id"],
foundation: json["foundation"],
columns: json["columns"],
beams: json["beams"],
trussFraming: json["truss_framing"],
roof: json["roof"],
flooring: json["flooring"],
walls: json["walls"],
others: json["others"]);
2023-09-01 03:22:48 +00:00
Map<String, dynamic> toJson() => {
"id": id,
"bldgappr_details_id": bldgapprDetailsId,
2023-09-01 03:22:48 +00:00
"foundation": foundation,
"columns": columns,
"beams": beams,
"truss_framing": trussFraming,
"roof": roof,
"flooring": flooring,
"walls": walls,
"others": others
2023-09-01 03:22:48 +00:00
};
}