38 lines
835 B
Dart
38 lines
835 B
Dart
|
|
import 'package:satu/core/utils/utils_parse.dart';
|
|
|
|
/// id : 6
|
|
/// name : "test"
|
|
/// articul : "100"
|
|
/// cnt : 1
|
|
/// price : 200
|
|
/// excise : "000000000000_gs1_excise_code"
|
|
|
|
class ItemsBean {
|
|
int? id;
|
|
String? name;
|
|
String? articul;
|
|
double? cnt;
|
|
double? price;
|
|
String? excise;
|
|
|
|
static ItemsBean fromMap(dynamic map) {
|
|
final ItemsBean itemsBean = ItemsBean();
|
|
itemsBean.id = cast<int>(map['id']);
|
|
itemsBean.name = cast<String>(map['name']);
|
|
itemsBean.articul = cast<String>(map['articul']);
|
|
itemsBean.cnt = cast<double>(map['cnt']);
|
|
itemsBean.price = cast<double>(map['price']);
|
|
itemsBean.excise = cast<String>(map['excise']);
|
|
return itemsBean;
|
|
}
|
|
|
|
Map toJson() => {
|
|
'id': id,
|
|
'name': name,
|
|
'articul': articul,
|
|
'cnt': cnt,
|
|
'price': price,
|
|
'excise': excise,
|
|
};
|
|
} |