diff --git a/src/wanijo/schema/domain.clj b/src/wanijo/schema/domain.clj index ebe0e53..53674a3 100644 --- a/src/wanijo/schema/domain.clj +++ b/src/wanijo/schema/domain.clj @@ -4,16 +4,14 @@ [wanijo.framework.neo4j :as neo4j])) (spec/def ::name - (spec/and string? not-empty)) -(spec/def ::created-at - (spec/and string? ::neo4j/date-str)) + (spec/and ::specs/name (complement empty?))) (spec/def ::assigned-to (spec/or :public empty? :assigned (spec/coll-of ::neo4j/uuid) :assigned-single ::neo4j/uuid)) (spec/def ::schema (spec/keys ::req-un [::name - ::created-at + ::specs/created-at ::neo4j/uuid])) (neo4j/defquery all-created-by diff --git a/src/wanijo/specs.clj b/src/wanijo/specs.clj index ee39408..3bdc488 100644 --- a/src/wanijo/specs.clj +++ b/src/wanijo/specs.clj @@ -4,6 +4,8 @@ (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 ::instance_uuid ::neo4j/uuid) (spec/def ::attribute_uuid ::neo4j/uuid)