123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- //
- // RedemptionAreaModel.swift
- // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
- import Foundation
- import ObjectMapper
- class CMSRedemptionAreaModel : NSObject, Mappable{
- var applyType : String?
- var content : [CMSRedemptionAreaContent]?
- var title : String?
- class func newInstance(map: Map) -> Mappable?{
- return CMSRedemptionAreaModel()
- }
- required init?(map: Map){}
- private override init(){}
- func mapping(map: Map)
- {
- applyType <- map["apply_type"]
- content <- map["content"]
- title <- map["title"]
-
- }
- }
- enum CMSRedemptionAreaContentType : String {
- case none = ""
- case banner = "banner"
- case specialOne = "subject_one"
- case specialTwo = "subject_two"
- case floor = "floor"
- }
- class CMSRedemptionAreaContent : NSObject, Mappable{
-
- var cmsRedemptionAreaContentType : CMSRedemptionAreaContentType?
- var areaType : String? {
- didSet{
- cmsRedemptionAreaContentType = CMSRedemptionAreaContentType(rawValue: areaType ?? "")
- }
- }
- var floorImg : String?
- var id : Int?
- var linkType : Int?
- var linkUrl : Int?
- var rule : [CMSRedemptionAreaRule]?
- var showType : Int?
-
-
- class func newInstance(map: Map) -> Mappable?{
- return CMSRedemptionAreaContent()
- }
- required init?(map: Map){}
- private override init(){}
-
- func mapping(map: Map)
- {
- areaType <- map["area_type"]
- floorImg <- map["floor_img"]
- id <- map["id"]
- linkType <- map["link_type"]
- linkUrl <- map["link_url"]
- rule <- map["rule"]
- showType <- map["show_type"]
-
- }
-
- }
- class CMSRedemptionAreaRule : NSObject, Mappable{
-
- // banner
- var url : String?
- var linkUrl : String?
- var redemptionAreaBannerType : RedemptionAreaBannerType?
- var linkType : Int? {
- didSet {
- redemptionAreaBannerType = RedemptionAreaBannerType(rawValue: linkType ?? 0)
- }
- }
- // floor
- var id : Int?
- var img : String?
- var price : Int?
- var saleName : String?
- var stock : Int?
- var subtitle : String?
- var totalCount : Int?
-
-
- class func newInstance(map: Map) -> Mappable?{
- return CMSRedemptionAreaRule()
- }
- required init?(map: Map){}
- private override init(){}
-
- func mapping(map: Map)
- {
- // banner
- url <- map["url"]
- linkUrl <- map["link_url"]
- linkType <- map["link_type"]
-
- // floor
- id <- map["id"]
- img <- map["img"]
- price <- map["price"]
- saleName <- map["sale_name"]
- stock <- map["stock"]
- subtitle <- map["subtitle"]
- totalCount <- map["total_count"]
-
- }
-
- }
|