Skip to content

Instantly share code, notes, and snippets.

@tifoaudii
Created May 20, 2022 10:02
Show Gist options
  • Save tifoaudii/883ee872fe3bba46365c25041d4b3ce1 to your computer and use it in GitHub Desktop.
Save tifoaudii/883ee872fe3bba46365c25041d4b3ce1 to your computer and use it in GitHub Desktop.
import CoreData
@objc(Task)
public class Task: NSManagedObject {}
extension Task {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Task> {
return NSFetchRequest<Task>(entityName: "Task")
}
@NSManaged public var title: String?
@NSManaged public var type: String?
@NSManaged public var deadline: Date?
@NSManaged public var color: NSObject?
@NSManaged public var isCompleted: Bool
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment