Add some getters

This commit is contained in:
Oliver Walters 2020-05-23 21:15:02 +10:00
parent 1d7d3def04
commit 56dd22c656
3 changed files with 39 additions and 1 deletions

View file

@ -72,6 +72,18 @@ class InvenTreePartTestTemplate extends InvenTreeModel {
@override
String URL = "part/test-template/";
String get key => jsondata['key'] ?? '';
String get testName => jsondata['test_name'] ?? '';
String get description => jsondata['description'] ?? '';
bool get required => jsondata['required'] ?? false;
bool get requiresValue => jsondata['requires_value'] ?? false;
bool get requiresAttachment => jsondata['requires_attachment'] ?? false;
InvenTreePartTestTemplate() : super();
InvenTreePartTestTemplate.fromJson(Map<String, dynamic> json) : super.fromJson(json) {