OSDN Git Service

HMKCAirBaseをSwiftに変換した
authormasakih <masakih@users.sourceforge.jp>
Tue, 31 Jan 2017 14:02:14 +0000 (23:02 +0900)
committermasakih <masakih@users.sourceforge.jp>
Tue, 31 Jan 2017 14:02:14 +0000 (23:02 +0900)
14 files changed:
KCD.xcodeproj/project.pbxproj
KCD/HMAirBaseCommand.swift
KCD/HMAirBaseWindowController.swift
KCD/HMAirCorpsSupplyCommand.swift
KCD/HMKCAirBase+CoreDataClass.m [deleted file]
KCD/HMKCAirBase+CoreDataProperties.h [deleted file]
KCD/HMKCAirBase+CoreDataProperties.m [deleted file]
KCD/HMKCAirBase.h [deleted file]
KCD/HMKCAirBase.swift [new file with mode: 0644]
KCD/HMKCAirBasePlaneInfo+CoreDataClass.m
KCD/HMSetActionCommand.swift
KCD/HMSetPlaneCommand.swift
KCD/KCD-Bridging-Header.h
KCD/KCD.xcdatamodeld/KCD.xcdatamodel/contents

index b82fbc2..580e263 100644 (file)
@@ -27,6 +27,7 @@
                F42A8FDA1E3DF2230099DC1D /* HMKCShipObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42A8FD91E3DF2230099DC1D /* HMKCShipObject.swift */; };
                F42A8FDC1E40B9FE0099DC1D /* HMKCSlotItemObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42A8FDB1E40B9FE0099DC1D /* HMKCSlotItemObject.swift */; };
                F42A8FDE1E40C6DF0099DC1D /* HMKCQuest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42A8FDD1E40C6DF0099DC1D /* HMKCQuest.swift */; };
+               F42A8FE01E40CC050099DC1D /* HMKCAirBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42A8FDF1E40CC050099DC1D /* HMKCAirBase.swift */; };
                F42CFE161E3BA1E1000B4F9B /* HMEnhancementListItem2.plist in Resources */ = {isa = PBXBuildFile; fileRef = F42CFE151E3BA1E1000B4F9B /* HMEnhancementListItem2.plist */; };
                F42CFE181E3C12AA000B4F9B /* HMScreenshotInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42CFE171E3C12AA000B4F9B /* HMScreenshotInformation.swift */; };
                F42CFE1A1E3C726D000B4F9B /* UserDefaultsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = F42CFE191E3C726D000B4F9B /* UserDefaultsExtension.swift */; };
                F47215AA1E1F96B60083D3BC /* HMResourceHistoryDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47215A91E1F96B60083D3BC /* HMResourceHistoryDataStore.swift */; };
                F47215AC1E1FA2460083D3BC /* HMTemporaryDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47215AB1E1FA2460083D3BC /* HMTemporaryDataStore.swift */; };
                F47215B01E1FEACC0083D3BC /* HMServerDataStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = F47215AF1E1FEACC0083D3BC /* HMServerDataStore.swift */; };
