feat: profit chart in statistics
This commit is contained in:
31
schemas/statistics.py
Normal file
31
schemas/statistics.py
Normal file
@@ -0,0 +1,31 @@
|
||||
import datetime
|
||||
from typing import List, Tuple
|
||||
|
||||
from schemas.base import BaseSchema
|
||||
|
||||
# region Entities
|
||||
|
||||
class ProfitDataItem(BaseSchema):
|
||||
date: datetime.date
|
||||
revenue: float
|
||||
profit: float
|
||||
deals_count: int
|
||||
|
||||
# endregion
|
||||
|
||||
# region Requests
|
||||
|
||||
class GetProfitDataRequest(BaseSchema):
|
||||
date_range: Tuple[datetime.date, datetime.date]
|
||||
client_id: int
|
||||
base_marketplace_key: str
|
||||
deal_status_id: int
|
||||
|
||||
# endregion
|
||||
|
||||
# region Responses
|
||||
|
||||
class GetProfitDataResponse(BaseSchema):
|
||||
data: List[ProfitDataItem]
|
||||
|
||||
# endregion
|
||||
Reference in New Issue
Block a user