//
//  Graph.swift
//  FastCoster
//
//  Created by Michael Pivato on 3/5/2024.
//

import Foundation
// JSON for saving/loading configuration: https://www.avanderlee.com/swift/json-parsing-decoding/
struct Node: Codable {
    var id: Int
    var info: NodeInfo
    var dependentNodeIds: [Int]
    
    func hasDependentNodes() -> Bool {
        return !dependentNodeIds.isEmpty
    }
}

struct Graph: Codable {
    var name: String
    var nodes: [Node]
}
