63 lines
1.0 KiB
Python
63 lines
1.0 KiB
Python
|
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 Token(Schema):
|
||
|
token = String()
|
||
|
|
||
|
|
||
|
class LoginData(Schema):
|
||
|
username = String()
|
||
|
password = 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
|