adding transaction rules.

This commit is contained in:
Bryce Covert
2019-05-07 07:10:21 -07:00
parent 918f2e5be1
commit a1abb4b05e
15 changed files with 266 additions and 15 deletions

View File

@@ -305,6 +305,44 @@
:db/cardinality :db.cardinality/one
:db/doc "Whether to exclude from the ledger"}]])
(def add-transaction-rules
[[{:db/ident :transaction-rule/client
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/doc "The specific client this rule is for"}
{:db/ident :transaction-rule/bank-account
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/doc "The specific bank account this rule is for"}
{:db/ident :transaction-rule/yodlee-merchant
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one
:db/doc "Apply this rule if the yodlee merchant matches"}
{:db/ident :transaction-rule/description
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "A description to match this rule against"}
{:db/ident :transaction-rule/note
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "A friendly description for this rule (internal)"}
{:db/ident :transaction-rule/amount-lte
:db/valueType :db.type/double
:db/cardinality :db.cardinality/one
:db/doc "Amount has to be less than or equal to this"}
{:db/ident :transaction-rule/amount-gte
:db/valueType :db.type/double
:db/cardinality :db.cardinality/one
:db/doc "Amount has to be greater than or equal to this"}
]])
(def add-credit-bank-account
[[{:db/ident :bank-account-type/credit}]])