Vladimir Dubovik 1eb574e682 Lots of changes
2024-12-20 13:26:50 +03:00

34 lines
1.0 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// Class.swift
// Schedule ICTIS
//
// Created by Mironov Egor on 18.12.2024.
//
import Foundation
import CoreData
final class ClassModel: NSManagedObject {
@NSManaged var auditory: String
@NSManaged var professor: String
@NSManaged var subject: String
@NSManaged var comment: String
@NSManaged var notification: String
@NSManaged var day: Date
@NSManaged var starttime: Date
@NSManaged var endtime: Date
@NSManaged var important: Bool
// Здесь мы выполняем дополнительную инициализацию, назначая значения по умолчанию
override func awakeFromInsert() {
super.awakeFromInsert()
setPrimitiveValue("", forKey: "auditory")
setPrimitiveValue("", forKey: "professor")
setPrimitiveValue("", forKey: "subject")
setPrimitiveValue("", forKey: "comment")
setPrimitiveValue("Нет", forKey: "notification")
setPrimitiveValue(false, forKey: "important")
}
}