passo_mobile_app/lib/model/passo/structural_materials_ii.dart

139 lines
5.0 KiB
Dart
Raw Normal View History

2023-09-01 03:22:48 +00:00
// To parse this JSON data, do
//
// final structureMaterialsIi = structureMaterialsIiFromJson(jsonString);
import 'package:meta/meta.dart';
import 'dart:convert';
StructureMaterialsII structureMaterialsIiFromJson(String str) =>
StructureMaterialsII.fromJson(json.decode(str));
String structureMaterialsIiToJson(StructureMaterialsII data) =>
json.encode(data.toJson());
class StructureMaterialsII {
final int? id;
final int? bldgapprDetailsId;
2023-09-01 03:22:48 +00:00
final List<String>? foundation;
final List<String>? columns;
final List<String>? beams;
final List<String>? trussFraming;
final List<String>? roof;
final List<String>? flooring;
final List<String>? walls;
final List<String>? others;
final String? genCode;
final String? assessedById;
final String? assessedByName;
final String? dateCreated;
final String? dateModified;
2023-09-01 03:22:48 +00:00
StructureMaterialsII(
{this.id,
this.bldgapprDetailsId,
2023-09-01 03:22:48 +00:00
this.foundation,
this.columns,
this.beams,
this.trussFraming,
this.roof,
this.flooring,
this.walls,
this.others,
this.genCode,
this.assessedById,
this.assessedByName,
this.dateCreated,
this.dateModified});
2023-09-01 03:22:48 +00:00
factory StructureMaterialsII.fromJson(Map<String, dynamic> json) =>
StructureMaterialsII(
id: json["id"],
bldgapprDetailsId: json["bldgapprDetailsId"],
2023-09-01 03:22:48 +00:00
foundation: List<String>.from(json["foundation"].map((x) => x)),
columns: List<String>.from(json["columns"].map((x) => x)),
beams: List<String>.from(json["beams"].map((x) => x)),
trussFraming: List<String>.from(json["truss_framing"].map((x) => x)),
roof: List<String>.from(json["roof"].map((x) => x)),
flooring: List<String>.from(json["flooring"].map((x) => x)),
walls: List<String>.from(json["walls"].map((x) => x)),
others: List<String>.from(json["others"].map((x) => x)),
genCode: json["gen_code"],
assessedById: json["assessed_by_id"],
assessedByName: json["assessed_by_name"],
dateCreated: json["date_created"],
dateModified: json["date_modified"],
2023-09-01 03:22:48 +00:00
);
factory StructureMaterialsII.fromJson2(Map<String, dynamic> json) =>
StructureMaterialsII(
id: json["id"],
bldgapprDetailsId: json["bldgapprDetailsId"],
foundation: List<String>.from(json["foundation"].map((x) => x)),
columns: List<String>.from(json["columns"].map((x) => x)),
beams: List<String>.from(json["beams"].map((x) => x)),
trussFraming: List<String>.from(json["trussFraming"].map((x) => x)),
roof: List<String>.from(json["roof"].map((x) => x)),
flooring: List<String>.from(json["flooring"].map((x) => x)),
walls: List<String>.from(json["walls"].map((x) => x)),
others: List<String>.from(json["others"].map((x) => x)),
genCode: json["genCode"],
assessedById: json["assessedById"],
assessedByName: json["assessedByName"],
dateCreated: json["dateCreated"],
dateModified: json["dateModified"],
);
StructureMaterialsII copy({
int? id,
int? bldgapprDetailsId,
List<String>? foundation,
List<String>? columns,
List<String>? beams,
List<String>? trussFraming,
List<String>? roof,
List<String>? flooring,
List<String>? walls,
List<String>? others,
String? genCode,
String? assessedById,
String? assessedByName,
String? dateCreated,
String? dateModified,
}) =>
StructureMaterialsII(
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,
genCode: genCode ?? this.genCode,
assessedById: assessedById ?? this.assessedById,
assessedByName: assessedByName ?? this.assessedByName,
dateCreated: dateCreated ?? this.dateCreated,
dateModified: dateModified ?? this.dateModified,
);
2023-09-01 03:22:48 +00:00
Map<String, dynamic> toJson() => {
"id": id,
"bldgapprDetailsId": bldgapprDetailsId,
2023-09-01 03:22:48 +00:00
"foundation": List<dynamic>.from(foundation!.map((x) => x)),
"columns": List<dynamic>.from(columns!.map((x) => x)),
"beams": List<dynamic>.from(beams!.map((x) => x)),
"truss_framing": List<dynamic>.from(trussFraming!.map((x) => x)),
"roof": List<dynamic>.from(roof!.map((x) => x)),
"flooring": List<dynamic>.from(flooring!.map((x) => x)),
"walls": List<dynamic>.from(walls!.map((x) => x)),
"others": List<dynamic>.from(others!.map((x) => x)),
"gen_code": genCode,
"assessed_by_id": assessedById,
"assessed_by_name": assessedByName,
"date_created": dateCreated,
"date_modified": dateModified,
2023-09-01 03:22:48 +00:00
};
}