2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-14 19:25:27 +00:00

Add class for representing SupplierPart model

This commit is contained in:
Oliver Walters
2020-04-01 16:24:02 +11:00
parent 784fae276b
commit 039b09564e
5 changed files with 85 additions and 22 deletions

View File

@ -1,6 +1,9 @@
import 'model.dart';
/*
* The InvenTreeCompany class repreents the Company model in the InvenTree database.
*/
class InvenTreeCompany extends InvenTreeModel {
@override
String URL = "company/";
@ -17,4 +20,26 @@ class InvenTreeCompany extends InvenTreeModel {
return company;
}
}
/*
* The InvenTreeSupplierPart class represents the SupplierPart model in the InvenTree database
*/
class InvenTreeSupplierPart extends InvenTreeModel {
@override
String url = "company/part/";
InvenTreeSupplierPart() : super();
InvenTreeSupplierPart.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
// TODO
}
@override
InvenTreeModel createFromJson(Map<String, dynamic> json) {
var part = InvenTreeSupplierPart.fromJson(json);
return part;
}
}