From 6a8b89975105fc0122e424d143f690f38633cbcf Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 13:09:50 +0100 Subject: dml-bucket sourced from req-027, req-028 --- requirements/data_models/dml-bucket.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'requirements/data_models') diff --git a/requirements/data_models/dml-bucket.md b/requirements/data_models/dml-bucket.md index b0d978f..0a7960a 100644 --- a/requirements/data_models/dml-bucket.md +++ b/requirements/data_models/dml-bucket.md @@ -8,4 +8,4 @@ A bucket represents a real category of spending, like beer or holidays. | name | string | A short description of the real category of spending. | | balance | number | The amount of money currently in the bucket. | -Source: req-017 +Sources: req-027, req-028 -- cgit v1.2.3 From 2bad8968bc8a5e8acadf3219f1e6a8cf7d79ec8f Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 13:23:31 +0100 Subject: edit dml-pipe --- requirements/data_models/dml-pipe.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'requirements/data_models') diff --git a/requirements/data_models/dml-pipe.md b/requirements/data_models/dml-pipe.md index a7d2e8a..a701ea3 100644 --- a/requirements/data_models/dml-pipe.md +++ b/requirements/data_models/dml-pipe.md @@ -3,10 +3,11 @@ A pipe represents how much money the user wants to come in or go out of a bucket. In other words, it represents a flow of money from the tank to a bucket. -| Field | Type | Description | -| ------ | ------ | -------------------------------------------------------- | -| id | string | | -| amount | number | The amount of money flowing through the pipe. | -| period | string | How long it takes for `amount` to flow through the pipe. | +| Field | Type | Description | +| --------- | ------ | -------------------------------------------------------- | +| id | string | | +| amount | number | The amount of money flowing through the pipe. | +| period | string | How long it takes for `amount` to flow through the pipe. | +| bucket_id | string | The ID of the bucket to which this pipe corresponds. | Source: req-017 -- cgit v1.2.3 From 8ce1d909ad205d7f212a66b180d054bcc21e5038 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 13:24:11 +0100 Subject: edit dml-transaction --- requirements/data_models/dml-transaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'requirements/data_models') diff --git a/requirements/data_models/dml-transaction.md b/requirements/data_models/dml-transaction.md index db7d1ed..921eb10 100644 --- a/requirements/data_models/dml-transaction.md +++ b/requirements/data_models/dml-transaction.md @@ -9,6 +9,6 @@ a wage slip. It may be associated with at most one bucket. | amount | number | The amount of money involved in the transaction. | | date | date | The calendar date when the transaction took place. | | counterparty | string | The other party in the transaction. | -| bucket | string? | The bucket associated with the transaction. | +| bucket_id | string? | The bucket associated with the transaction. | Source: req-010, req-017 -- cgit v1.2.3 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 From af7920c8e9405ea0e7591907555edad3a19688c8 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 14:06:41 +0100 Subject: edit req-030 --- requirements/data_models/dml-transaction.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'requirements/data_models') diff --git a/requirements/data_models/dml-transaction.md b/requirements/data_models/dml-transaction.md index 921eb10..b6b76f7 100644 --- a/requirements/data_models/dml-transaction.md +++ b/requirements/data_models/dml-transaction.md @@ -3,12 +3,13 @@ A transaction represents a real transaction, such as buying a beer or depositing a wage slip. It may be associated with at most one bucket. -| Field | Type | Description | -| ------------ | ------- | -------------------------------------------------- | -| id | string | | -| amount | number | The amount of money involved in the transaction. | -| date | date | The calendar date when the transaction took place. | -| counterparty | string | The other party in the transaction. | -| bucket_id | string? | The bucket associated with the transaction. | +| Field | Type | Description | +| ------------ | ------- | ---------------------------------------------------------- | +| id | string | | +| amount | number | The amount of money involved in the transaction. | +| date | date | The calendar date when the transaction took place. | +| counterparty | string | The other party in the transaction. | +| bucket_id | string? | The bucket associated with the transaction. | +| timestamp | number | The time the transaction was inserted as a Unix timestamp. | Source: req-010, req-017 -- cgit v1.2.3 From 519721cd14e31fcc6998b387a27eaf3ad34d2869 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Tue, 15 Jul 2025 15:09:31 +0100 Subject: add req-037 --- requirements/data_models/dml-drip.md | 17 +++++++++-------- requirements/data_models/dml-pipe.md | 10 +++++++++- 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'requirements/data_models') diff --git a/requirements/data_models/dml-drip.md b/requirements/data_models/dml-drip.md index a421180..127c73e 100644 --- a/requirements/data_models/dml-drip.md +++ b/requirements/data_models/dml-drip.md @@ -3,12 +3,13 @@ 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. | +| 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. | +| timestamp | number | The time on which this drip was inserted as a Unix timestamp. | -Sources: req-030 +Sources: req-030, req-037 diff --git a/requirements/data_models/dml-pipe.md b/requirements/data_models/dml-pipe.md index a701ea3..d889b0a 100644 --- a/requirements/data_models/dml-pipe.md +++ b/requirements/data_models/dml-pipe.md @@ -10,4 +10,12 @@ bucket. In other words, it represents a flow of money from the tank to a bucket. | period | string | How long it takes for `amount` to flow through the pipe. | | bucket_id | string | The ID of the bucket to which this pipe corresponds. | -Source: req-017 +Constraints: + +- `period` must be one of these options: + - `day` + - `week` + - `month` + - `year` + +Sources: req-017, req-037 -- cgit v1.2.3