From bf2722034f0ae8ddc2277894542b8d6eb3b90527 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 13:48:04 +0100 Subject: add req-030 --- requirements/data_models/dml-bucket.md | 20 ++++++++++++++------ requirements/data_models/dml-drip.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 requirements/data_models/dml-drip.md (limited to 'requirements/data_models') diff --git a/requirements/data_models/dml-bucket.md b/requirements/data_models/dml-bucket.md index 0a7960a..3e33028 100644 --- a/requirements/data_models/dml-bucket.md +++ b/requirements/data_models/dml-bucket.md @@ -2,10 +2,18 @@ A bucket represents a real category of spending, like beer or holidays. -| Field | Type | Description | -| ------- | ------ | ----------------------------------------------------- | -| id | string | | -| name | string | A short description of the real category of spending. | -| balance | number | The amount of money currently in the bucket. | +| Field | Type | Description | +| ----------------- | ------ | ----------------------------------------------------- | +| name | string | A short description of the real category of spending. | +| balance | number | The amount of money currently in the bucket. | +| balance_cache_key | string | A cache key for the balance. See notes. | -Sources: req-027, req-028 +Constraints: + +- `name` must be unique. + +Notes: + +- `balance_cache_key` must be of the format: `:`. + +Sources: req-027, req-028, req-030 diff --git a/requirements/data_models/dml-drip.md b/requirements/data_models/dml-drip.md new file mode 100644 index 0000000..a421180 --- /dev/null +++ b/requirements/data_models/dml-drip.md @@ -0,0 +1,14 @@ +# dml-drip + +A drip represents a single daily transaction from the tank into a bucket as a +result of a pipe. + +| Field | Type | Description | +| --------- | ------ | --------------------------------------------------- | +| id | string | A unique ID. | +| bucket_id | string | The ID of the bucket into which this drip drap. | +| pipe_id | string | The ID of the pipe which from which this drip drap. | +| date | date | The date on which this drip drap. | +| amount | number | The amount of money which dripped. | + +Sources: req-030 -- cgit v1.2.3