Add data model and structure for swift graph executor, rework create products to bem ore general

This commit is contained in:
Michael Pivato
2024-05-09 22:50:35 +09:30
parent 51fc216c82
commit 98d38d47a3
17 changed files with 432 additions and 50 deletions

View File

@@ -0,0 +1,23 @@
//
// 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]
}