Skip to content

Commit 5f5e9e0

Browse files
committed
Use global class names for Core Data entities
1 parent 8f833b3 commit 5f5e9e0

21 files changed

Lines changed: 40 additions & 20 deletions

Sources/WordPressData/Resources/WordPress.xcdatamodeld/WordPress 158.xcdatamodel/contents

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<fetchIndexElement property="blogs" type="Binary" order="ascending"/>
5555
</fetchIndex>
5656
</entity>
57-
<entity name="AccountSettings" representedClassName=".ManagedAccountSettings" syncable="YES">
57+
<entity name="AccountSettings" representedClassName="ManagedAccountSettings" syncable="YES">
5858
<attribute name="aboutMe" attributeType="String" syncable="YES"/>
5959
<attribute name="blockEmailNotifications" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="NO" syncable="YES"/>
6060
<attribute name="displayName" attributeType="String" syncable="YES"/>
@@ -198,7 +198,7 @@
198198
</fetchIndex>
199199
<userInfo/>
200200
</entity>
201-
<entity name="BlogAuthor" representedClassName=".BlogAuthor" syncable="YES">
201+
<entity name="BlogAuthor" representedClassName="BlogAuthor" syncable="YES">
202202
<attribute name="avatarURL" optional="YES" attributeType="String" syncable="YES"/>
203203
<attribute name="deletedFromBlog" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
204204
<attribute name="displayName" optional="YES" attributeType="String" syncable="YES"/>
@@ -209,7 +209,7 @@
209209
<attribute name="username" optional="YES" attributeType="String" syncable="YES"/>
210210
<relationship name="blog" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Blog" inverseName="authors" inverseEntity="Blog" syncable="YES"/>
211211
</entity>
212-
<entity name="BloggingPrompt" representedClassName=".BloggingPrompt" syncable="YES">
212+
<entity name="BloggingPrompt" representedClassName="BloggingPrompt" syncable="YES">
213213
<attribute name="additionalPostTags" optional="YES" attributeType="Transformable" valueTransformerName="NSSecureUnarchiveFromData" customClassName="[String]" syncable="YES"/>
214214
<attribute name="answerCount" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
215215
<attribute name="answered" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
@@ -220,15 +220,15 @@
220220
<attribute name="siteID" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
221221
<attribute name="text" attributeType="String" defaultValueString="" syncable="YES"/>
222222
</entity>
223-
<entity name="BloggingPromptSettings" representedClassName=".BloggingPromptSettings" syncable="YES">
223+
<entity name="BloggingPromptSettings" representedClassName="BloggingPromptSettings" syncable="YES">
224224
<attribute name="isPotentialBloggingSite" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
225225
<attribute name="promptCardEnabled" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES" syncable="YES"/>
226226
<attribute name="promptRemindersEnabled" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
227227
<attribute name="reminderTime" attributeType="String" defaultValueString="" syncable="YES"/>
228228
<attribute name="siteID" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
229229
<relationship name="reminderDays" maxCount="1" deletionRule="Cascade" destinationEntity="BloggingPromptSettingsReminderDays" inverseName="settings" inverseEntity="BloggingPromptSettingsReminderDays" syncable="YES"/>
230230
</entity>
231-
<entity name="BloggingPromptSettingsReminderDays" representedClassName=".BloggingPromptSettingsReminderDays" syncable="YES">
231+
<entity name="BloggingPromptSettingsReminderDays" representedClassName="BloggingPromptSettingsReminderDays" syncable="YES">
232232
<attribute name="friday" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
233233
<attribute name="monday" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
234234
<attribute name="saturday" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
@@ -238,7 +238,7 @@
238238
<attribute name="wednesday" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES" syncable="YES"/>
239239
<relationship name="settings" maxCount="1" deletionRule="Cascade" destinationEntity="BloggingPromptSettings" inverseName="reminderDays" inverseEntity="BloggingPromptSettings" syncable="YES"/>
240240
</entity>
241-
<entity name="BlogSettings" representedClassName=".BlogSettings" syncable="YES">
241+
<entity name="BlogSettings" representedClassName="BlogSettings" syncable="YES">
242242
<attribute name="ampEnabled" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
243243
<attribute name="ampSupported" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
244244
<attribute name="commentsAllowed" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
@@ -337,19 +337,19 @@
337337
</fetchIndex>
338338
<userInfo/>
339339
</entity>
340-
<entity name="DiffAbstractValue" representedClassName=".DiffAbstractValue" isAbstract="YES" syncable="YES">
340+
<entity name="DiffAbstractValue" representedClassName="DiffAbstractValue" isAbstract="YES" syncable="YES">
341341
<attribute name="diffOperation" optional="YES" attributeType="String" syncable="YES"/>
342342
<attribute name="diffType" optional="YES" attributeType="String" syncable="YES"/>
343343
<attribute name="index" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
344344
<attribute name="value" optional="YES" attributeType="String" syncable="YES"/>
345345
</entity>
346-
<entity name="DiffContentValue" representedClassName=".DiffContentValue" parentEntity="DiffAbstractValue" syncable="YES">
346+
<entity name="DiffContentValue" representedClassName="DiffContentValue" parentEntity="DiffAbstractValue" syncable="YES">
347347
<relationship name="revisionDiff" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="RevisionDiff" inverseName="contentDiffs" inverseEntity="RevisionDiff" syncable="YES"/>
348348
</entity>
349-
<entity name="DiffTitleValue" representedClassName=".DiffTitleValue" parentEntity="DiffAbstractValue" syncable="YES">
349+
<entity name="DiffTitleValue" representedClassName="DiffTitleValue" parentEntity="DiffAbstractValue" syncable="YES">
350350
<relationship name="revisionDiff" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="RevisionDiff" inverseName="titleDiffs" inverseEntity="RevisionDiff" syncable="YES"/>
351351
</entity>
352-
<entity name="Domain" representedClassName=".ManagedDomain" syncable="YES">
352+
<entity name="Domain" representedClassName="ManagedDomain" syncable="YES">
353353
<attribute name="autoRenewalDate" optional="YES" attributeType="String" syncable="YES"/>
354354
<attribute name="autoRenewing" optional="YES" attributeType="Boolean" usesScalarValueType="YES" syncable="YES"/>
355355
<attribute name="domainName" optional="YES" attributeType="String" syncable="YES"/>
@@ -497,7 +497,7 @@
497497
<attribute name="title" optional="YES" attributeType="String" syncable="YES"/>
498498
<relationship name="categories" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="PageTemplateCategory" inverseName="layouts" inverseEntity="PageTemplateCategory" syncable="YES"/>
499499
</entity>
500-
<entity name="Person" representedClassName=".ManagedPerson" syncable="YES">
500+
<entity name="Person" representedClassName="ManagedPerson" syncable="YES">
501501
<attribute name="avatarURL" optional="YES" attributeType="String" syncable="YES"/>
502502
<attribute name="creationDate" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
503503
<attribute name="displayName" attributeType="String" syncable="YES"/>
@@ -511,7 +511,7 @@
511511
<attribute name="userID" attributeType="Integer 64" usesScalarValueType="NO" syncable="YES"/>
512512
<attribute name="username" attributeType="String" syncable="YES"/>
513513
</entity>
514-
<entity name="Plan" representedClassName=".Plan" syncable="YES">
514+
<entity name="Plan" representedClassName="Plan" syncable="YES">
515515
<attribute name="features" attributeType="String" syncable="YES"/>
516516
<attribute name="groups" attributeType="String" syncable="YES"/>
517517
<attribute name="icon" attributeType="String" syncable="YES"/>
@@ -525,12 +525,12 @@
525525
<attribute name="supportPriority" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
526526
<attribute name="tagline" attributeType="String" syncable="YES"/>
527527
</entity>
528-
<entity name="PlanFeature" representedClassName=".PlanFeature" syncable="YES">
528+
<entity name="PlanFeature" representedClassName="PlanFeature" syncable="YES">
529529
<attribute name="slug" attributeType="String" syncable="YES"/>
530530
<attribute name="summary" attributeType="String" syncable="YES"/>
531531
<attribute name="title" attributeType="String" syncable="YES"/>
532532
</entity>
533-
<entity name="PlanGroup" representedClassName=".PlanGroup" syncable="YES">
533+
<entity name="PlanGroup" representedClassName="PlanGroup" syncable="YES">
534534
<attribute name="name" attributeType="String" syncable="YES"/>
535535
<attribute name="order" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
536536
<attribute name="slug" attributeType="String" syncable="YES"/>
@@ -570,7 +570,7 @@
570570
<attribute name="name" optional="YES" attributeType="String" syncable="YES"/>
571571
<relationship name="blog" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Blog" inverseName="postTypes" inverseEntity="Blog" syncable="YES"/>
572572
</entity>
573-
<entity name="PublicizeConnection" representedClassName=".PublicizeConnection" syncable="YES">
573+
<entity name="PublicizeConnection" representedClassName="PublicizeConnection" syncable="YES">
574574
<attribute name="connectionID" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
575575
<attribute name="dateExpires" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
576576
<attribute name="dateIssued" optional="YES" attributeType="Date" usesScalarValueType="NO" syncable="YES"/>
@@ -598,7 +598,7 @@
598598
<attribute name="toBePublicizedCount" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
599599
<relationship name="blog" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Blog" inverseName="publicizeInfo" inverseEntity="Blog"/>
600600
</entity>
601-
<entity name="PublicizeService" representedClassName=".PublicizeService" syncable="YES">
601+
<entity name="PublicizeService" representedClassName="PublicizeService" syncable="YES">
602602
<attribute name="connectURL" optional="YES" attributeType="String" syncable="YES"/>
603603
<attribute name="detail" optional="YES" attributeType="String" syncable="YES"/>
604604
<attribute name="externalUsersOnly" optional="YES" attributeType="Boolean" usesScalarValueType="NO" syncable="YES"/>
@@ -629,7 +629,7 @@
629629
<fetchIndexElement property="path" type="Binary" order="ascending"/>
630630
</fetchIndex>
631631
</entity>
632-
<entity name="ReaderCard" representedClassName=".ReaderCard" syncable="YES">
632+
<entity name="ReaderCard" representedClassName="ReaderCard" syncable="YES">
633633
<attribute name="sortRank" attributeType="Double" defaultValueString="0.0" usesScalarValueType="NO" syncable="YES"/>
634634
<relationship name="post" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="ReaderPost" inverseName="card" inverseEntity="ReaderPost" syncable="YES"/>
635635
<relationship name="sites" optional="YES" toMany="YES" deletionRule="Nullify" ordered="YES" destinationEntity="ReaderSiteTopic" inverseName="cards" inverseEntity="ReaderSiteTopic" syncable="YES"/>
@@ -766,7 +766,7 @@
766766
<attribute name="organizationID" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
767767
<attribute name="slug" optional="YES" attributeType="String" syncable="YES"/>
768768
</entity>
769-
<entity name="Revision" representedClassName=".Revision" syncable="YES">
769+
<entity name="Revision" representedClassName="Revision" syncable="YES">
770770
<attribute name="postAuthorId" optional="YES" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
771771
<attribute name="postContent" optional="YES" attributeType="String" syncable="YES"/>
772772
<attribute name="postDateGmt" optional="YES" attributeType="String" syncable="YES"/>
@@ -778,7 +778,7 @@
778778
<attribute name="siteId" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
779779
<relationship name="diff" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="RevisionDiff" inverseName="revision" inverseEntity="RevisionDiff" syncable="YES"/>
780780
</entity>
781-
<entity name="RevisionDiff" representedClassName=".RevisionDiff" syncable="YES">
781+
<entity name="RevisionDiff" representedClassName="RevisionDiff" syncable="YES">
782782
<attribute name="fromRevisionId" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
783783
<attribute name="toRevisionId" attributeType="Integer 64" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
784784
<attribute name="totalAdditions" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
@@ -787,7 +787,7 @@
787787
<relationship name="revision" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Revision" inverseName="diff" inverseEntity="Revision" syncable="YES"/>
788788
<relationship name="titleDiffs" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="DiffTitleValue" inverseName="revisionDiff" inverseEntity="DiffTitleValue" syncable="YES"/>
789789
</entity>
790-
<entity name="Role" representedClassName=".Role" syncable="YES">
790+
<entity name="Role" representedClassName="Role" syncable="YES">
791791
<attribute name="name" attributeType="String" syncable="YES"/>
792792
<attribute name="order" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="NO" syncable="YES"/>
793793
<attribute name="slug" attributeType="String" syncable="YES"/>

