fix:last record

This commit is contained in:
shahzeydyfah
2024-06-13 20:13:47 +03:30
parent 3861a50c15
commit 801742d466
5 changed files with 42 additions and 16 deletions
+3 -3
View File
@@ -2,7 +2,7 @@ from uuid import UUID
from fastapi import Body
from app.models.monito_physical_progress import PhysicalProgressModel
from app.models.monito_physical_progress import PhysicalProgressModel, LastRecord
from app.repositories.monitor_physical_progress import PhysicalProgressRepository
from core.app import app
from core.utils.router import generate_router, shrink
@@ -19,9 +19,9 @@ repo = PhysicalProgressRepository()
def create(coding: ThisModel = Body(...)):
pass
@router.post('/last/{project_id}', response_model=ThisModel, tags=_tag_base, description='پیشرفت فیزیکی')
@router.post('/last', response_model=list[dict], tags=_tag_base, description='پیشرفت فیزیکی')
@shrink(repo.last_record)
def last_record(project_id:UUID):
def last_record(last:LastRecord):
pass
@router.put('/{_id}', response_model=ThisModel, tags=_tag_base, description='پیشرفت فیزیکی')
+3 -2
View File
@@ -2,6 +2,7 @@ from uuid import UUID
from fastapi import Body
from app.models.monito_physical_progress import LastRecord
from app.models.monitor_rial_progress import RialProgressModel
from app.repositories.monitor_rial_progress import RialProgressRepository
from core.app import app
@@ -19,9 +20,9 @@ repo = RialProgressRepository()
def create(coding: ThisModel = Body(...)):
pass
@router.post('/last/{project_id}', response_model=ThisModel, tags=_tag_base, description='پیشرفت ریالی')
@router.post('/last', response_model=ThisModel, tags=_tag_base, description='پیشرفت ریالی')
@shrink(repo.last_record)
def last_record(project_id:UUID):
def last_record(last:LastRecord):
pass
@router.put('/{_id}', response_model=ThisModel, tags=_tag_base, description='پیشرفت ریالی')