fix:last record
This commit is contained in:
@@ -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='پیشرفت فیزیکی')
|
||||
|
||||
@@ -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='پیشرفت ریالی')
|
||||
|
||||
Reference in New Issue
Block a user