-
Notifications
You must be signed in to change notification settings - Fork 1
/
UserSubject+CoreDataProperties.swift
63 lines (47 loc) · 1.53 KB
/
UserSubject+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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// UserSubject+CoreDataProperties.swift
// Calq
//
// Created by Kiara on 19.05.23.
//
//
import Foundation
import CoreData
extension UserSubject {
@nonobjc public class func fetchRequest() -> NSFetchRequest<UserSubject> {
return NSFetchRequest<UserSubject>(entityName: "UserSubject")
}
@NSManaged public var color: String
@NSManaged public var exampoints: Int16
@NSManaged public var examtype: Int16
@NSManaged public var inactiveYears: String
@NSManaged public var lk: Bool
@NSManaged public var name: String
@NSManaged public var showInLineGraph: Bool
@NSManaged public var subjecttests: NSSet?
@NSManaged public var subjecttosettings: AppSettings
}
// MARK: Generated accessors for subjecttests
extension UserSubject {
public func getAllTests() -> [UserTest] {
return subjecttests?.allObjects as? [UserTest] ?? []
}
public func deleteAllTests() {
let context = Util.getContext()
for test in getAllTests() {
context.delete(test)
}
subjecttests = NSSet()
saveCoreData()
}
@objc(addSubjecttestsObject:)
@NSManaged public func addToSubjecttests(_ value: UserTest)
@objc(removeSubjecttestsObject:)
@NSManaged public func removeFromSubjecttests(_ value: UserTest)
@objc(addSubjecttests:)
@NSManaged public func addToSubjecttests(_ values: NSSet)
@objc(removeSubjecttests:)
@NSManaged public func removeFromSubjecttests(_ values: NSSet)
}
extension UserSubject : Identifiable {
}