-               F48A705C1DE58A38005DFC0B /* HMKCAirBase+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F48A70551DE58A38005DFC0B /* HMKCAirBase+CoreDataClass.m */; };
-               F48A705D1DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F48A70571DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.m */; };
                F48A705E1DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataClass.m in Sources */ = {isa = PBXBuildFile; fileRef = F48A70591DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataClass.m */; };
                F48A705F1DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataProperties.m in Sources */ = {isa = PBXBuildFile; fileRef = F48A705B1DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataProperties.m */; };
                F490977B1E19C3910085A45D /* HMSuppliesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F490977A1E19C3910085A45D /* HMSuppliesView.swift */; };
                F42A8FD91E3DF2230099DC1D /* HMKCShipObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMKCShipObject.swift; sourceTree = "<group>"; };
                F42A8FDB1E40B9FE0099DC1D /* HMKCSlotItemObject.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMKCSlotItemObject.swift; sourceTree = "<group>"; };
                F42A8FDD1E40C6DF0099DC1D /* HMKCQuest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMKCQuest.swift; sourceTree = "<group>"; };
+               F42A8FDF1E40CC050099DC1D /* HMKCAirBase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMKCAirBase.swift; sourceTree = "<group>"; };
                F42CBB201D1ED41D004C2AE2 /* LocalData 3.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "LocalData 3.xcdatamodel"; sourceTree = "<group>"; };
                F42CFE151E3BA1E1000B4F9B /* HMEnhancementListItem2.plist */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = HMEnhancementListItem2.plist; sourceTree = "<group>"; };
                F42CFE171E3C12AA000B4F9B /* HMScreenshotInformation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMScreenshotInformation.swift; sourceTree = "<group>"; };
                F47215A91E1F96B60083D3BC /* HMResourceHistoryDataStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMResourceHistoryDataStore.swift; sourceTree = "<group>"; };
                F47215AB1E1FA2460083D3BC /* HMTemporaryDataStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMTemporaryDataStore.swift; sourceTree = "<group>"; };
                F47215AF1E1FEACC0083D3BC /* HMServerDataStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HMServerDataStore.swift; sourceTree = "<group>"; };
-               F48A70541DE58A38005DFC0B /* HMKCAirBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMKCAirBase.h; sourceTree = "<group>"; };
-               F48A70551DE58A38005DFC0B /* HMKCAirBase+CoreDataClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HMKCAirBase+CoreDataClass.m"; sourceTree = "<group>"; };
-               F48A70561DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HMKCAirBase+CoreDataProperties.h"; sourceTree = "<group>"; };
-               F48A70571DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HMKCAirBase+CoreDataProperties.m"; sourceTree = "<group>"; };
                F48A70581DE58A38005DFC0B /* HMKCAirBasePlaneInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HMKCAirBasePlaneInfo.h; sourceTree = "<group>"; };
                F48A70591DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataClass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "HMKCAirBasePlaneInfo+CoreDataClass.m"; sourceTree = "<group>"; };
                F48A705A1DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataProperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "HMKCAirBasePlaneInfo+CoreDataProperties.h"; sourceTree = "<group>"; };
                                F42A8FD91E3DF2230099DC1D /* HMKCShipObject.swift */,
                                F42A8FDB1E40B9FE0099DC1D /* HMKCSlotItemObject.swift */,
                                F42A8FDD1E40C6DF0099DC1D /* HMKCQuest.swift */,
-                               F48A70541DE58A38005DFC0B /* HMKCAirBase.h */,
-                               F48A70551DE58A38005DFC0B /* HMKCAirBase+CoreDataClass.m */,
-                               F48A70561DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.h */,
-                               F48A70571DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.m */,
+                               F42A8FDF1E40CC050099DC1D /* HMKCAirBase.swift */,
                                F48A70581DE58A38005DFC0B /* HMKCAirBasePlaneInfo.h */,
                                F48A70591DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataClass.m */,
                                F48A705A1DE58A38005DFC0B /* HMKCAirBasePlaneInfo+CoreDataProperties.h */,
                                F4AA59381E1DC4C3001667AF /* HMMapAreaTransformaer.swift in Sources */,
                                F47215A21E1F38280083D3BC /* HMQueue.swift in Sources */,
                                F42CFE261E3D91FD000B4F9B /* HMKCMasterMapArea.swift in Sources */,
+                               F42A8FE01E40CC050099DC1D /* HMKCAirBase.swift in Sources */,
                                F44BC6F11E23A10C004644E3 /* HMRemodelSlotItemCommand.swift in Sources */,
                                F4048A9F1E19308A008ACFD6 /* HMStrokeTextFieldCell.swift in Sources */,
                                F4CF25AA1E338ED000C02A66 /* HMJSONTracker.swift in Sources */,
                                F44BC6E91E232B15004644E3 /* HMKaisouLockCommand.swift in Sources */,
                                F44BC6EF1E239FB1004644E3 /* HMRemodelSlotCommand.swift in Sources */,
                                F42A8FD41E3DD57E0099DC1D /* HMKCMasterSlotItemEquipTypeObject.swift in Sources */,
-                               F48A705D1DE58A38005DFC0B /* HMKCAirBase+CoreDataProperties.m in Sources */,
                                F4AA59161E1C9C5D001667AF /* ValueTransformerRegister.swift in Sources */,
                                F4CF25DE1E38E06300C02A66 /* HMEnhancementListItem.swift in Sources */,
                                F42A8FD61E3DE2C60099DC1D /* HMKCMaterial.swift in Sources */,
                                F44BC6C11E221293004644E3 /* HMAirCorpsChangeNameCommand.swift in Sources */,
                                F4CF25BE1E361F4600C02A66 /* HMNyukyoDockStatus.swift in Sources */,
                                F490978B1E1B38F00085A45D /* HMTiledImageView.swift in Sources */,
