123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- from fastapi import APIRouter
- from admin.api.endpoints.homepage.statistics import (statistic_resource, resource_date_dist,
- statistic_marktask, get_top10_school_by_task,
- get_top10_subject_by_task, statistic_school,
- school_distribute)
- from schemas.homepage.statistic import (ResourceStatistic, ResourceDistribute, MarkTaskStatistic,
- Top10SchoolByTask, Top10SubjectByTask, SchoolStatistic,
- SchoolDistribute)
- router = APIRouter(tags=["后台首页"], prefix="/homepage")
- router.add_api_route("/res-stats",
- statistic_resource,
- methods=["get"],
- response_model=ResourceStatistic,
- response_model_exclude_none=True,
- summary="后台首页-资源统计数据")
- router.add_api_route("/res-dist",
- resource_date_dist,
- methods=["get"],
- response_model=ResourceDistribute,
- response_model_exclude_none=True,
- summary="后台首页-资源月度统计数据")
- router.add_api_route("/mark-stats",
- statistic_marktask,
- methods=["get"],
- response_model=MarkTaskStatistic,
- response_model_exclude_none=True,
- summary="后台首页-阅卷任务统计数据")
- router.add_api_route("/top10-schools",
- get_top10_school_by_task,
- methods=["get"],
- response_model=Top10SchoolByTask,
- response_model_exclude_none=True,
- summary="后台首页-阅卷任务Top10学校")
- router.add_api_route("/top10-subjects",
- get_top10_subject_by_task,
- methods=["get"],
- response_model=Top10SubjectByTask,
- response_model_exclude_none=True,
- summary="后台首页-阅卷任务Top10科目")
- router.add_api_route("/school-stats",
- statistic_school,
- methods=["get"],
- response_model=SchoolStatistic,
- response_model_exclude_none=True,
- summary="后台首页-学校/班级/教师/学生统计数据")
- router.add_api_route("/school-dist",
- school_distribute,
- methods=["get"],
- response_model=SchoolDistribute,
- response_model_exclude_none=True,
- summary="后台首页-学校地区分布")
- __all__ = [router]
|