You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
787 B
Python
25 lines
787 B
Python
|
|
from typing import Dict, List
|
|
from fastapi import APIRouter, HTTPException, Query, status
|
|
|
|
|
|
from .service import get_all
|
|
from .schema import ScopeEquipmentActivityCreate, ScopeEquipmentActivityPagination, ScopeEquipmentActivityRead, ScopeEquipmentActivityUpdate
|
|
|
|
from src.models import StandardResponse
|
|
from src.database.service import CommonParameters, search_filter_sort_paginate, DbSession
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/{assetnum}", response_model=StandardResponse[List[Dict]])
|
|
async def get_scope_equipment_parts(db_session: DbSession, assetnum):
|
|
"""Get all scope activity pagination."""
|
|
# return
|
|
data = await get_all(db_session=db_session, assetnum=assetnum)
|
|
|
|
return StandardResponse(
|
|
data=data,
|
|
message="Data retrieved successfully",
|
|
)
|