StatusList.swift 646 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // StatusList.swift
  3. // Todos
  4. //
  5. // Created by Sam Jaffe on 3/7/26.
  6. //
  7. import Foundation
  8. import SwiftData
  9. @Model // Must be @Model to watch changes to children
  10. final class StatusList {
  11. var todo: Bool = true
  12. var complete: Bool = true
  13. var inProgess: Bool = true
  14. var hiatus: Bool = true
  15. var waiting: Bool = true
  16. var unknown: Bool = true
  17. init() {}
  18. func test(_ index: Status) -> Bool {
  19. switch (index) {
  20. case .todo: return todo
  21. case .complete: return complete
  22. case .inProgress: return inProgess
  23. case .hiatus: return hiatus
  24. case .waiting: return waiting
  25. case .unknown: return unknown
  26. }
  27. }
  28. }