//
//  BaseResponseModel.swift
//  WOKA
//
//  Created by MacBook Pro on 06/05/24.
//

import Foundation

// MARK: - BaseResponseModel
protocol ResponseProtocol {
    var success: Int? { get }
}

class BaseResponseModel<T: Codable> : Codable, ResponseProtocol{
    let success: Int?
    let message: String?
    let data: T?

    enum CodingKeys: String, CodingKey {
        case success
        case message
        case data
    }
}


struct CommonResponseModel : Codable ,ResponseProtocol{
    let success: Int?
    let message: String?

    enum CodingKeys: String, CodingKey {
        case success
        case message
    }
}
