OSDN Git Service

CoreDataの不要なプロパティを削除
authormasakih <masakih@users.sourceforge.jp>
Sun, 12 Aug 2018 11:35:24 +0000 (20:35 +0900)
committermasakih <masakih@users.sourceforge.jp>
Sun, 12 Aug 2018 11:35:24 +0000 (20:35 +0900)
KCD/Basic.swift
KCD/BasicMapper.swift
KCD/Deck.swift
KCD/DeckMapper.swift
KCD/KCD.xcdatamodeld/KCD.xcdatamodel/contents
KCD/KenzoDock.swift
KCD/KenzoDockMapper.swift
KCD/MasterSlotItem.swift
KCD/MasterSlotItemMapper.swift
KCD/NyukyoDock.swift
KCD/NyukyoDockMapper.swift

index 64ee85a..2a3132c 100644 (file)
@@ -13,7 +13,6 @@ final class Basic: KCManagedObject {
     
     @NSManaged var active_flag: NSNumber?
     @NSManaged var comment: String?
-    @NSManaged var comment_id: NSNumber?
     @NSManaged var count_deck: Int
     @NSManaged var count_kdock: Int
     @NSManaged var count_ndock: Int
@@ -34,11 +33,9 @@ final class Basic: KCManagedObject {
     @NSManaged var max_kagu: Int
     @NSManaged var max_slotitem: Int
     @NSManaged var medals: Int
-    @NSManaged var member_id: NSNumber?
     @NSManaged var ms_count: NSNumber?
     @NSManaged var ms_success: NSNumber?
     @NSManaged var nickname: String
-    @NSManaged var nickname_id: NSNumber?
     @NSManaged var playtime: Int
     @NSManaged var pt_challenged: NSNumber?
     @NSManaged var pt_challenged_win: NSNumber?
index 087f8ab..18c55fb 100644 (file)
@@ -18,7 +18,8 @@ final class BasicMapper: JSONMapper {
         self.apiResponse = apiResponse
         self.configuration = MappingConfiguration(entity: Basic.self,
                                                   dataKeys: BasicMapper.dataKeys(apiResponse),
-                                                  editorStore: ServerDataStore.oneTimeEditor())
+                                                  editorStore: ServerDataStore.oneTimeEditor(),
+                                                  ignoreKeys: ["api_comment_id", "api_member_id", "api_nickname_id"])
     }
     
     private class func dataKeys(_ apiResponse: APIResponse) -> [String] {
index 2c31732..2898056 100644 (file)
@@ -11,15 +11,12 @@ import Cocoa
 // swiftlint:disable identifier_name
 final class Deck: KCManagedObject {
     
-    @NSManaged var flagship: NSNumber?
     @NSManaged var id: Int
-    @NSManaged var member_id: NSNumber?
     @NSManaged var mission_0: Int
     @NSManaged var mission_1: Int
     @NSManaged var mission_2: Int
     @NSManaged var mission_3: Int
     @NSManaged var name: String
-    @NSManaged var name_id: NSNumber?
     @NSManaged var ship_0: Int
     @NSManaged var ship_1: Int
     @NSManaged var ship_2: Int
index b3fcf45..1cbb939 100644 (file)
@@ -18,7 +18,8 @@ final class DeckMapper: JSONMapper {
         self.apiResponse = apiResponse
         self.configuration = MappingConfiguration(entity: Deck.self,
                                                   dataKeys: DeckMapper.dataKeys(apiResponse),
-                                                  editorStore: ServerDataStore.oneTimeEditor())
+                                                  editorStore: ServerDataStore.oneTimeEditor(),
+                                                  ignoreKeys: ["api_flagship", "api_member_id", "api_name_id"])
     }
     
     private class func dataKeys(_ apiResponse: APIResponse) -> [String] {
index cd61ad1..93e7c18 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="13533" systemVersion="17B48" minimumToolsVersion="Xcode 4.3" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
+<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14135" systemVersion="17G65" minimumToolsVersion="Xcode 4.3" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
     <entity name="AirBase" representedClassName="KCD.AirBase" 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"/>
@@ -20,7 +20,6 @@
     <entity name="Basic" representedClassName="KCD.Basic" syncable="YES">
         <attribute name="active_flag" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="comment" optional="YES" attributeType="String" syncable="YES"/>
-        <attribute name="comment_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="count_deck" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="count_kdock" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="count_ndock" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="max_kagu" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="max_slotitem" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="medals" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="member_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="ms_count" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="ms_success" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="nickname" optional="YES" attributeType="String" syncable="YES"/>
-        <attribute name="nickname_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="playtime" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="pt_challenged" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="pt_challenged_win" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="tutorial_progress" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
     </entity>
     <entity name="Deck" representedClassName="KCD.Deck" syncable="YES">
-        <attribute name="flagship" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="id" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" indexed="YES" syncable="YES"/>
-        <attribute name="member_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="mission_0" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="mission_1" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="mission_2" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="mission_3" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="name" attributeType="String" syncable="YES"/>
-        <attribute name="name_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="ship_0" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="ship_1" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="ship_2" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
@@ -87,7 +81,6 @@
         <attribute name="item3" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="item4" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="item5" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="member_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="state" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
     </entity>
     <entity name="MasterFurniture" representedClassName="KCD.MasterFurniture" syncable="YES">
         <attribute name="type_2" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="type_3" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="type_4" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="usebull" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <relationship name="slotItems" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="SlotItem" inverseName="master_slotItem" inverseEntity="SlotItem" syncable="YES"/>
     </entity>
     <entity name="MasterSlotItemEquipType" representedClassName="KCD.MasterSlotItemEquipType" syncable="YES">
         <attribute name="item2" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="item3" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="item4" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
-        <attribute name="member_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="ship_id" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
         <attribute name="state" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
     </entity>
     <elements>
         <element name="AirBase" positionX="9" positionY="153" width="128" height="135"/>
         <element name="AirBasePlaneInfo" positionX="18" positionY="162" width="128" height="150"/>
-        <element name="Basic" positionX="0" positionY="0" width="128" height="645"/>
-        <element name="Deck" positionX="0" positionY="0" width="128" height="285"/>
-        <element name="KenzoDock" positionX="0" positionY="0" width="128" height="210"/>
+        <element name="Basic" positionX="0" positionY="0" width="128" height="600"/>
+        <element name="Deck" positionX="0" positionY="0" width="128" height="240"/>
+        <element name="KenzoDock" positionX="0" positionY="0" width="128" height="195"/>
         <element name="MasterFurniture" positionX="0" positionY="0" width="128" height="30"/>
         <element name="MasterMapArea" positionX="0" positionY="0" width="128" height="90"/>
         <element name="MasterMapCell" positionX="0" positionY="0" width="128" height="135"/>
         <element name="MasterMapInfo" positionX="0" positionY="0" width="128" height="285"/>
         <element name="MasterMission" positionX="0" positionY="0" width="128" height="240"/>
         <element name="MasterShip" positionX="0" positionY="0" width="128" height="30"/>
-        <element name="MasterSlotItem" positionX="0" positionY="0" width="128" height="585"/>
+        <element name="MasterSlotItem" positionX="0" positionY="0" width="128" height="570"/>
         <element name="MasterSlotItemEquipType" positionX="0" positionY="0" width="128" height="90"/>
         <element name="MasterSType" positionX="0" positionY="0" width="128" height="135"/>
         <element name="MasterUseItem" positionX="0" positionY="0" width="128" height="30"/>
         <element name="Material" positionX="0" positionY="0" width="128" height="165"/>
-        <element name="NyukyoDock" positionX="0" positionY="0" width="128" height="195"/>
+        <element name="NyukyoDock" positionX="0" positionY="0" width="128" height="180"/>
         <element name="Quest" positionX="0" positionY="0" width="128" height="240"/>
         <element name="Ship" positionX="0" positionY="0" width="128" height="870"/>
         <element name="SlotItem" positionX="0" positionY="0" width="128" height="165"/>
index 6326c49..ab56142 100644 (file)
@@ -20,6 +20,5 @@ final class KenzoDock: KCManagedObject {
     @NSManaged var item3: Int
     @NSManaged var item4: Int
     @NSManaged var item5: Int
-    @NSManaged var member_id: NSNumber?
     @NSManaged var state: Int
 }
index 7357eb2..58349fc 100644 (file)
@@ -18,7 +18,8 @@ final class KenzoDockMapper: JSONMapper {
         self.apiResponse = apiResponse
         self.configuration = MappingConfiguration(entity: KenzoDock.self,
                                                   dataKeys: KenzoDockMapper.dataKeys(apiResponse),
-                                                  editorStore: ServerDataStore.oneTimeEditor())
+                                                  editorStore: ServerDataStore.oneTimeEditor(),
+                                                  ignoreKeys: ["api_member_id"])
     }
     
     private class func dataKeys(_ apiResponse: APIResponse) -> [String] {
index 5248e94..a0b630a 100644 (file)
@@ -42,6 +42,5 @@ final class MasterSlotItem: KCManagedObject {
     @NSManaged var type_1: Int
     @NSManaged var type_2: Int
     @NSManaged var type_3: Int
-    @NSManaged var usebull: NSNumber?
     @NSManaged var slotItems: Set<SlotItem>
 }
index 5c04ad7..43f2d5b 100644 (file)
@@ -14,7 +14,7 @@ final class MasterSlotItemMapper: JSONMapper {
     let configuration = MappingConfiguration(entity: MasterSlotItem.self,
                                              dataKeys: ["api_data", "api_mst_slotitem"],
                                              editorStore: ServerDataStore.oneTimeEditor(),
-                                             ignoreKeys: ["api_version"])
+                                             ignoreKeys: ["api_version", "api_usebull"])
     
     required init(_ apiResponse: APIResponse) {
         
index 4f84210..aab95db 100644 (file)
@@ -18,7 +18,6 @@ final class NyukyoDock: KCManagedObject {
     @NSManaged var item2: NSNumber?
     @NSManaged var item3: NSNumber?
     @NSManaged var item4: NSNumber?
-    @NSManaged var member_id: NSNumber?
     @NSManaged var ship_id: Int
     @NSManaged var state: Int
 }
index 15c5f9d..1ee4a0d 100644 (file)
@@ -18,7 +18,8 @@ final class NyukyoDockMapper: JSONMapper {
         self.apiResponse = apiResponse
         self.configuration = MappingConfiguration(entity: NyukyoDock.self,
                                                   dataKeys: NyukyoDockMapper.dataKeys(apiResponse),
-                                                  editorStore: ServerDataStore.oneTimeEditor())
+                                                  editorStore: ServerDataStore.oneTimeEditor(),
+                                                  ignoreKeys: ["api_member_id"])
     }
     
     private class func dataKeys(_ apiResponse: APIResponse) -> [String] {