
import 'package:satu/core/utils/utils_parse.dart';

/// id : 6
/// name : "test"
/// articul : "100"
/// cnt : 1
/// price : 200
/// excise : "000000000000_gs1_excise_code"

class ItemBean {
  int? id;
  String? name;
  String? articul;
  double? cnt;
  double? price;
  String? excise;

  static ItemBean fromMap(dynamic map) {
    final ItemBean itemsBean = ItemBean();
    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,
  };
}