//
//  ProductFamily.swift
//  iPOS
//
//  Created by bbc on 21.02.2017.
//  Copyright © 2017 BBC. All rights reserved.
//


import Foundation
import ObjectMapper

enum productFamilyCodeEnum: String{
    case accessori = "ACC"
    case lenti_a_contatto = "LAC"
    case lenti_oftalmiche = "LOF"
    case merchandising = "MCH"
    case montature = "MNT"
    case premontati = "PRM"
    case soluzioni = "SOL"
    case occhiali_da_vista = "OCC"
    case descrittiva = "DES"
    case varie_admministrative = "AMM"
    case montaggi = "SRV"
    case trattamenti = "TRT"
}

class ProductFamily: Mappable, INameable{
    var productFamilyId: Int!
    var code: String?
    var name: String?
    var sizeClassId: Int?
    var vatId: Int?
    var customName: String { return self.name! }
    var customSubtitle: String? { return nil }
    
    func mapping(map: Map) {
        productFamilyId <- map["ProductFamilyId"]
        code <- map["Code"]
        name <- map["Name"]
        sizeClassId <- map["SizeClassId"]
        vatId <- map["VatId"]
    }
    
    required init?(map: Map) {
    }
    
    init() {
    }
}
