[Racket] Ferti hydroponic nutrient solver, redux.
Hydrate nutrient values for fertilizer product structs.
models/fertilizer-product.rkt
@@ -5,6 +5,8 @@
5
5
fertilizer-product
6
6
fertilizer-product?
7
7
fertilizer-product-id fertilizer-product-brand-name
8
Added:
(rename-out
9
Added:
[fertilizer-product-nutrient-values fertilizer-product-values])
8
10
;; SQL CRUD
9
11
(contract-out
10
12
[create-fertilizer-product! (->* (string?
@@ -28,7 +30,7 @@
28
30
"nutrient.rkt")
29
31
30
32
;; Instances of this struct are persisted in the fertilizer_products table.
31
Removed:
(struct fertilizer-product (id canonical-name brand-name) #:transparent)
33
Added:
(struct fertilizer-product (id canonical-name nutrient-values brand-name) #:transparent)
32
34
33
35
34
36
;; CREATE