2023-11-10 08:38:47 +00:00
|
|
|
// To parse this JSON data, do
|
|
|
|
//
|
|
|
|
// final classComponents = classComponentsFromJson(jsonString);
|
|
|
|
|
|
|
|
import 'dart:convert';
|
|
|
|
|
|
|
|
ClassComponentsOffline classComponentsFromJson(String str) =>
|
|
|
|
ClassComponentsOffline.fromJson(json.decode(str));
|
|
|
|
|
|
|
|
String classComponentsToJson(ClassComponentsOffline data) =>
|
|
|
|
json.encode(data.toJson());
|
|
|
|
|
|
|
|
class ClassComponentsOffline {
|
|
|
|
final int? id;
|
|
|
|
final String? componentName;
|
|
|
|
final String? minBaseUnitvalPercent;
|
|
|
|
final String? maxBaseUnitvalPercent;
|
|
|
|
final String? minUnitvalSqrmtr;
|
|
|
|
final String? maxUnitvalSqrmtr;
|
|
|
|
final String? minAddBaseunitval;
|
|
|
|
final String? maxAddBaseunitval;
|
|
|
|
final String? minDeductBaserate;
|
|
|
|
final String? maxDeductBaserate;
|
|
|
|
final String? minLinearMeter;
|
|
|
|
final String? maxLinearMeter;
|
|
|
|
final String? minSpacing;
|
|
|
|
final String? maxSpacing;
|
|
|
|
final String? roughFinish;
|
|
|
|
final String? highFinish;
|
|
|
|
final int? withoutBucc;
|
2024-03-21 05:47:57 +00:00
|
|
|
// final String? genCode;
|
2023-11-10 08:38:47 +00:00
|
|
|
|
|
|
|
ClassComponentsOffline({
|
|
|
|
this.id,
|
|
|
|
this.componentName,
|
|
|
|
this.minBaseUnitvalPercent,
|
|
|
|
this.maxBaseUnitvalPercent,
|
|
|
|
this.minUnitvalSqrmtr,
|
|
|
|
this.maxUnitvalSqrmtr,
|
|
|
|
this.minAddBaseunitval,
|
|
|
|
this.maxAddBaseunitval,
|
|
|
|
this.minDeductBaserate,
|
|
|
|
this.maxDeductBaserate,
|
|
|
|
this.minLinearMeter,
|
|
|
|
this.maxLinearMeter,
|
|
|
|
this.minSpacing,
|
|
|
|
this.maxSpacing,
|
|
|
|
this.roughFinish,
|
|
|
|
this.highFinish,
|
|
|
|
this.withoutBucc,
|
2024-03-21 05:47:57 +00:00
|
|
|
// this.genCode
|
2023-11-10 08:38:47 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
ClassComponentsOffline copy({
|
|
|
|
int? id,
|
|
|
|
String? componentName,
|
|
|
|
String? minBaseUnitvalPercent,
|
|
|
|
String? maxBaseUnitvalPercent,
|
|
|
|
String? minUnitvalSqrmtr,
|
|
|
|
String? maxUnitvalSqrmtr,
|
|
|
|
String? minAddBaseunitval,
|
|
|
|
String? maxAddBaseunitval,
|
|
|
|
String? minDeductBaserate,
|
|
|
|
String? maxDeductBaserate,
|
|
|
|
String? minLinearMeter,
|
|
|
|
String? maxLinearMeter,
|
|
|
|
String? minSpacing,
|
|
|
|
String? maxSpacing,
|
|
|
|
String? roughFinish,
|
|
|
|
String? highFinish,
|
|
|
|
int? withoutBucc,
|
2024-03-21 05:47:57 +00:00
|
|
|
// String? genCode,
|
2023-11-10 08:38:47 +00:00
|
|
|
}) {
|
|
|
|
return ClassComponentsOffline(
|
|
|
|
id: id ?? this.id,
|
|
|
|
componentName: componentName ?? this.componentName,
|
|
|
|
minBaseUnitvalPercent:
|
|
|
|
minBaseUnitvalPercent ?? this.minBaseUnitvalPercent,
|
|
|
|
maxBaseUnitvalPercent:
|
|
|
|
maxBaseUnitvalPercent ?? this.maxBaseUnitvalPercent,
|
|
|
|
minUnitvalSqrmtr: minUnitvalSqrmtr ?? this.minUnitvalSqrmtr,
|
|
|
|
maxUnitvalSqrmtr: maxUnitvalSqrmtr ?? this.maxUnitvalSqrmtr,
|
|
|
|
minAddBaseunitval: minAddBaseunitval ?? this.minAddBaseunitval,
|
|
|
|
maxAddBaseunitval: maxAddBaseunitval ?? this.maxAddBaseunitval,
|
|
|
|
minDeductBaserate: minDeductBaserate ?? this.minDeductBaserate,
|
|
|
|
maxDeductBaserate: maxDeductBaserate ?? this.maxDeductBaserate,
|
|
|
|
minLinearMeter: minLinearMeter ?? this.minLinearMeter,
|
|
|
|
maxLinearMeter: maxLinearMeter ?? this.maxLinearMeter,
|
|
|
|
minSpacing: minSpacing ?? this.minSpacing,
|
|
|
|
maxSpacing: maxSpacing ?? this.maxSpacing,
|
|
|
|
roughFinish: roughFinish ?? this.roughFinish,
|
|
|
|
highFinish: highFinish ?? this.highFinish,
|
|
|
|
withoutBucc: withoutBucc ?? this.withoutBucc,
|
2024-03-21 05:47:57 +00:00
|
|
|
// genCode: genCode ?? this.genCode,
|
2023-11-10 08:38:47 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
factory ClassComponentsOffline.fromJson(Map<String, dynamic> json) =>
|
|
|
|
ClassComponentsOffline(
|
|
|
|
id: json["id"],
|
|
|
|
componentName: json["component_name"],
|
|
|
|
minBaseUnitvalPercent: json["min_base_unitval_percent"],
|
|
|
|
maxBaseUnitvalPercent: json["max_base_unitval_percent"],
|
|
|
|
minUnitvalSqrmtr: json["min_unitval_sqrmtr"],
|
|
|
|
maxUnitvalSqrmtr: json["max_unitval_sqrmtr"],
|
|
|
|
minAddBaseunitval: json["min_add_baseunitval"],
|
|
|
|
maxAddBaseunitval: json["max_add_baseunitval"],
|
|
|
|
minDeductBaserate: json["min_deduct_baserate"],
|
|
|
|
maxDeductBaserate: json["max_deduct_baserate"],
|
|
|
|
minLinearMeter: json["min_linear_meter"],
|
|
|
|
maxLinearMeter: json["max_linear_meter"],
|
|
|
|
minSpacing: json["min_spacing"],
|
|
|
|
maxSpacing: json["max_spacing"],
|
|
|
|
roughFinish: json["rough_finish"],
|
|
|
|
highFinish: json["high_finish"],
|
|
|
|
withoutBucc: json["without_bucc"],
|
2024-03-21 05:47:57 +00:00
|
|
|
// genCode: json["gen_code"],
|
2023-11-10 08:38:47 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
factory ClassComponentsOffline.fromJson2(Map<String, dynamic> json) =>
|
|
|
|
ClassComponentsOffline(
|
|
|
|
id: json["id"],
|
|
|
|
componentName: json["componentName"],
|
|
|
|
minBaseUnitvalPercent: json["minBaseUnitvalPercent"],
|
|
|
|
maxBaseUnitvalPercent: json["maxBaseUnitvalPercent"],
|
|
|
|
minUnitvalSqrmtr: json["minUnitvalSqrmtr"],
|
|
|
|
maxUnitvalSqrmtr: json["maxUnitvalSqrmtr"],
|
|
|
|
minAddBaseunitval: json["minAddBaseunitval"],
|
|
|
|
maxAddBaseunitval: json["maxAddBaseunitval"],
|
|
|
|
minDeductBaserate: json["minDeductBaserate"],
|
|
|
|
maxDeductBaserate: json["maxDeductBaserate"],
|
|
|
|
minLinearMeter: json["minLinearMeter"],
|
|
|
|
maxLinearMeter: json["maxLinearMeter"],
|
|
|
|
minSpacing: json["minSpacing"],
|
|
|
|
maxSpacing: json["maxSpacing"],
|
|
|
|
roughFinish: json["roughFinish"],
|
|
|
|
highFinish: json["highFinish"],
|
|
|
|
withoutBucc: json["withoutBucc"],
|
2024-03-21 05:47:57 +00:00
|
|
|
// genCode: json["genCode"]
|
2023-11-10 08:38:47 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
|
|
"id": id,
|
|
|
|
"component_name": componentName,
|
|
|
|
"min_base_unitval_percent": minBaseUnitvalPercent,
|
|
|
|
"max_base_unitval_percent": maxBaseUnitvalPercent,
|
|
|
|
"min_unitval_sqrmtr": minUnitvalSqrmtr,
|
|
|
|
"max_unitval_sqrmtr": maxUnitvalSqrmtr,
|
|
|
|
"min_add_baseunitval": minAddBaseunitval,
|
|
|
|
"max_add_baseunitval": maxAddBaseunitval,
|
|
|
|
"min_deduct_baserate": minDeductBaserate,
|
|
|
|
"max_deduct_baserate": maxDeductBaserate,
|
|
|
|
"min_linear_meter": minLinearMeter,
|
|
|
|
"max_linear_meter": maxLinearMeter,
|
|
|
|
"min_spacing": minSpacing,
|
|
|
|
"max_spacing": maxSpacing,
|
|
|
|
"rough_finish": roughFinish,
|
|
|
|
"high_finish": highFinish,
|
|
|
|
"without_bucc": withoutBucc,
|
2024-03-21 05:47:57 +00:00
|
|
|
// "gen_code": genCode
|
2023-11-10 08:38:47 +00:00
|
|
|
};
|
|
|
|
}
|