Extracted frontend from webservice to new directory

Updated directory structure
Updated .gitignore
This commit is contained in:
2022-03-17 17:11:00 +01:00
parent 0140fe4b7c
commit ecc532b752
80 changed files with 338 additions and 204 deletions

80
api/scheme.py Normal file
View File

@@ -0,0 +1,80 @@
from apiflask import Schema
from apiflask.fields import Integer, String, Boolean, Field, Float
class BaseResponseSchema(Schema):
text = String()
status = Integer()
data = Field()
class UsersSchema(Schema):
admin = Boolean()
password = String()
telegram_name = String()
user_id = Integer()
username = String()
class AdminDataSchema(Schema):
username = String()
admin = Boolean()
class TokenSchema(Schema):
token = String()
class LoginDataSchema(Schema):
username = String()
password = String()
class DeleteUserSchema(Schema):
username = String()
class ChangePasswordSchema(Schema):
old_password = String()
new_password = String()
class ChangeUsernameSchema(Schema):
new_username = String()
class KeywordSchema(Schema):
keyword = String()
class KeywordResponseSchema(Schema):
keyword = String()
s_id = Integer()
user_id = Integer()
class SymbolSchema(Schema):
symbol = String()
class SymbolResponseSchema(Schema):
symbol = String()
s_id = Integer()
user_id = Integer()
class PortfolioShareResponseSchema(Schema):
count = Integer()
last_transaction = String()
class TransactionSchema(Schema):
user_id = Integer()
symbol = String()
time = String()
count = Integer()
price = Float()
class DeleteSuccessfulSchema(Schema):
pass