# Path: plugin.py
# class Plugin:
# class PluginManager:
# class Documents:
#     def __init__(self):
#     def user(self):
#     def process(self, request):
#     def unload(self):
#     def __init__(self):
#     def load_plugin(self, name, reload=False):
#     def get_plugins(self):
#     def send_request(self, plugin, request):
#     def __init__(self, plugin: Plugin):
#     def set_document_type(self, name: str):
#     def set_document_table(self, table):
#     def get(self, pid):
#     def list(self, owner):
#     def create(self, pdoc: PluginDocument):
#     def update(pdoc: PluginDocument):
#     def delete(self, pdoc: PluginDocument):
# 
# Path: database.py
# def get_session():
# def teardown_session(exception):
# 
# Path: database.py
# def get_session():
# def teardown_session(exception):


from plugin import Plugin, PluginDocument
from database import TableBase, Column, Text
from database import engine
"""This is an example plugin for BioHub. It manages all text files, and print some debug messages."""





class TextFileDocument(TableBase, PluginDocument):

    __tablename__ = 'textfile'

    def __init__(self, owner, title='Untitled', text=''):
        super().__init__()
        self.owner = owner
        self.title = title
        self.text = text
        self.description = 'not support description'


# Path: plugin.py
# class Plugin:
# class PluginManager:
# class Documents:
#     def __init__(self):
#     def user(self):
#     def process(self, request):
#     def unload(self):
#     def __init__(self):
#     def load_plugin(self, name, reload=False):
#     def get_plugins(self):
#     def send_request(self, plugin, request):
#     def __init__(self, plugin: Plugin):
#     def set_document_type(self, name: str):
#     def set_document_table(self, table):
#     def get(self, pid):
#     def list(self, owner):
#     def create(self, pdoc: PluginDocument):
#     def update(pdoc: PluginDocument):
#     def delete(self, pdoc: PluginDocument):
# 
# Path: database.py
# def get_session():
# def teardown_session(exception):
# 
# Path: database.py
# def get_session():
# def teardown_session(exception):


# Path: plugins/example_plugin.py
from plugin import Plugin, PluginDocument
from database import TableBase, Column, Text
from database import engine

"""This is an example plugin for BioHub. It manages all text files, and print some debug messages."""





class TextFileDocument(TableBase, PluginDocument):

    __tablename__ = 'textfile'

    def __init__(self, owner, title='Untitled', text=''):
        super().__init__()
        self.owner = owner
        self.title = title
        self.text = text
        self.description = 'not support description'


    text = Column(Text())