Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f848897
commit 7ba5ef9
Showing
7 changed files
with
104 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
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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,18 @@ | |||
// | |||
// PlaybackRecord+CoreDataClass.swift | |||
// BookPlayer | |||
// | |||
// Created by Gianni Carlo on 4/5/19. | |||
// Copyright © 2019 Tortuga Power. All rights reserved. | |||
// | |||
// | |||
|
|||
import CoreData | |||
import Foundation | |||
|
|||
public class PlaybackRecord: NSManagedObject { | |||
public override func awakeFromInsert() { | |||
super.awakeFromInsert() | |||
setPrimitiveValue(Date(), forKey: "date") | |||
} | |||
} |
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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
// | |||
// PlaybackRecord+CoreDataProperties.swift | |||
// BookPlayer | |||
// | |||
// Created by Gianni Carlo on 4/5/19. | |||
// Copyright © 2019 Tortuga Power. All rights reserved. | |||
// | |||
// | |||
|
|||
import CoreData | |||
import Foundation | |||
|
|||
extension PlaybackRecord { | |||
@nonobjc public class func fetchRequest() -> NSFetchRequest<PlaybackRecord> { | |||
return NSFetchRequest<PlaybackRecord>(entityName: "PlaybackRecord") | |||
} | |||
|
|||
@nonobjc public class func create(in context: NSManagedObjectContext) -> PlaybackRecord { | |||
// swiftlint:disable force_cast | |||
return NSEntityDescription.insertNewObject(forEntityName: "PlaybackRecord", into: context) as! PlaybackRecord | |||
} | |||
|
|||
@NSManaged public var date: Date | |||
@NSManaged public var time: Double | |||
} |
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