   []
   ;; Delete all sections and all companies
   (common/delete-all-resources! common/section-table-name)
-  (common/delete-all-resources! table-name))+  (common/delete-all-resources! table-name))

(defn slug-available? [slug]
  (not (contains? (taken-slugs) slug)))

(s/defn ->company :- common/Company
  [company-props user]
  (-> company-props
    (update :slug #(if % % (slug/find-available-slug (:name company-props) (taken-slugs))))
    (update :currency #(if % % "USD"))
    (assoc :org-id (:org-id user))
    (merge (placeholder-sections))
    (categories-for)
    (sections-for)))

;; Any "real" sections they provide ought to end up in the company document
;; with author and time stamp, and also with their own section document entries.
(s/defn create-company*
  [company :- common/Company]
  (let [sections      (select-keys common/section-names company)
        real-sections (into {} (filter (fn [[k v]] (not (:placeholder v))) sections))
        company-      (apply dissoc company (keys real-sections))]
    ))

(defun create-company
  "Given the company property map, create the company, returning the property map for the resource or `false`.

(ns open-company.resources.company
  (:require [clojure.string :as string]
            [clojure.set :as cset]
            [medley.core :as med]
            [schema.core :as s]
            [defun :refer (defun defun-)]
            [open-company.lib.slugify :as slug]
