diff options
| author | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-07-24 09:47:07 +0100 |
|---|---|---|
| committer | Joe Carstairs <jcarstairs@scottlogic.com> | 2025-07-24 09:47:07 +0100 |
| commit | c4868152bb9d292c217452dff9eb1890f34e0d43 (patch) | |
| tree | e49eb462dccaeaea322c4837f2670733e7d7cb92 | |
| parent | 868abcd0e62528263e0aa70fbcef92735a829fdd (diff) | |
task-059
| -rw-r--r-- | requirements/catalogue/req-017.md | 4 | ||||
| -rw-r--r-- | requirements/catalogue/req-027.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-030.md | 15 | ||||
| -rw-r--r-- | requirements/catalogue/req-034.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-092.md | 2 | ||||
| -rw-r--r-- | requirements/catalogue/req-105.md | 11 | ||||
| -rw-r--r-- | requirements/catalogue/req-106.md | 6 | ||||
| -rw-r--r-- | requirements/catalogue/req-107.md | 9 | ||||
| -rw-r--r-- | requirements/catalogue/req-108.md | 9 | ||||
| -rw-r--r-- | requirements/catalogue/req-109.md | 9 | ||||
| -rw-r--r-- | requirements/catalogue/req-110.md | 9 | ||||
| -rw-r--r-- | requirements/catalogue/req-111.md | 8 | ||||
| -rw-r--r-- | requirements/data_models/dml-bucket.md | 4 | ||||
| -rw-r--r-- | requirements/data_models/dml-transaction.md | 2 |
14 files changed, 84 insertions, 8 deletions
diff --git a/requirements/catalogue/req-017.md b/requirements/catalogue/req-017.md index b585c82..cfc5ae9 100644 --- a/requirements/catalogue/req-017.md +++ b/requirements/catalogue/req-017.md @@ -6,7 +6,7 @@ As a user, I want to know that: - My pipes represent how I want to distribute my incomings and outgoings across my buckets in the future; - Each real transaction I have made in the past to be associated with at most - one bucket, so that my transactions represent how I have distributed my + one bucket, such that my transactions represent how I have distributed my incomings and outgoings in the past; - Buckets have a balance, which summarises both how I want to distribute my incomings and outgoings in the future, and how I have actually distributed @@ -17,4 +17,4 @@ have previously distributed, my incomings and outgoings. Source: req-002 -Requires: dml-pipe, dml-transaction, req-102, req-095
\ No newline at end of file +Satisfied by: req-102, req-095, req-105
\ No newline at end of file diff --git a/requirements/catalogue/req-027.md b/requirements/catalogue/req-027.md index d281efd..637c7de 100644 --- a/requirements/catalogue/req-027.md +++ b/requirements/catalogue/req-027.md @@ -4,6 +4,6 @@ Buckets must have a `balance` property, which represents the amount of money currently in the bucket, that is, the difference between the amount of money which has flowed in from a pipe less the amount taken out by my transactions. -Source: req-099 +Sources: req-099, req-030 Satisfied by: dml-bucket diff --git a/requirements/catalogue/req-030.md b/requirements/catalogue/req-030.md index 89f045e..86c16ad 100644 --- a/requirements/catalogue/req-030.md +++ b/requirements/catalogue/req-030.md @@ -5,7 +5,20 @@ Schist must implement the procedure described below as Source: req-029 -Satisfied by: task-001, task-006, task-054 +Satisfied by: + - task-001 (desktop interface for inserting transactions) + - task-006 (SMS interface for inserting transactions) + - task-054 (Web interface for inserting transactions) + - req-109 (transactions have a `timestamp`) + - req-107 (transactions have a `bucket_id`) + - req-108 (transactions have an `amount`) + - req-027 (buckets have a `balance`) + - req-110 (buckets have a `balance_cache_key`) + - req-111 (buckets have an `id`) + - req-098 (buckets have a `name`) + - req-035 (implement `is_bucket_balance_up_to_date`) + - req-037 (implement `update_bucket_drips`) + - dml-drip (drips have a `bucket_id` and `amount`) ## calculate_bucket_balance diff --git a/requirements/catalogue/req-034.md b/requirements/catalogue/req-034.md index 3c7a1f3..a0f0fdf 100644 --- a/requirements/catalogue/req-034.md +++ b/requirements/catalogue/req-034.md @@ -2,6 +2,6 @@ Schist must have an accurate record of the user's transactions. -Source: req-030 +Source: req-030, req-105 Satisfied by: req-033, ass-016, req-064 diff --git a/requirements/catalogue/req-092.md b/requirements/catalogue/req-092.md index cde945e..3a556e0 100644 --- a/requirements/catalogue/req-092.md +++ b/requirements/catalogue/req-092.md @@ -9,7 +9,7 @@ incomings and outgoings are roughly equal in the long run. Source: req-091 -Satisfied by: dml-drip, dml-transaction, dml-bucket, ass-009, ass-021, req-093, req-094 +Satisfied by: dml-drip, ass-009, ass-021, req-093, req-094, req-108, req-027 ## calculate_tank_balance diff --git a/requirements/catalogue/req-105.md b/requirements/catalogue/req-105.md new file mode 100644 index 0000000..2bb9c72 --- /dev/null +++ b/requirements/catalogue/req-105.md @@ -0,0 +1,11 @@ +# req-105 + +As a user, I want each real transaction I have made in the past to be associated +with at most one bucket, such that my transactions represent how I have +distributed my incomings and outgoings in the past, so that I can have buckets +and pipes which express how I want to distribute, and have previously +distributed, my incomings and outgoings. + +Source: req-017 + +Satisfied by: req-106, req-034
\ No newline at end of file diff --git a/requirements/catalogue/req-106.md b/requirements/catalogue/req-106.md new file mode 100644 index 0000000..2d89c83 --- /dev/null +++ b/requirements/catalogue/req-106.md @@ -0,0 +1,6 @@ +# req-106 + +Schist must have interfaces for creating and updating associations between +transactions and buckets. + +Source: req-105 diff --git a/requirements/catalogue/req-107.md b/requirements/catalogue/req-107.md new file mode 100644 index 0000000..a3c92cc --- /dev/null +++ b/requirements/catalogue/req-107.md @@ -0,0 +1,9 @@ +# req-107 + +Transactions must have an optional `bucket_id` property, which represents the +`id` of the bucket with which this transaction is associated, if this +transaction is associated with a bucket. + +Source: req-106 + +Satisfied by: dml-transaction diff --git a/requirements/catalogue/req-108.md b/requirements/catalogue/req-108.md new file mode 100644 index 0000000..088507b --- /dev/null +++ b/requirements/catalogue/req-108.md @@ -0,0 +1,9 @@ +# req-108 + +Transactions must have an `amount` property, which, if positive, represents the +amount of money transferred into the user's account, or, if negative, +represents the amount of money transferred out of the user's account. + +Sources: req-106, req-030 + +Satisfied by: dml-transaction diff --git a/requirements/catalogue/req-109.md b/requirements/catalogue/req-109.md new file mode 100644 index 0000000..7bf95fc --- /dev/null +++ b/requirements/catalogue/req-109.md @@ -0,0 +1,9 @@ +# req-108 + +Transactions must have a `timestamp` property, which represents the number of +milliseconds between the Unix epoch and the time the transaction was inserted +into Schist's database. + +Source: req-030 + +Satisfied by: dml-transaction diff --git a/requirements/catalogue/req-110.md b/requirements/catalogue/req-110.md new file mode 100644 index 0000000..39b65d7 --- /dev/null +++ b/requirements/catalogue/req-110.md @@ -0,0 +1,9 @@ +# req-110 + +Buckets must have a `balance_cache_key` property, which encodes whether, given +any particular state of transactions and pipes, the bucket's `balance` property +is accurate. + +Source: req-030 + +Satisfied by: req-027, dml-transaction diff --git a/requirements/catalogue/req-111.md b/requirements/catalogue/req-111.md new file mode 100644 index 0000000..a7569e6 --- /dev/null +++ b/requirements/catalogue/req-111.md @@ -0,0 +1,8 @@ +# req-111 + +Buckets must have an `id` property, which is a unique identifier for the +bucket. + +Source: req-030 + +Satisfied by: dml-bucket diff --git a/requirements/data_models/dml-bucket.md b/requirements/data_models/dml-bucket.md index ba1b415..dc7749b 100644 --- a/requirements/data_models/dml-bucket.md +++ b/requirements/data_models/dml-bucket.md @@ -4,6 +4,7 @@ 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. | @@ -11,9 +12,10 @@ A bucket represents a real category of spending, like beer or holidays. Constraints: - `name` must be unique. +- `id` must be equal to `name`, that is, `id` is an alias of the property, `name`. Notes: - `balance_cache_key` must be of the format: `<drip_id>:<transaction_id>`. -Sources: req-027, req-028, req-030, req-092, req-098 +Sources: req-027, req-098, req-110, req-111 diff --git a/requirements/data_models/dml-transaction.md b/requirements/data_models/dml-transaction.md index bea2b75..e306a28 100644 --- a/requirements/data_models/dml-transaction.md +++ b/requirements/data_models/dml-transaction.md @@ -12,4 +12,4 @@ a wage slip. It may be associated with at most one bucket. | 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, req-092 +Sources: req-107, req-108, req-109, req-110 |
