-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manually generate the core data classes
- Loading branch information
Showing
4 changed files
with
108 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
Sources/History/CoreData/BrowsingHistoryEntryManagedObject.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// | ||
// BrowsingHistoryEntryManagedObject.swift | ||
// | ||
// Copyright © 2024 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
import CoreData | ||
|
||
@objc(BrowsingHistoryEntryManagedObject) | ||
public class BrowsingHistoryEntryManagedObject: NSManagedObject { | ||
|
||
} | ||
|
||
extension BrowsingHistoryEntryManagedObject { | ||
|
||
@nonobjc public class func fetchRequest() -> NSFetchRequest<BrowsingHistoryEntryManagedObject> { | ||
return NSFetchRequest<BrowsingHistoryEntryManagedObject>(entityName: "BrowsingHistoryEntryManagedObject") | ||
} | ||
|
||
@NSManaged public var blockedTrackingEntities: String? | ||
@NSManaged public var failedToLoad: Bool | ||
@NSManaged public var identifier: UUID? | ||
@NSManaged public var lastVisit: Date? | ||
@NSManaged public var numberOfTotalVisits: Int64 | ||
@NSManaged public var numberOfTrackersBlocked: Int64 | ||
@NSManaged public var title: String? | ||
@NSManaged public var trackersFound: Bool | ||
@NSManaged public var url: URL? | ||
@NSManaged public var visits: NSSet? | ||
|
||
} | ||
|
||
// MARK: Generated accessors for visits | ||
extension BrowsingHistoryEntryManagedObject { | ||
|
||
@objc(addVisitsObject:) | ||
@NSManaged public func addToVisits(_ value: PageVisitManagedObject) | ||
|
||
@objc(removeVisitsObject:) | ||
@NSManaged public func removeFromVisits(_ value: PageVisitManagedObject) | ||
|
||
@objc(addVisits:) | ||
@NSManaged public func addToVisits(_ values: NSSet) | ||
|
||
@objc(removeVisits:) | ||
@NSManaged public func removeFromVisits(_ values: NSSet) | ||
|
||
} | ||
|
||
extension BrowsingHistoryEntryManagedObject : Identifiable { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// PageVisitManagedObject.swift | ||
// | ||
// Copyright © 2024 DuckDuckGo. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
|
||
import Foundation | ||
import CoreData | ||
|
||
@objc(PageVisitManagedObject) | ||
public class PageVisitManagedObject: NSManagedObject { | ||
|
||
} | ||
|
||
extension PageVisitManagedObject { | ||
|
||
@nonobjc public class func fetchRequest() -> NSFetchRequest<PageVisitManagedObject> { | ||
return NSFetchRequest<PageVisitManagedObject>(entityName: "PageVisitManagedObject") | ||
} | ||
|
||
@NSManaged public var date: Date? | ||
@NSManaged public var historyEntry: BrowsingHistoryEntryManagedObject? | ||
|
||
} | ||
|
||
extension PageVisitManagedObject : Identifiable { | ||
|
||
} |