17 lines
484 B
Dart
17 lines
484 B
Dart
class Property {
|
|
int propertyId;
|
|
String propertyName;
|
|
String propertyUnit;
|
|
String propertyNameTranslation;
|
|
|
|
Property.fromJson(Map json) {
|
|
this.propertyId = json['propertyId'];
|
|
this.propertyName = json['propertyName'];
|
|
this.propertyUnit = json['propertyUnit'];
|
|
this.propertyNameTranslation =
|
|
json['translations'] != null && (json['translations']).length > 0
|
|
? json['translations'][0]['propertyName']
|
|
: this.propertyName;
|
|
}
|
|
}
|