SpotsResult.swift 1.52 KB
Newer Older
曹云霄's avatar
曹云霄 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
//
//	SpotsResult.swift
//
//	Create by 云霄 曹 on 8/3/2018
//	Copyright © 2018. All rights reserved.
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import SwiftyJSON


class SpotsResult : NSObject{

	var data : [SpotsData]!
	var message : String!
	var success : Bool!


	/**
	 * Instantiate the instance using the passed json values to set the properties values
	 */
	init(fromJson json: JSON!){
		if json.isEmpty{
			return
		}
		data = [SpotsData]()
		let dataArray = json["data"].arrayValue
		for dataJson in dataArray{
			let value = SpotsData(fromJson: dataJson)
			data.append(value)
		}
		message = json["message"].stringValue
		success = json["success"].boolValue
	}
}

class SpotsData : NSObject{
    
    var hour : NSDictionary!
    var increase : NSDictionary!
    var realtimenumber : Int!
    var spotid : String!
    var time : String!
    var totalnumber : Int!
    var updatetimer : String!
    
    
    /**
     * Instantiate the instance using the passed json values to set the properties values
     */
    init(fromJson json: JSON!){
        if json.isEmpty{
            return
        }
        hour = json["hour"].dictionaryObject! as NSDictionary
        increase = json["hour"].dictionaryObject! as NSDictionary
        realtimenumber = json["realtimenumber"].intValue
        spotid = json["spotid"].stringValue
        time = json["time"].stringValue
        totalnumber = json["totalnumber"].intValue
        updatetimer = json["updatetimer"].stringValue
    }
}