-                               F48A705C1DE58A38005DFC0B /* HMKCAirBase+CoreDataClass.m in Sources */,
                                F4A0D7111E2FA5AF00224DCE /* HMMidnightBattleCommand.swift in Sources */,
                                F4A0D71B1E30D77B00224DCE /* HMJSONCommand.swift in Sources */,
                                F44BC6F51E23D593004644E3 /* HMPowerUpCommand.swift in Sources */,
index 61d09c6..2f68846 100644 (file)
@@ -33,7 +33,7 @@ class HMAirBaseCommand: HMJSONCommand {
             print("object is not AirBase")
             return false
         }
-        if airbase.planeInfo == nil || airbase.planeInfo?.count == 0 {
+        if airbase.planeInfo.count == 0 {
             let moc = airbase.managedObjectContext
             let new: [HMKCAirBasePlaneInfo] = (0..<4).flatMap {_ in
                 NSEntityDescription.insertNewObject(forEntityName: "AirBasePlaneInfo", into: moc!) as? HMKCAirBasePlaneInfo
@@ -46,8 +46,7 @@ class HMAirBaseCommand: HMJSONCommand {
                 print("value is wrong")
                 return false
         }
-        guard let infosSet = airbase.planeInfo,
-            let infos = infosSet.array as? [HMKCAirBasePlaneInfo]
+        guard let infos = airbase.planeInfo.array as? [HMKCAirBasePlaneInfo]
             else { print("airbase is wrong")
                 return false
         }
index 5d250b9..d9dffcc 100644 (file)
@@ -49,7 +49,7 @@ class HMAirBaseWindowController: NSWindowController {
         guard let content = airBaseController.content as? NSArray else { return }
         var area: [Int] = []
         content.forEach {
-            if let i = ($0 as? HMKCAirBase)?.area_id as? Int {
+            if let i = ($0 as? HMKCAirBase)?.area_id {
                 if !area.contains(i) {
                     area.append(i)
                 }
@@ -94,7 +94,7 @@ class HMAirBaseWindowController: NSWindowController {
         guard let content = airBaseController.content as? NSArray else { return }
         let area = NSCountedSet()
         content.forEach {
-            if let i = ($0 as? HMKCAirBase)?.area_id as? Int {
+            if let i = ($0 as? HMKCAirBase)?.area_id {
                 area.add(i)
             }
         }
index e2dc326..82159e1 100644 (file)
@@ -26,10 +26,9 @@ class HMAirCorpsSupplyCommand: HMJSONCommand {
         let p = NSPredicate(format: "area_id == %@ AND rid == %@", argumentArray: [areaId, rId])
         guard let a = try? store?.objects(withEntityName: "AirBase", predicate: p),
             let airBases = a as? [HMKCAirBase],
-            airBases.count != 0,
-            let planes = airBases[0].planeInfo
+            let airBase = airBases.first
             else { return }
-        
+        let planes = airBase.planeInfo
         let squadronIds = squadronIdsString
             .components(separatedBy: ",")
             .flatMap { Int($0) }
@@ -46,7 +45,7 @@ class HMAirCorpsSupplyCommand: HMJSONCommand {
             if let v = planeInfo["api_count"] as? NSNumber { plane.count = v }
             if let v = planeInfo["api_max_count"] as? NSNumber { plane.max_count = v }
         }
-        if let v = data["api_distance"] as? NSNumber { airBases[0].distance = v }
+        if let v = data["api_distance"] as? Int { airBases[0].distance = v }
         
         guard let m = try? store?.objects(withEntityName: "Material", predicate: nil),
             let material = m as? [HMKCMaterial],
diff --git a/KCD/HMKCAirBase+CoreDataClass.m b/KCD/HMKCAirBase+CoreDataClass.m
deleted file mode 100644 (file)
index 50061a4..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-//
-//  HMKCAirBase+CoreDataClass.m
-//  KCD
-//
-//  Created by Hori,Masaki on 2016/11/23.
-//  Copyright © 2016年 Hori,Masaki. All rights reserved.
-//
-
-#import "HMKCAirBase.h"
-#import "HMKCAirBasePlaneInfo.h"
-@implementation HMKCAirBase
-
-@end
diff --git a/KCD/HMKCAirBase+CoreDataProperties.h b/KCD/HMKCAirBase+CoreDataProperties.h
deleted file mode 100644 (file)
index 2be73c3..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-//  HMKCAirBase+CoreDataProperties.h
-//  KCD
-//
-//  Created by Hori,Masaki on 2016/11/23.
-//  Copyright © 2016年 Hori,Masaki. All rights reserved.
-//
-
-#import "HMKCAirBase.h"
-
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface HMKCAirBase (CoreDataProperties)
-
-+ (NSFetchRequest<HMKCAirBase *> *)fetchRequest;
-
-@property (nullable, nonatomic, copy) NSNumber *rid;
-@property (nullable, nonatomic, copy) NSString *name;
-@property (nullable, nonatomic, copy) NSNumber *area_id;
-@property (nullable, nonatomic, copy) NSNumber *distance;
-@property (nullable, nonatomic, copy) NSNumber *action_kind;
-@property (nullable, nonatomic, retain) NSOrderedSet<HMKCAirBasePlaneInfo *> *planeInfo;
-
-@end
-
-@interface HMKCAirBase (CoreDataGeneratedAccessors)
-
-- (void)insertObject:(HMKCAirBasePlaneInfo *)value inPlaneInfoAtIndex:(NSUInteger)idx;
-- (void)removeObjectFromPlaneInfoAtIndex:(NSUInteger)idx;
-- (void)insertPlaneInfo:(NSArray<HMKCAirBasePlaneInfo *> *)value atIndexes:(NSIndexSet *)indexes;
-- (void)removePlaneInfoAtIndexes:(NSIndexSet *)indexes;
-- (void)replaceObjectInPlaneInfoAtIndex:(NSUInteger)idx withObject:(HMKCAirBasePlaneInfo *)value;
-- (void)replacePlaneInfoAtIndexes:(NSIndexSet *)indexes withPlaneInfo:(NSArray<HMKCAirBasePlaneInfo *> *)values;
-- (void)addPlaneInfoObject:(HMKCAirBasePlaneInfo *)value;
-- (void)removePlaneInfoObject:(HMKCAirBasePlaneInfo *)value;
-- (void)addPlaneInfo:(NSOrderedSet<HMKCAirBasePlaneInfo *> *)values;
-- (void)removePlaneInfo:(NSOrderedSet<HMKCAirBasePlaneInfo *> *)values;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/KCD/HMKCAirBase+CoreDataProperties.m b/KCD/HMKCAirBase+CoreDataProperties.m
deleted file mode 100644 (file)
index f2f05e0..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-//  HMKCAirBase+CoreDataProperties.m
-//  KCD
-//
-//  Created by Hori,Masaki on 2016/11/23.
-//  Copyright © 2016年 Hori,Masaki. All rights reserved.
-//
-
-#import "HMKCAirBase+CoreDataProperties.h"
-
-@implementation HMKCAirBase (CoreDataProperties)
-
-+ (NSFetchRequest<HMKCAirBase *> *)fetchRequest {
-       return [[NSFetchRequest alloc] initWithEntityName:@"AirBase"];
-}
-
-@dynamic rid;
-@dynamic name;
-@dynamic area_id;
-@dynamic distance;
-@dynamic action_kind;
-@dynamic planeInfo;
-
-@end
diff --git a/KCD/HMKCAirBase.h b/KCD/HMKCAirBase.h
deleted file mode 100644 (file)
index 1a7ad37..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-//  HMKCAirBase+CoreDataClass.h
-//  KCD
-//
-//  Created by Hori,Masaki on 2016/11/23.
-//  Copyright © 2016年 Hori,Masaki. All rights reserved.
-//
-
-#import <Foundation/Foundation.h>
-#import <CoreData/CoreData.h>
-#import "HMKCManagedObject.h"
-
-@class HMKCAirBasePlaneInfo;
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface HMKCAirBase : HMKCManagedObject
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#import "HMKCAirBase+CoreDataProperties.h"
diff --git a/KCD/HMKCAirBase.swift b/KCD/HMKCAirBase.swift
new file mode 100644 (file)
index 0000000..d2c25bc
--- /dev/null
@@ -0,0 +1,18 @@
+//
+//  HMKCAirBase.swift
+//  KCD
+//
+//  Created by Hori,Masaki on 2017/01/31.
+//  Copyright © 2017年 Hori,Masaki. All rights reserved.
+//
+
+import Foundation
+
+class HMKCAirBase: HMKCManagedObject {
+    @NSManaged var rid: Int
+    @NSManaged var name: String
+    @NSManaged var area_id: Int
+    @NSManaged var distance: Int
+    @NSManaged var action_kind: Int
+    @NSManaged var planeInfo: NSOrderedSet
+}
index 46a1a99..d97f403 100644 (file)
@@ -7,7 +7,6 @@
 //
 
 #import "HMKCAirBasePlaneInfo.h"
-#import "HMKCAirBase.h"
 @implementation HMKCAirBasePlaneInfo
 
 @end
index f803efc..e7d0d28 100644 (file)
@@ -22,20 +22,17 @@ class HMSetActionCommand: HMJSONCommand {
         let dIds = rIdsString.components(separatedBy: ",")
         let actionKinds = actionKindsString.components(separatedBy: ",")
         if dIds.count != actionKinds.count { print("missmatch count") }
-        
-        let actions: [Int] = actionKinds.map {
-            guard let type = Int($0) else { return -1 }
-            return type
-        }
+        let rIds = dIds.map { Int($0) ?? -1 }
+        let actions: [Int] = actionKinds.map { Int($0) ?? -1 }
         
         let store = HMServerDataStore.oneTimeEditor()
-        zip(dIds, actions).forEach { (z :(rId: String, action: Int)) in
-            let p = NSPredicate(format: "area_id == %@ AND rid == %@", areaId, z.rId)
+        zip(rIds, actions).forEach { (rId: Int, action: Int) in
+            let p = NSPredicate(format: "area_id == %@ AND rid == %ld", areaId, rId)
             guard let ab = try? store?.objects(withEntityName: "AirBase", predicate: p),
                 let airBases = ab as? [HMKCAirBase],
                 let airBase = airBases.first
                 else { return print("AirBase is not found") }
-            airBase.action_kind = z.action as NSNumber
+            airBase.action_kind = action
         }
     }
 }
index fc3cdc7..cb06267 100644 (file)
@@ -21,7 +21,7 @@ class HMSetPlaneCommand: HMJSONCommand {
             let squadronId = Int(squadronIdString)
             else { return print("Argument is wrong") }
         guard let data = json[dataKey] as? [String:Any],
-            let distance = data["api_distance"] as? NSNumber,
+            let distance = data["api_distance"] as? Int,
             let bauxite = data["api_after_bauxite"] as? Int,
             let planInfos = data["api_plane_info"] as? [[String:Any]],
             let planInfo = planInfos.first
@@ -39,8 +39,8 @@ class HMSetPlaneCommand: HMJSONCommand {
             let airbases = ab as? [HMKCAirBase],
             let airbase = airbases.first
             else { return print("AirBase is not found") }
-        guard let planes = airbase.planeInfo,
-            planes.count >= squadronId,
+        let planes = airbase.planeInfo
+        guard planes.count >= squadronId,
             let plane = planes[squadronId - 1] as? HMKCAirBasePlaneInfo
             else { return print("AirBase is wrong") }
         plane.cond = cond
index a922c89..e5a4fed 100644 (file)
@@ -21,8 +21,6 @@
 #import "HMKenzoHistory.h"
 #import "HMDropShipHistory.h"
 
-#import "HMKCAirBase.h"
-
 #import "HMKCBattle.h"
 #import "HMKCDamage.h"
 #import "HMKCAirBasePlaneInfo.h"
index 011e310..22117d9 100644 (file)
@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="11759" systemVersion="16D32" minimumToolsVersion="Xcode 4.3" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
-    <entity name="AirBase" representedClassName="HMKCAirBase" syncable="YES">
-        <attribute name="action_kind" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="area_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="distance" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
-        <attribute name="rid" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+    <entity name="AirBase" representedClassName="KCD.HMKCAirBase" syncable="YES">
+        <attribute name="action_kind" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="area_id" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="distance" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
+        <attribute name="name" attributeType="String" defaultValueString="  " syncable="YES"/>
+        <attribute name="rid" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <relationship name="planeInfo" optional="YES" toMany="YES" maxCount="4" deletionRule="Cascade" ordered="YES" destinationEntity="AirBasePlaneInfo" inverseName="airBase" inverseEntity="AirBasePlaneInfo" syncable="YES"/>
     </entity>
     <entity name="AirBasePlaneInfo" representedClassName="HMKCAirBasePlaneInfo" syncable="YES">