lambdaisland / facai

Factories for fun and profit. 恭喜發財!
Mozilla Public License 2.0
45 stars 1 forks source link

Support rules inside traits #6

Closed plexus closed 1 year ago

plexus commented 2 years ago

This doesn't seem to work at the moment.

(defactory customer-session
  {:state :OPEN}

  :traits
  {:redeemed
   {:with
    {:item_subsidies [{:sku rand-code}]
     :items [{:sku rand-code}]}
    :rules
    (let [?sku (facai/unify)]
      {[:item_subsidies :sku] ?sku
       [:items :sku] ?sku})}})
alysbrooks commented 1 year ago

Facai is currently in maintenance mode in favor of Harvest. Rules are planned to change in Harvest anyway, so I'm not going to transfer this issue to Harvest.