123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- //
- // AddressManagerListModel.swift
- // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
- import Foundation
- import ObjectMapper
- class AddressManagerListModel : NSObject, NSCoding, Mappable{
- var expressAddress : [ExpressAddresModel]?
- var selfAddress : [SelfAddresModel]?
- class func newInstance(map: Map) -> Mappable?{
- return AddressManagerListModel()
- }
- required init?(map: Map){}
- private override init(){}
- func mapping(map: Map)
- {
- expressAddress <- map["expressAddress"]
- selfAddress <- map["selfAddress"]
-
- }
- /**
- * NSCoding required initializer.
- * Fills the data from the passed decoder
- */
- @objc required init(coder aDecoder: NSCoder)
- {
- expressAddress = aDecoder.decodeObject(forKey: "expressAddress") as? [ExpressAddresModel]
- selfAddress = aDecoder.decodeObject(forKey: "selfAddress") as? [SelfAddresModel]
- }
- /**
- * NSCoding required method.
- * Encodes mode properties into the decoder
- */
- @objc func encode(with aCoder: NSCoder)
- {
- if expressAddress != nil{
- aCoder.encode(expressAddress, forKey: "expressAddress")
- }
- if selfAddress != nil{
- aCoder.encode(selfAddress, forKey: "selfAddress")
- }
- }
- }
- class ExpressAddresModel : NSObject, NSCoding, Mappable{
-
- var address : String?
- var addressType : Int?
- var areaId : Int?
- var areaName : String?
- var cityId : Int?
- var cityName : String?
- var contactMobile : String?
- var contactName : String?
- var createdAt : String?
- var deletedAt : String?
- var id : Int?
- var isDefault : Int?
- var pickupNodeId : Int?
- var provinceId : Int?
- var provinceName : String?
- var uid : Int?
- var updatedAt : String?
- var zipcode : Int?
-
-
- class func newInstance(map: Map) -> Mappable?{
- return ExpressAddresModel()
- }
- required init?(map: Map){}
- private override init(){}
-
- func mapping(map: Map)
- {
- address <- map["address"]
- addressType <- map["address_type"]
- areaId <- map["area_id"]
- areaName <- map["area_name"]
- cityId <- map["city_id"]
- cityName <- map["city_name"]
- contactMobile <- map["contact_mobile"]
- contactName <- map["contact_name"]
- createdAt <- map["created_at"]
- deletedAt <- map["deleted_at"]
- id <- map["id"]
- isDefault <- map["is_default"]
- pickupNodeId <- map["pickup_node_id"]
- provinceId <- map["province_id"]
- provinceName <- map["province_name"]
- uid <- map["uid"]
- updatedAt <- map["updated_at"]
- zipcode <- map["zipcode"]
-
- }
-
- /**
- * NSCoding required initializer.
- * Fills the data from the passed decoder
- */
- @objc required init(coder aDecoder: NSCoder)
- {
- address = aDecoder.decodeObject(forKey: "address") as? String
- addressType = aDecoder.decodeObject(forKey: "address_type") as? Int
- areaId = aDecoder.decodeObject(forKey: "area_id") as? Int
- areaName = aDecoder.decodeObject(forKey: "area_name") as? String
- cityId = aDecoder.decodeObject(forKey: "city_id") as? Int
- cityName = aDecoder.decodeObject(forKey: "city_name") as? String
- contactMobile = aDecoder.decodeObject(forKey: "contact_mobile") as? String
- contactName = aDecoder.decodeObject(forKey: "contact_name") as? String
- createdAt = aDecoder.decodeObject(forKey: "created_at") as? String
- deletedAt = aDecoder.decodeObject(forKey: "deleted_at") as? String
- id = aDecoder.decodeObject(forKey: "id") as? Int
- isDefault = aDecoder.decodeObject(forKey: "is_default") as? Int
- pickupNodeId = aDecoder.decodeObject(forKey: "pickup_node_id") as? Int
- provinceId = aDecoder.decodeObject(forKey: "province_id") as? Int
- provinceName = aDecoder.decodeObject(forKey: "province_name") as? String
- uid = aDecoder.decodeObject(forKey: "uid") as? Int
- updatedAt = aDecoder.decodeObject(forKey: "updated_at") as? String
- zipcode = aDecoder.decodeObject(forKey: "zipcode") as? Int
-
- }
-
- /**
- * NSCoding required method.
- * Encodes mode properties into the decoder
- */
- @objc func encode(with aCoder: NSCoder)
- {
- if address != nil{
- aCoder.encode(address, forKey: "address")
- }
- if addressType != nil{
- aCoder.encode(addressType, forKey: "address_type")
- }
- if areaId != nil{
- aCoder.encode(areaId, forKey: "area_id")
- }
- if areaName != nil{
- aCoder.encode(areaName, forKey: "area_name")
- }
- if cityId != nil{
- aCoder.encode(cityId, forKey: "city_id")
- }
- if cityName != nil{
- aCoder.encode(cityName, forKey: "city_name")
- }
- if contactMobile != nil{
- aCoder.encode(contactMobile, forKey: "contact_mobile")
- }
- if contactName != nil{
- aCoder.encode(contactName, forKey: "contact_name")
- }
- if createdAt != nil{
- aCoder.encode(createdAt, forKey: "created_at")
- }
- if deletedAt != nil{
- aCoder.encode(deletedAt, forKey: "deleted_at")
- }
- if id != nil{
- aCoder.encode(id, forKey: "id")
- }
- if isDefault != nil{
- aCoder.encode(isDefault, forKey: "is_default")
- }
- if pickupNodeId != nil{
- aCoder.encode(pickupNodeId, forKey: "pickup_node_id")
- }
- if provinceId != nil{
- aCoder.encode(provinceId, forKey: "province_id")
- }
- if provinceName != nil{
- aCoder.encode(provinceName, forKey: "province_name")
- }
- if uid != nil{
- aCoder.encode(uid, forKey: "uid")
- }
- if updatedAt != nil{
- aCoder.encode(updatedAt, forKey: "updated_at")
- }
- if zipcode != nil{
- aCoder.encode(zipcode, forKey: "zipcode")
- }
-
- }
-
- }
- class SelfAddresModel : NSObject, Mappable{
-
- var address : String?
- var addressType : Int?
- var areaId : Int?
- var areaName : String?
- var cityId : Int?
- var cityName : String?
- var contactMobile : String?
- var contactName : String?
- var createdAt : String?
- var deletedAt : AnyObject?
- var id : Int?
- var isDefault : Int?
- var pickupNodeId : Int?
- var provinceId : Int?
- var provinceName : String?
- var uid : Int?
- var updatedAt : String?
- var zipcode : Int?
-
-
- class func newInstance(map: Map) -> Mappable?{
- return SelfAddresModel()
- }
- required init?(map: Map){}
- private override init(){}
-
- func mapping(map: Map)
- {
- address <- map["address"]
- addressType <- map["address_type"]
- areaId <- map["area_id"]
- areaName <- map["area_name"]
- cityId <- map["city_id"]
- cityName <- map["city_name"]
- contactMobile <- map["contact_mobile"]
- contactName <- map["contact_name"]
- createdAt <- map["created_at"]
- deletedAt <- map["deleted_at"]
- id <- map["id"]
- isDefault <- map["is_default"]
- pickupNodeId <- map["pickup_node_id"]
- provinceId <- map["province_id"]
- provinceName <- map["province_name"]
- uid <- map["uid"]
- updatedAt <- map["updated_at"]
- zipcode <- map["zipcode"]
-
- }
-
- }
|