feat: profit table and division of charts in statistics
This commit is contained in:
6
test.py
6
test.py
@@ -4,14 +4,14 @@ import datetime
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from backend.session import session_maker
|
||||
from schemas.statistics import GetProfitDataRequest
|
||||
from schemas.statistics import GetProfitChartDataRequest
|
||||
from services.statistics import StatisticsService
|
||||
|
||||
|
||||
async def main():
|
||||
session: AsyncSession = session_maker()
|
||||
|
||||
request = GetProfitDataRequest(
|
||||
request = GetProfitChartDataRequest(
|
||||
date_range=(
|
||||
datetime.date(2020, 1, 1),
|
||||
datetime.date(2020, 1, 31),
|
||||
@@ -21,7 +21,7 @@ async def main():
|
||||
try:
|
||||
service = StatisticsService(session)
|
||||
|
||||
result = await service.get_profit_data(request)
|
||||
result = await service.get_profit_chart_data(request)
|
||||
|
||||
# for res in result:
|
||||
# print(res)
|
||||
|
||||
Reference in New Issue
Block a user