StockDTO.fromJson constructor

StockDTO.fromJson(
  1. Map<String, dynamic> json
)

Implementation

StockDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
  stockType = json['stockType'];
  type = json['type'];
  status = json['status'];
  include = json['include'];
  note = json['note'];
  sku = json['sku'];
  quantity = json['quantity'];
  startDate = json['startDate'];
  endDate = json['endDate'];
  purchaseDate = json['purchaseDate'];
  purchasePrice = json['purchasePrice'];
  purchaseCurrency = json['purchaseCurrency'];
  transactionDate = json['transactionDate'];
  storeId = json['storeId'];
  productId = json['productId'];
  warehouseId = json['warehouseId'];
  transferId = json['transferId'];
  supplierId = json['supplierId'];
  inStockId = json['inStockId'];
  productName = json['productName'];
  productBarcode = json['productBarcode'];
  productSlug = json['productSlug'];
  warehouseName = json['warehouseName'];
  supplierName = json['supplierName'];
  product =
      json['product'] != null ? ProductDTO.fromJson(json['product']) : null;
  supplier = json['supplier'] != null
      ? SupplierDTO.fromJson(json['supplier'])
      : null;
  warehouse = json['warehouse'] != null
      ? WarehouseDTO.fromJson(json['warehouse'])
      : null;
}