__init__.py 2.5 KB
# coding=utf-8
#author:        4N
#createtime:    2021/3/1
#email:         nheweijun@sina.com


from flasgger import swag_from
from flask import Blueprint
from app.util import BlueprintApi

from . import field_edit

from . import table_list
from . import field_list
from . import table_edit
from . import table_info
from . import table_refresh
from . import table_delete
from . import table_view
from . import table_vacuate
class DataManager(BlueprintApi):

    bp = Blueprint("DataManager", __name__, url_prefix="/API/Manager")

    @staticmethod
    @bp.route('/FieldEdit', methods=['POST'])
    @swag_from(field_edit.Api.api_doc)
    def field_edit():
        """
        修改属性别名
        """
        return field_edit.Api().result

    @staticmethod
    @bp.route('/FieldList', methods=['POST'])
    @swag_from(field_list.Api.api_doc)
    def field_list():
        """
        属性列表
        """
        return field_list.Api().result

    @staticmethod
    @bp.route('/TableList', methods=['POST'])
    @swag_from(table_list.Api.api_doc)
    def table_list():
        """
        数据列表
        """
        return table_list.Api().result


    @staticmethod
    @bp.route('/TableEdit', methods=['POST'])
    @swag_from(table_edit.Api.api_doc)
    def table_edit():
        """
        修改数据
        """
        return table_edit.Api().result


    @staticmethod
    @bp.route('/TableDelete', methods=['POST'])
    @swag_from(table_delete.Api.api_doc)
    def table_delete():
        """
        删除数据
        """
        return table_delete.Api().result


    @staticmethod
    @bp.route('/TableInfo', methods=['POST'])
    @swag_from(table_info.Api.api_doc)
    def table_info():
        """
        数据信息
        """
        return table_info.Api().result


    @staticmethod
    @bp.route('/TableRefresh', methods=['POST'])
    @swag_from(table_refresh.Api.api_doc)
    def table_refresh():
        """
        刷新数据
        """
        return table_refresh.Api().result

    @staticmethod
    @bp.route('/TableView', methods=['POST'])
    @swag_from(table_view.Api.api_doc)
    def table_view():
        """
        数据浏览
        """
        return table_view.Api().result


    @staticmethod
    @bp.route('/TableVacuate', methods=['POST'])
    @swag_from(table_vacuate.Api.api_doc)
    def table_vacuate():
        """
        数据抽稀
        """
        return table_vacuate.Api().result