-
Notifications
You must be signed in to change notification settings - Fork 1
/
AppSettings+CoreDataProperties.swift
74 lines (52 loc) · 1.92 KB
/
AppSettings+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
64
65
66
67
68
69
70
71
72
73
74
//
// AppSettings+CoreDataProperties.swift
// Calq
//
// Created by Kiara on 03.09.23.
//
//
import Foundation
import CoreData
extension AppSettings {
@nonobjc public class func fetchRequest() -> NSFetchRequest<AppSettings> {
return NSFetchRequest<AppSettings>(entityName: "AppSettings")
}
@NSManaged public var colorfulCharts: Bool
@NSManaged public var weightBigGrades: String?
@NSManaged public var hasFiveExams: Bool
@NSManaged public var gradetypes: NSSet?
@NSManaged public var usersubjects: NSSet?
}
// MARK: Generated accessors for gradetypes
extension AppSettings {
public func getAllSubjects() -> [UserSubject] {
let subjects = usersubjects?.allObjects as? [UserSubject] ?? []
let arr1 = subjects.filter {$0.lk}.sorted(by: {$0.name < $1.name })
let arr2 = subjects.filter {!$0.lk}.sorted(by: {$0.name < $1.name })
return arr1+arr2
}
public func getAllGradeTypes() -> [GradeType] {
return gradetypes?.allObjects as? [GradeType] ?? []
}
@objc(addGradetypesObject:)
@NSManaged public func addToGradetypes(_ value: GradeType)
@objc(removeGradetypesObject:)
@NSManaged public func removeFromGradetypes(_ value: GradeType)
@objc(addGradetypes:)
@NSManaged public func addToGradetypes(_ values: NSSet)
@objc(removeGradetypes:)
@NSManaged public func removeFromGradetypes(_ values: NSSet)
}
// MARK: Generated accessors for usersubjects
extension AppSettings {
@objc(addUsersubjectsObject:)
@NSManaged public func addToUsersubjects(_ value: UserSubject)
@objc(removeUsersubjectsObject:)
@NSManaged public func removeFromUsersubjects(_ value: UserSubject)
@objc(addUsersubjects:)
@NSManaged public func addToUsersubjects(_ values: NSSet)
@objc(removeUsersubjects:)
@NSManaged public func removeFromUsersubjects(_ values: NSSet)
}
extension AppSettings : Identifiable {
}