<commit_before>//
//  VIN.swift
//  Motion
//
//  Created by <NAME> on 2016-02-26.
//  Copyright © 2016 Mojio. All rights reserved.
//

import UIKit
import RealmSwift
import ObjectMapper

class Vin: Object, Mappable {
    
    dynamic var VIN : String? = nil
    dynamic var Timestamp : String? = nil
    dynamic var Market : String? = nil
    var Year = RealmOptional<Int>()
    dynamic var Make : String? = nil
    dynamic var Model : String? = nil
    dynamic var VehicleType : String? = nil
    dynamic var BodyType : String? = nil
    dynamic var DriveType : String? = nil
    var FuelTankSize : Float = 0
    var EPAFuelEfficiency : Float = 0
    dynamic var VehicleEngine : Engine? = nil
    dynamic var VehicleTransmission : Transmission? = nil
    var Warranties = List<Warranty>()
    var Recalls = List<Recall>()
    var ServiceBulletins = List<ServiceBulletin>()
    
    required convenience init?(_ map: Map) {
        self.init();
    }
    
    func mapping(map: Map) {
        
        var warranties = Array<Warranty>()
        warranties <- map["Warranties"]
        
        for warranty in warranties {
            self.Warranties.append(warranty)
        }
        
        var recalls = Array<Recall>()
        recalls <- map["Recalls"]
        
        for recall in recalls {
            self.Recalls.append(recall)
        }

        var serviceBulletins = Array<ServiceBulletin>()
        serviceBulletins <- map["ServiceBulletins"]
        
        for serviceBulletin in serviceBulletins {<commit_msg>Setting the Vehicle's VIN as the primary key of the VIN Details table<commit_after>//
//  VIN.swift
//  Motion
//
//  Created by <NAME> on 2016-02-26.
//  Copyright © 2016 Mojio. All rights reserved.
//

import UIKit
import RealmSwift
import ObjectMapper

class Vin: Object, Mappable {
    
    dynamic var VIN : String? = nil
    dynamic var Timestamp : String? = nil
    dynamic var Market : String? = nil
    var Year = RealmOptional<Int>()
    dynamic var Make : String? = nil
    dynamic var Model : String? = nil
    dynamic var VehicleType : String? = nil
    dynamic var BodyType : String? = nil
    dynamic var DriveType : String? = nil
    var FuelTankSize : Float = 0
    var EPAFuelEfficiency : Float = 0
    dynamic var VehicleEngine : Engine? = nil
    dynamic var VehicleTransmission : Transmission? = nil
    var Warranties = List<Warranty>()
    var Recalls = List<Recall>()
    var ServiceBulletins = List<ServiceBulletin>()
    
    required convenience init?(_ map: Map) {
        self.init();
    }
    
    override static func primaryKey() -> String? {
        return "VIN"
    }
    
    func mapping(map: Map) {
        
        var warranties = Array<Warranty>()
        warranties <- map["Warranties"]
        
        for warranty in warranties {
            self.Warranties.append(warranty)
        }
        
        var recalls = Array<Recall>()
        recalls <- map["Recalls"]
        
        for recall in recalls {
            self.Recalls.append(recall)
        }

        var serviceBulletins = Array<ServiceBulletin>()
        serviceBulletins <- map["ServiceBulletins"]
        
        for serviceBulletin in serviceBulletins {
{'fraction_non_alphanumeric': 0.09252891528602689, 'fraction_numerical': 0.0087527352297593, 'mean_word_length': 2.235591506572295, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1772497', 'n_tokens_mistral': 986, 'n_tokens_neox': 913, 'n_words': 285}