(ns wanijo.specs
  (:require [clojure.spec.alpha :as spec]
            [wanijo.infrastructure.neo4j :as neo4j]))

(spec/def ::created_at ::neo4j/date-str)
(spec/def ::updated_at ::neo4j/date-str)
(spec/def ::created-at
  (spec/and string? ::neo4j/date-str))
(spec/def ::name string?)
(spec/def ::req-name
  (spec/and ::name (complement empty?)))
(spec/def ::instance_uuid ::neo4j/uuid)
(spec/def ::attribute_uuid ::neo4j/uuid)
(spec/def ::now ::neo4j/date-str)
(spec/def ::uuid ::neo4j/uuid)
(spec/def ::user_uuid ::neo4j/uuid)
(spec/def ::no-whitespace #(not (re-matches #".*\s.*" %)))
(spec/def ::value string?)
