Lots of changes

This commit is contained in:
Vladimir Dubovik
2024-12-20 13:26:50 +03:00
parent 3fad13097a
commit 1eb574e682
45 changed files with 757 additions and 71 deletions

View File

@ -0,0 +1,33 @@
//
// Class.swift
// Schedule ICTIS
//
// Created by Mironov Egor on 18.12.2024.
//
import Foundation
import CoreData
final class Class: 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")
}
}

View File

@ -0,0 +1,23 @@
//
// Model.swift
// Schedule ICTIS
//
// Created by Mironov Egor on 13.11.2024.
//
import Foundation
// MARK: - Welcome
struct Schedule: Decodable {
let table: Table
let weeks: [Int]
}
// MARK: - Table
struct Table: Decodable {
let type, name: String
let week: Int
let group: String
let table: [[String]]
let link: String
}

View File

@ -0,0 +1,14 @@
//
// Tab.swift
// Schedule ICTIS
//
// Created by G412 on 13.11.2024.
//
import SwiftUI
enum TabBarModel: String, CaseIterable {
case schedule = "house"
case tasks = "books.vertical"
case settings = "gear"
}

View File

@ -0,0 +1,8 @@
//
// ClassProvider.swift
// Schedule ICTIS
//
// Created by G412 on 18.12.2024.
//
import Foundation