# -*- coding: utf-8 -*-
# @Time    : 2021/3/3 11:02
# @Author  : wangyinghao
# @FileName: api_module_list_view.py
# @Software: PyCharm
"""
8.19 弃用
"""
# from django.views.generic import View
# from automated_main.utils.http_format import response_success
# from automated_main.models.api_automation.api_module import APIModule
# import arrow
#
#
# class ApiModuleListView(View):
#
#     def get(self, request, *args, **kwargs):
#         """
#         代表获取所有Api模块列表
#         :param request:
#         :param args:
#         :param kwargs:
#         :return:
#         """
#
#         api_module = APIModule.objects.all().order_by('-id')
#         api_module_list = []
#
#         for api_modules in api_module:
#             api_module_dict = {
#                 "id": api_modules.id,
#                 "api_module_name": api_modules.ui_page_name,
#                 "api_module_describe": api_modules.ui_page_describe,
#                 "updata_time": arrow.get(str(api_modules.updata_time)).format('YYYY-MM-DD HH:mm:ss'),
#                 "create_time": arrow.get(str(api_modules.create_time)).format('YYYY-MM-DD HH:mm:ss'),
#                 "api_project_name": api_modules.ui_project.ui_project_name
#             }
#             api_module_list.append(api_module_dict)
#
#         return response_success(api_module_list)
