Skip to content

Instantly share code, notes, and snippets.

@michzio
Created December 12, 2021 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michzio/5a232e2571049c51430c240bb2266280 to your computer and use it in GitHub Desktop.
Save michzio/5a232e2571049c51430c240bb2266280 to your computer and use it in GitHub Desktop.
SwiftUI MVVM architecture - Entity
@objc(WordsetCategory)
public class WordsetCategory: NSManagedObject { }
extension WordsetCategory {
@nonobjc public class func fetchRequest() -> NSFetchRequest<WordsetCategory> {
return NSFetchRequest<WordsetCategory>(entityName: "WordsetCategory")
}
@NSManaged public var categoryId: String?
@NSManaged public var foreignName: String?
@NSManaged public var nativeName: String?
@NSManaged public var wordsets: NSSet?
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment