You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.6 KiB
Dart
61 lines
1.6 KiB
Dart
class PpmKits {
|
|
PpmKits({
|
|
this.id,
|
|
this.visitId,
|
|
this.partCatalogItemId,
|
|
this.partNumber,
|
|
this.oracleCode,
|
|
this.partName,
|
|
this.partName2,
|
|
});
|
|
|
|
PpmKits.fromJson(dynamic json) {
|
|
id = json['id'];
|
|
visitId = json['visitId'];
|
|
partCatalogItemId = json['partCatalogItemId'];
|
|
partNumber = json['partNumber'];
|
|
oracleCode = json['oracleCode'];
|
|
partName = json['partName'];
|
|
partName2 = json['partName2'];
|
|
}
|
|
|
|
num? id; // Now nullable
|
|
num? visitId; // Now nullable
|
|
num? partCatalogItemId; // Now nullable
|
|
String? partNumber; // Now nullable
|
|
String? oracleCode; // Now nullable
|
|
String? partName; // Now nullable
|
|
String? partName2; // Nownullable
|
|
|
|
PpmKits copyWith({
|
|
num? id, // All parameters are now nullable
|
|
num? visitId,
|
|
num? partCatalogItemId,
|
|
String? partNumber,
|
|
String? oracleCode,
|
|
String? partName,
|
|
String? partName2,
|
|
}) =>
|
|
PpmKits(
|
|
id: id ?? this.id,
|
|
visitId: visitId ?? this.visitId,
|
|
partCatalogItemId: partCatalogItemId ?? this.partCatalogItemId,
|
|
partNumber: partNumber ?? this.partNumber,
|
|
oracleCode: oracleCode ?? this.oracleCode,
|
|
partName: partName ?? this.partName,
|
|
partName2: partName2 ?? this.partName2,
|
|
);
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['id'] = id;
|
|
map['visitId'] = visitId;
|
|
map['partCatalogItemId'] = partCatalogItemId;
|
|
map['partNumber'] = partNumber;
|
|
map['oracleCode'] = oracleCode;
|
|
map['partName'] = partName;
|
|
map['partName2'] = partName2;
|
|
return map;
|
|
}
|
|
}
|