TempTarget.swift 625 B

12345678910111213141516171819202122232425262728
  1. import Foundation
  2. struct TempTarget: JSON, Identifiable, Equatable {
  3. var id = UUID().uuidString
  4. let name: String
  5. var createdAt: Date
  6. let targetTop: Decimal
  7. let targetBottom: Decimal
  8. let duration: Decimal
  9. let enteredBy: String?
  10. static let manual = "freeaps-x://manual"
  11. static let custom = "Custom"
  12. static let cancel = "Cancel"
  13. }
  14. extension TempTarget {
  15. private enum CodingKeys: String, CodingKey {
  16. case id = "_id"
  17. case name
  18. case createdAt = "created_at"
  19. case targetTop
  20. case targetBottom
  21. case duration
  22. case enteredBy
  23. }
  24. }