//
//  JYQueryBespeakModel.swift
//  rtb
//
//  Created by chen on 2018/3/30
// 查询预约信息

import UIKit
import ObjectMapper

class itemListModel: Mappable {
    
    ///项目ID
    var itemId : String = ""
    
    ///项目名称
    var itemName : String = ""
    
    //项目组ID
    var groupId : String = ""
    
    //项目编号
    var itemCode : String = ""
    
    //价格
    var price : String = ""
    
    //购买数量
    var count : String = ""
    
    func mapping(map: Map) {
        itemId <- map["itemId"]
        itemName <- map["itemName"]
        groupId <- map["groupId"]
        itemCode <- map["itemCode"]
        price <- map["price"]
        count <- map["count"]
    }
    
    required init?(map: Map) {
        mapping(map: map)
    }
}

///bookingInfo
class BookingInfoModel: Mappable {
 
    ///星级 0否 1是
    var starYn : String = ""
    
    ///星座
    var constellation : String = ""

    ///预约的项目
    var itemList : [itemListModel] =  [itemListModel]()

    ///预约日期 ===
    var bookingDate : String = ""
    
    ///预约ID ==
    var bookingId : String = ""
    
    ///手机号码 ===
    var cellPhone : String = ""
    
    ///顾客编号 ===
    var customerCode : String = ""
    
    ///顾客性别 ===
    var customerGener : String = ""
    
    ///顾客ID ===
    var customerId : String? = ""
    
    ///顾客姓名 ===
    var customerName : String = ""
    
    ///员工编号 ===
    var employeeCode : String = ""
    
    ///员工性别 ===
    var employeeGener : String = ""
    
    ///员工ID =====
    var employeeId : String = ""
    
    ///员工姓名 ====
    var employeeName : String = ""
    
    ///项目编号
    var itemCode : String = ""
    
    ///员工职位名称 ===
    var positionName : String = ""
    
    ///员工职位ID (1.1.1版本新增字段)
    var positionId : String = ""
    
    ///预约时间 ==
    var startTime : String = ""
    
    init() { }
    
    func mapping(map: Map) {

        starYn <- map["starYn"]
        constellation <- map["constellation"]
        
        bookingDate <- map["bookingDate"]
        bookingId <- map["bookingId"]
        cellPhone <- map["cellPhone"]
        customerCode <- map["customerCode"]
        customerGener <- map["customerGener"]
        customerId <- map["customerId"]
        customerName <- map["customerName"]
        employeeCode <- map["employeeCode"]
        employeeGener <- map["employeeGener"]
        employeeId <- map["employeeId"]
        employeeName <- map["employeeName"]
        itemCode <- map["itemCode"]
        itemList <- map["itemList"]
        positionName <- map["positionName"]
        startTime <- map["startTime"]
        positionId <- map["positionId"]
    }
    
    required init?(map: Map) {
        mapping(map: map)
    }
}

///bookingInfoList
class BookingInfoListModel: Mappable {
    
    ///对应的时间分组
    var bookingInfo : [BookingInfoModel] = [BookingInfoModel]()
    
    /// 时间
    var time : String = ""
    
    func mapping(map: Map) {
        bookingInfo <- map["bookingInfo"]
        time <- map["time"]
    }
    
    required init?(map: Map) {
        mapping(map: map)
    }
}

///val
class ValForBespeakModel: Mappable {
    
    ///某个时间点的预约信息
    var bookingInfoList : [BookingInfoListModel] = [BookingInfoListModel]()
    
    ///预约总人数
    var number : String = ""
    init() { }
    func mapping(map: Map) {
        bookingInfoList <- map["bookingInfoList"]
        number <- map["number"]
    }
    
    required init?(map: Map) {
        mapping(map: map)
    }
}

/// obj
class QueryBespeakModel: Mappable {

    var msg : String  = ""
    var ret : String  = ""
    var val : [ValForBespeakModel] = [ValForBespeakModel]()
    
    func mapping(map: Map) {
        msg <- map["msg"]
        ret <- map["ret"]
        val <- map["val"]
    }
    
    required init?(map: Map) {
        mapping(map: map)
    }
}

  

posted on 2018-10-26 10:06  懂事长qingzZ  阅读(733)  评论(0编辑  收藏  举报