//
//  OrderDetailsDM.swift
//  WOKA
//
//  Created by MacBook Pro on 08/08/24.
//

import Foundation

// MARK: - OrderDetailsDM
struct OrderDetailsDM: Codable {
    let result: [ResultData]?
    
    // MARK: - ResultData
    struct ResultData: Codable {
        let awbno: String?
        let orderno: String?
        let ordertype, shipmentLatestStatusCode, shipmentLatestStatus, edd: String?
        let scanDetail: [ScanDetail]?

        enum CodingKeys: String, CodingKey {
            case awbno, orderno, ordertype
            case shipmentLatestStatusCode = "shipment_latest_status_code"
            case shipmentLatestStatus = "shipment_latest_status"
            case edd
            case scanDetail = "scan_detail"
        }
    }

    // MARK: - ScanDetail
    struct ScanDetail: Codable {
        let awbno: String?
        let orderno: String?
        let status, statusCode, updatedDate, location: String?
        let expDelivery, reasonCode, remarks: String?

        enum CodingKeys: String, CodingKey {
            case awbno, orderno, status
            case statusCode = "status_code"
            case updatedDate = "updated_date"
            case location
            case expDelivery = "exp_delivery"
            case reasonCode = "reason_code"
            case remarks
        }
    }

}
