Use ISIN numbers instead of share symbols and add comment field to database.

Fixes #65
This commit is contained in:
2022-04-19 08:20:28 +02:00
parent 094b21a366
commit e9291d3a97
6 changed files with 90 additions and 53 deletions

View File

@@ -2,7 +2,7 @@ __author__ = "Florian Kaiser"
__copyright__ = "Copyright 2022, Project Aktienbot"
__credits__ = ["Florian Kaiser", "Florian Kellermann", "Linus Eickhof", "Kevin Pauer"]
__license__ = "GPL 3.0"
__version__ = "1.0.0"
__version__ = "1.0.1"
from apiflask import Schema
from apiflask.fields import Integer, String, Boolean, Field, Float
@@ -72,18 +72,24 @@ class KeywordSchema(Schema):
class SymbolSchema(Schema):
symbol = String()
isin = String()
comment = String()
class SymbolRemoveSchema(Schema):
isin = String()
class TransactionSchema(Schema):
symbol = String()
isin = String()
comment = String()
time = String(validate=validate.Regexp(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z"))
count = Integer()
price = Float()
class SymbolPriceSchema(Schema):
symbol = String()
isin = String()
time = String(validate=validate.Regexp(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z"))
price = Float()
@@ -103,7 +109,8 @@ class KeywordResponseSchema(Schema):
class SymbolResponseSchema(Schema):
symbol = String()
isin = String()
comment = String()
s_id = Integer()
email = Email()
@@ -115,14 +122,16 @@ class PortfolioShareResponseSchema(Schema):
class TransactionResponseSchema(Schema):
email = Email()
symbol = String()
isin = String()
comment = String()
time = String()
count = Integer()
price = Float()
class PortfolioResponseSchema(Schema):
symbol = String()
isin = String()
comment = String()
last_transaction = String()
count = Integer()
# price = Float()