 (s/def ::account-id integer?)
 (s/def ::commodity-id integer?)
 (s/def ::transaction-id integer?)
+(s/def ::date (partial instance? Date))
+
 (defmulti lot-criteria #(contains? % :account-id))
 (defmethod lot-criteria true [_]
   (s/keys :req-un [::account-id] :opt-un[::commodity-id ::entity-id]))

            [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))
