 (s/def ::commodity-criteria (s/keys :req-un [::entity-id]))
 (s/def ::image-criteria (s/keys :req-un [::user-id]))
 
+(defmulti trade-date vector?)
+(defmethod trade-date true [_]
+  (s/tuple keyword? ::date ::date))
+(defmethod trade-date false [_]
+  ::date)
+(s/def ::trade-date (s/multi-spec trade-date vector?))
+
 (defn- price-criteria-selector
   [criteria]
   (cond

            [clj-money.partitioning :refer [table-name
                                            tables-for-range]]
            [clj-money.models.storage :refer [Storage]])
  (:import java.sql.BatchUpdateException))

(defn- id-criteria?
  [value]


(defmulti price-criteria price-criteria-selector)
(defmethod price-criteria :commodity-id [_]
  (s/keys :req-un [::commodity-id ::trade-date]))
(defmethod price-criteria :id [_]
  (s/keys :req-un [::id ::trade-date]))
(defmethod price-criteria :entity-id [_]
  (s/keys :req-un [::entity-id ::trade-date]))
(s/def ::price-criteria (s/multi-spec price-criteria price-criteria-selector))

(defmulti attachment-criteria #(contains? % :id))
