
from flask_restless import APIManager

from .models import *
from .. import app

manager = APIManager(app, flask_sqlalchemy_db=db)
manager.create_api(Config, methods=['GET', 'POST', 'DELETE', 'PUT'])
manager.create_api(Device_type, methods=['GET', 'POST', 'DELETE', 'PUT'])
manager.create_api(Device, methods=['GET', 'POST', 'DELETE', 'PUT'])
manager.create_api(Doc, methods=['GET', 'POST', 'DELETE', 'PUT'])
manager.create_api(Tag, methods=['GET', 'POST', 'DELETE', 'PUT'], results_per_page=100)
manager.create_api(Tag_val, methods=['GET', 'POST', 'DELETE'], allow_delete_many=True)
manager.create_api(Card, methods=['GET', 'POST', 'DELETE'], allow_delete_many=True)
manager.create_api(GaugeOffVal, methods=['GET', 'POST', 'DELETE'], allow_delete_many=True)
manager.create_api(WellTest, methods=['GET', 'POST', 'DELETE', 'PUT'], allow_delete_many=True)
manager.create_api(Note, methods=['GET', 'POST', 'DELETE', 'PUT'], allow_delete_many=True)
manager.create_api(EventConfig, methods=['GET', 'POST', 'DELETE', 'PUT'])
manager.create_api(Event, methods=['GET', 'POST', 'DELETE'], allow_delete_many=True)
manager.create_api(RunStatus, methods=['GET', 'POST', 'DELETE'], allow_delete_many=True)
manager.create_api(FluidShot, methods=['GET', 'POST', 'DELETE', 'PUT'], allow_delete_many=True)
manager.create_api(BackupRestore, methods=['GET', 'POST', 'DELETE', 'PUT'], allow_delete_many=True)
