class SuratJalanModel {
  String? id;
  String? date;
  String? orderNumber;
  String? pic;
  String? type;
  String? destination;
  String? status;
  String? dateSj;

  SuratJalanModel(
      {this.id,
      this.date,
      this.orderNumber,
      this.pic,
      this.type,
      this.status,
      this.dateSj,
      this.destination});

  SuratJalanModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    date = json['date'];
    orderNumber = json['order_number'];
    pic = json['pic'];
    type = json['type'];
    status = json['status'];
    destination = json['destination'];
    dateSj = json['date_sj'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['date'] = date;
    data['order_number'] = orderNumber;
    data['pic'] = pic;
    data['type'] = type;
    data['status'] = status;
    data['destination'] = destination;
    data['date_sj'] = dateSj;
    return data;
  }
}

class SearchSuratJalanModel {
  List<SuratJalanModel>? suratJalan;
  String? total;
  int? totalPage;

  SearchSuratJalanModel({this.suratJalan, this.total, this.totalPage});

  SearchSuratJalanModel.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      suratJalan = <SuratJalanModel>[];
      json['data'].forEach((v) {
        suratJalan!.add(SuratJalanModel.fromJson(v));
      });
    }
    total = json['total'];
    totalPage = json['total_page'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (suratJalan != null) {
      data['data'] = suratJalan!.map((v) => v.toJson()).toList();
    }
    data['total'] = total;
    data['total_page'] = totalPage;
    return data;
  }
}

class dateFilterModel {
  String id;
  String name;

  dateFilterModel({
    required this.id,
    required this.name,
  });
}
