/// logisticCode : ""
/// shipperCode : ""
/// state : 0
/// success : true
/// traces : [{"acceptStation":"","acceptTime":""}]

class Logistics {
  String logisticCode;
  String shipperCode;
  int state;
  bool success;
  List<TracesBean> traces;

  static Logistics fromJson(Map<String, dynamic> map) {
    if (map == null) return null;
    Logistics logisticsBean = Logistics();
    logisticsBean.logisticCode = map['logisticCode'];
    logisticsBean.shipperCode = map['shipperCode'];
    logisticsBean.state = map['state'];
    logisticsBean.success = map['success'];
    logisticsBean.traces = []..addAll(
      (map['traces'] as List ?? []).map((o) => TracesBean.fromMap(o))
    );
    return logisticsBean;
  }

  Map toJson() => {
    "logisticCode": logisticCode,
    "shipperCode": shipperCode,
    "state": state,
    "success": success,
    "traces": traces,
  };
}

/// acceptStation : ""
/// acceptTime : ""

class TracesBean {
  String acceptStation;
  String acceptTime;

  static TracesBean fromMap(Map<String, dynamic> map) {
    if (map == null) return null;
    TracesBean tracesBean = TracesBean();
    tracesBean.acceptStation = map['acceptStation'];
    tracesBean.acceptTime = map['acceptTime'];
    return tracesBean;
  }

  Map toJson() => {
    "acceptStation": acceptStation,
    "acceptTime": acceptTime,
  };
}