summaryrefslogtreecommitdiff
path: root/requirements/data_models
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2025-07-26 23:38:24 +0100
committerJoe Carstairs <me@joeac.net>2025-07-26 23:38:24 +0100
commitc898d9d6a988f929b66cc3219948c6cd756988ab (patch)
tree4904d525b0679ae9a77e3ccb87ca25c01d3dc559 /requirements/data_models
parent8b80582d7556d0eadef6c4e1593ae24735cb67e0 (diff)
complete task-028
Diffstat (limited to 'requirements/data_models')
-rw-r--r--requirements/data_models/dml-bucket.md21
1 files changed, 13 insertions, 8 deletions
diff --git a/requirements/data_models/dml-bucket.md b/requirements/data_models/dml-bucket.md
index dc7749b..01c56b5 100644
--- a/requirements/data_models/dml-bucket.md
+++ b/requirements/data_models/dml-bucket.md
@@ -2,20 +2,25 @@
A bucket represents a real category of spending, like beer or holidays.
-| Field | Type | Description |
-| ----------------- | ------ | --------------------------------------------------------- |
-| id | string | A unique identifier for the bucket. |
-| name | string | A short description of the real category of spending. |
-| balance | number | The amount of money the user intends to be free to spend. |
-| balance_cache_key | string | A cache key for the balance. See notes. |
+| Field | Type | Description |
+| ----------------- | ------- | --------------------------------------------------------- |
+| id | string | A unique identifier for the bucket. |
+| name | string | A short description of the real category of spending. |
+| balance | number | The amount of money the user intends to be free to spend. |
+| balance_cache_key | string | A cache key for the balance. See notes. |
+| is_hidden | boolean | Whether this bucket should be hidden in the UI. |
Constraints:
- `name` must be unique.
-- `id` must be equal to `name`, that is, `id` is an alias of the property, `name`.
+- `id` must be equal to `name`, that is, `id` is an alias of the property,
+ `name`.
+- `is_hidden` should never be true when `balance` is non-zero.
Notes:
- `balance_cache_key` must be of the format: `<drip_id>:<transaction_id>`.
+- `is_hidden` is used as an equivalent of soft-deletion. Buckets should never be
+ actually deleted.
-Sources: req-027, req-098, req-110, req-111
+Sources: req-027, req-098, req-110, req-111, task-028