Sources/WordPressData/Swift/BlogAuthor.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import CoreData
33

4+
@objc(BlogAuthor)
45
public class BlogAuthor: NSManagedObject {
56
@NSManaged public var userID: NSNumber
67
@NSManaged public var username: String?

Sources/WordPressData/Swift/BlogSettings.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import Foundation
33

44
/// This class encapsulates all of the settings available for a Blog entity
55
///
6+
@objc(BlogSettings)
67
open class BlogSettings: NSManagedObject {
78
// MARK: - Relationships
89

Sources/WordPressData/Swift/BloggingPrompt+CoreDataClass.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import CoreData
33

4+
@objc(BloggingPrompt)
45
public class BloggingPrompt: NSManagedObject {
56

67
@nonobjc public class func fetchRequest() -> NSFetchRequest<BloggingPrompt> {

Sources/WordPressData/Swift/BloggingPromptSettings+CoreDataClass.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Foundation
22
import CoreData
33
import WordPressKit
44

5+
@objc(BloggingPromptSettings)
56
public class BloggingPromptSettings: NSManagedObject {
67

78
public static func of(_ blog: Blog) throws -> BloggingPromptSettings? {

Sources/WordPressData/Swift/BloggingPromptSettingsReminderDays+CoreDataClass.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import Foundation
22
import CoreData
33
import WordPressKit
44

5+
@objc(BloggingPromptSettingsReminderDays)
56
public class BloggingPromptSettingsReminderDays: NSManagedObject {
67

78
public func configure(with remoteReminderDays: RemoteBloggingPromptsSettings.ReminderDays) {

Sources/WordPressData/Swift/DiffAbstractValue.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import CoreData
33

4+
@objc(DiffAbstractValue)
45
public class DiffAbstractValue: NSManagedObject {
56
public enum Operation: String {
67
case add
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import CoreData
33

4+
@objc(DiffContentValue)
45
public class DiffContentValue: DiffAbstractValue {
56
@NSManaged var revisionDiff: RevisionDiff?
67
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Foundation
22
import CoreData
33

4+
@objc(DiffTitleValue)
45
public class DiffTitleValue: DiffAbstractValue {
56
@NSManaged var revisionDiff: RevisionDiff?
67
}

Sources/WordPressData/Swift/Domain.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public extension Domain {
1717
}
1818
}
1919

20+
@objc(ManagedDomain)
2021
public class ManagedDomain: NSManagedObject {
2122

2223
// MARK: - NSManagedObject

0 commit comments

Comments
 (0)