65 lines
1.8 KiB
Swift
65 lines
1.8 KiB
Swift
|
|
//
|
||
|
|
// OrderListingDM.swift
|
||
|
|
// WOKA
|
||
|
|
//
|
||
|
|
// Created by MacBook Pro on 07/08/24.
|
||
|
|
//
|
||
|
|
|
||
|
|
|
||
|
|
import Foundation
|
||
|
|
|
||
|
|
// MARK: - OrderListingDM
|
||
|
|
struct OrderListingDM: Codable {
|
||
|
|
let result: ResultData?
|
||
|
|
|
||
|
|
// MARK: - Result
|
||
|
|
struct ResultData: Codable {
|
||
|
|
let currentPage: Int?
|
||
|
|
let data: [Datum]?
|
||
|
|
let total: Int?
|
||
|
|
|
||
|
|
enum CodingKeys: String, CodingKey {
|
||
|
|
case currentPage = "current_page"
|
||
|
|
case data
|
||
|
|
case total
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// MARK: - Datum
|
||
|
|
struct Datum: Codable {
|
||
|
|
let id: Int?
|
||
|
|
let orderID: String?
|
||
|
|
let numberOfProducts: Int?
|
||
|
|
let orderBookedDateTime, orderStatus, paymentMode, paymentStatus: String?
|
||
|
|
let grandTotal, deliverySuccessStatus: Int?
|
||
|
|
let airwaybilno, courier, branchCode, dispatchLabelURL: String?
|
||
|
|
let shipmentLatestStatusCode, shipmentLatestStatus, edd: String?
|
||
|
|
|
||
|
|
enum CodingKeys: String, CodingKey {
|
||
|
|
case id
|
||
|
|
case orderID = "order_id"
|
||
|
|
case numberOfProducts = "number_of_products"
|
||
|
|
case orderBookedDateTime = "order_booked_date_time"
|
||
|
|
case orderStatus = "order_status"
|
||
|
|
case paymentMode = "payment_mode"
|
||
|
|
case paymentStatus = "payment_status"
|
||
|
|
case grandTotal = "grand_total"
|
||
|
|
case deliverySuccessStatus = "delivery_success_status"
|
||
|
|
case airwaybilno, courier
|
||
|
|
case branchCode = "branch_code"
|
||
|
|
case dispatchLabelURL = "dispatch_label_url"
|
||
|
|
case shipmentLatestStatusCode = "shipment_latest_status_code"
|
||
|
|
case shipmentLatestStatus = "shipment_latest_status"
|
||
|
|
case edd
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
// MARK: - Link
|
||
|
|
struct Link: Codable {
|
||
|
|
let url: String?
|
||
|
|
let label: String?
|
||
|
|
let active: Bool?
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|