|
|
# Library that could be used
|
|
|
|
|
|
* [Mypy](http://mypy-lang.org/index.html) for static typing
|
|
|
* [SqlAlchemy](https://docs.sqlalchemy.org/en/latest/index.html) as an ORM
|
|
|
* [Sphinx](http://www.sphinx-doc.org/en/master/) to build documentation
|
|
|
* [WxPython](https://wxpython.org/) as GUI
|
|
|
* [Money](https://pypi.org/project/money/) to handle currency
|
|
|
* [Pendulum](https://pendulum.eustace.io/) to play with date and time
|
|
|
|
|
|
# Database
|
|
|
|
|
|
```plantuml
|
|
|
object category
|
|
|
object account
|
|
|
object recurrent_operation
|
|
|
object operation
|
|
|
object balance
|
|
|
|
|
|
category : id: INTEGER PRIMARY KEY
|
|
|
category : name: STRING NOT NULL
|
|
|
category : color: INTEGER DEFAULT 0x00000000
|
|
|
|
|
|
account : id: INTEGER PRIMARY KEY
|
|
|
account : name: STRING NOT NULL
|
|
|
account : color: INTEGER DEFAULT 0x000000
|
|
|
account : initial_balance: INTEGER DEFAULT 0
|
|
|
|
|
|
operation : id: INTEGER PRIMARY KEY
|
|
|
operation : name: STRING NOT NULL
|
|
|
operation : cat_id: INTEGER FOREIGN KEY REFERENCES category.id
|
|
|
operation : account_id: INTEGER FOREIGN KEY REFERENCES account.id
|
|
|
operation : amount: INTEGER NOT NULL
|
|
|
operation : date: DATE NOT NULL
|
|
|
operation : recurrent_id: INTEGER FOREIGN KEY REFERENCES recurrent_operation.id DEFAULT NULL
|
|
|
|
|
|
recurrent_operation : id: INTEGER PRIMARY KEY
|
|
|
recurrent_operation : name: STRING NOT NULL
|
|
|
recurrent_operation : cat_id: INTEGER FOREIGN KEY REFERENCES category.id
|
|
|
recurrent_operation : account_id: INTEGER FOREIGN KEY REFERENCES account.id
|
|
|
recurrent_operation : amount: INTEGER NOT NULL
|
|
|
recurrent_operation : starting: DATE
|
|
|
recurrent_operation : ending: DATE
|
|
|
recurrent_operation : last_stored: DATA
|
|
|
|
|
|
balance : id: INTEGER PRIMARY KEY
|
|
|
balance : account_id: INTEGER FOREIGN KEY REFERENCES account.id
|
|
|
balance : date: DATE
|
|
|
balance : balance: INTEGER NOT NULL
|
|
|
|
|
|
balance "0..*" -- "1..1" account
|
|
|
|
|
|
recurrent_operation "0..*" -- "1..1" account
|
|
|
recurrent_operation "0..*" -- "1..1" category
|
|
|
recurrent_operation "0..1" -- "0..*" operation
|
|
|
|
|
|
operation "0..*" -- "1..1" account
|
|
|
operation "0..*" -- "1..1" category
|
|
|
``` |
|
|
\ No newline at end of file |