-
Notifications
You must be signed in to change notification settings - Fork 0
/
Record+CoreDataProperties.swift
48 lines (42 loc) · 1.1 KB
/
Record+CoreDataProperties.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// Record+CoreDataProperties.swift
// YueJi
//
// Created by Jcwang on 2022/11/10.
//
//
import Foundation
import CoreData
extension Record {
@nonobjc public class func fetchRequest() -> NSFetchRequest<Record> {
return NSFetchRequest<Record>(entityName: "Record")
}
@NSManaged public var cateDate: Date?
@NSManaged public var createDate: Date?
@NSManaged public var modifiedDate: Date?
@NSManaged public var tagIDs: [UUID]?
@NSManaged public var text: String?
@NSManaged public var title: String?
@NSManaged public var uuid: UUID?
@NSManaged public var wordCount: Int64
public var wrappedCateDate: Date {
cateDate ?? Date()
}
public var wrappedCreateDate: Date {
createDate ?? Date()
}
public var wrappedModifiedDate: Date {
modifiedDate ?? Date()
}
public var wrappedTagIDs: [UUID] {
tagIDs ?? [Tag.noneTag.id]
}
public var wrappedText: String {
text ?? "None text"
}
public var wrappedTitle: String {
title ?? "No Title"
}
}
extension Record : Identifiable {
}