diff options
author | xengineering <me@xengineering.eu> | 2024-09-08 17:02:33 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-09-08 17:21:32 +0200 |
commit | 458a24d09f95eefb161728d9676ecdfca30e3f5e (patch) | |
tree | d3260b2531f42a6e8335661312661302b9653730 /finance/model.py | |
parent | 6973093a2b80b4fb9e216d1b3e329dd4c2badc7c (diff) | |
download | finance-py-458a24d09f95eefb161728d9676ecdfca30e3f5e.tar finance-py-458a24d09f95eefb161728d9676ecdfca30e3f5e.tar.zst finance-py-458a24d09f95eefb161728d9676ecdfca30e3f5e.zip |
Split flow.py to simulate.py and model.py
model.py should be a file containing only dataclasses to model finance.
simulate.py should take care of the simulation of that finance data to
create a financial forecast.
Diffstat (limited to 'finance/model.py')
-rw-r--r-- | finance/model.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/finance/model.py b/finance/model.py new file mode 100644 index 0000000..8bf2e3d --- /dev/null +++ b/finance/model.py @@ -0,0 +1,12 @@ +import dataclasses +import datetime +import decimal + + +@dataclasses.dataclass(kw_only=True, frozen=True) +class Flow: + """Time-discrete flow of money paid on the first day of a month""" + + amount: decimal.Decimal + since: None | datetime.datetime + until: None | datetime.datetime |