summaryrefslogtreecommitdiff
path: root/models/crop.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'models/crop.rkt')
-rw-r--r--models/crop.rkt13
1 files changed, 5 insertions, 8 deletions
diff --git a/models/crop.rkt b/models/crop.rkt
index eff54a3..8c50c14 100644
--- a/models/crop.rkt
+++ b/models/crop.rkt
@@ -6,18 +6,15 @@
crop-name
(contract-out [create-crop! (-> string? crop?)]
[get-crops (-> (listof crop?))]
- [get-crop
- (->* ()
- (#:id (or/c #f exact-nonnegative-integer?) #:name (or/c #f string?))
- (or/c crop? #f))]
- [update-crop!
- (->* (exact-nonnegative-integer?) (#:name (or/c #f string?)) (or/c crop? #f))]
- [delete-crop! (-> exact-nonnegative-integer? void?)]))
+ [get-crop (->* () (#:id db-id? #:name string?) (or/c crop? #f))]
+ [update-crop! (->* (db-id?) (#:name string?) (or/c crop? #f))]
+ [delete-crop! (-> db-id? void?)]))
(require racket/contract
db
sql
- "../db/conn.rkt")
+ "../db/conn.rkt"
+ "utils.rkt")
(struct crop (id name) #:transparent)
Copyright 2019--2026 Marius PETER